diff --git a/configure b/configure index b4777e9f5..3b08c335e 100755 --- a/configure +++ b/configure @@ -18,9 +18,11 @@ Main options: --help This help text. Dependency options: - --with-libtorrent-inc=[path] Path to libtorrent include files - --with-libtorrent-lib=[path] Path to libtorrent library files - --with-libtorrent-static-lib=[path] Path to libtorrent .a file + --with-libtorrent-inc=[path] Path to libtorrent-rasterbar include + files + --with-libtorrent-lib=[path] Path to libtorrent-rasterbar library + files + --with-libtorrent-static-lib=[path] Path to libtorrent-rasterbar .a file --with-libboost-inc=[path] Path to libboost include files --with-libcurl-inc=[path] Path to libcurl include files --with-libcurl-lib=[path] Path to libcurl library files @@ -357,21 +359,21 @@ public: return(QT_VERSION >= 0x040300); } }; -#line 1 "libtorrent.qcm" +#line 1 "libtorrent-rasterbar.qcm" /* -----BEGIN QCMOD----- -name: libtorrent -arg: with-libtorrent-inc=[path], Path to libtorrent include files -arg: with-libtorrent-lib=[path], Path to libtorrent library files -arg: with-libtorrent-static-lib=[path], Path to libtorrent .a file +name: libtorrent-rasterbar +arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files +arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files +arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file -----END QCMOD----- */ -class qc_libtorrent : public ConfObj +class qc_libtorrent_rasterbar : public ConfObj { public: - qc_libtorrent(Conf *c) : ConfObj(c) {} - QString name() const { return "libtorrent >= 0.13"; } - QString shortname() const { return "libtorrent"; } + qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {} + QString name() const { return "libtorrent-rasterbar >= 0.13"; } + QString shortname() const { return "libtorrent-rasterbar"; } bool exec(){ QString s; s = conf->getenv("QC_WITH_LIBTORRENT_INC"); @@ -405,7 +407,7 @@ public: s = conf->getenv("QC_WITH_LIBTORRENT_LIB"); if(!s.isEmpty()) { - if(!conf->checkLibrary(s, "torrent")) { + if(!conf->checkLibrary(s, "torrent-rasterbar")) { return false; } conf->addLib(QString("-L") + s); @@ -417,7 +419,7 @@ public: sl << "/usr/local/lib64/"; bool found = false; foreach(s, sl){ - if(conf->checkLibrary(s, "torrent")){ + if(conf->checkLibrary(s, "torrent-rasterbar")){ found = true; break; } @@ -705,7 +707,7 @@ cat >$1/modules_new.cpp <required = true; o->disabled = false; - o = new qc_libtorrent(conf); + o = new qc_libtorrent_rasterbar(conf); o->required = true; o->disabled = false; o = new qc_libboost(conf); diff --git a/qbittorrent.qc b/qbittorrent.qc index c8b4e646b..44e7c0f4f 100644 --- a/qbittorrent.qc +++ b/qbittorrent.qc @@ -6,7 +6,7 @@ - + diff --git a/qcm/libtorrent.qcm b/qcm/libtorrent.qcm index f0a093497..e69de29bb 100644 --- a/qcm/libtorrent.qcm +++ b/qcm/libtorrent.qcm @@ -1,70 +0,0 @@ -/* ------BEGIN QCMOD----- -name: libtorrent -arg: with-libtorrent-inc=[path], Path to libtorrent include files -arg: with-libtorrent-lib=[path], Path to libtorrent library files -arg: with-libtorrent-static-lib=[path], Path to libtorrent .a file ------END QCMOD----- -*/ -class qc_libtorrent : public ConfObj -{ -public: - qc_libtorrent(Conf *c) : ConfObj(c) {} - QString name() const { return "libtorrent >= 0.13"; } - QString shortname() const { return "libtorrent"; } - bool exec(){ - QString s; - s = conf->getenv("QC_WITH_LIBTORRENT_INC"); - if(!s.isEmpty()) { - if(!conf->checkHeader(s, "libtorrent/lsd.hpp")) { - return false; - } - }else{ - QStringList sl; - sl << "/usr/include"; - sl << "/usr/local/include"; - bool found = false; - foreach(s, sl){ - if(conf->checkHeader(s, "libtorrent/lsd.hpp")){ - found = true; - break; - } - } - if(!found) { - return false; - } - } - conf->addIncludePath(s); - conf->addIncludePath(s+QDir::separator()+"libtorrent"); - - s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB"); - if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){ - conf->addLib(s); - return true; - } - - s = conf->getenv("QC_WITH_LIBTORRENT_LIB"); - if(!s.isEmpty()) { - if(!conf->checkLibrary(s, "torrent")) { - return false; - } - conf->addLib(QString("-L") + s); - }else{ - QStringList sl; - sl << "/usr/lib/"; - sl << "/usr/lib64/"; - sl << "/usr/local/lib/"; - sl << "/usr/local/lib64/"; - bool found = false; - foreach(s, sl){ - if(conf->checkLibrary(s, "torrent")){ - found = true; - break; - } - } - if(!found) return false; - conf->addLib(QString("-L") + s); - } - return true; - } -}; diff --git a/src/src.pro b/src/src.pro index 5fd8c5080..add849f75 100644 --- a/src/src.pro +++ b/src/src.pro @@ -81,7 +81,7 @@ QMAKE_CXXFLAGS_RELEASE += -fwrapv -O2 QMAKE_CXXFLAGS_DEBUG += -fwrapv -O1 CONFIG += link_pkgconfig -PKGCONFIG += "libtorrent libcurl" +PKGCONFIG += "libtorrent-rasterbar libcurl" !contains(DEFINES, HAVE_MAGICK){ message(ImageMagick disabled)