mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
- Use findPkg (pkg-config) to find libtorrent-rasterbar and detected if version is sufficient
- Cleaned up libMagick compilation flags detection - Minor fixes to About dialog - Updated language files - Fixed French translation
This commit is contained in:
parent
66baa4d3dc
commit
037a1875f9
32 changed files with 236 additions and 343 deletions
109
configure
vendored
109
configure
vendored
|
@ -18,17 +18,12 @@ Main options:
|
|||
--help This help text.
|
||||
|
||||
Dependency options:
|
||||
--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
|
||||
--disable-libzzip Disable use of libzzip
|
||||
--with-libzzip-inc=[path] Path to libzzip++ include files
|
||||
--with-libzzip-lib=[path] Path to libzzip++ library files
|
||||
--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
|
||||
--disable-libzzip Disable use of libzzip
|
||||
--with-libzzip-inc=[path] Path to libzzip++ include files
|
||||
--with-libzzip-lib=[path] Path to libzzip++ library files
|
||||
|
||||
EOT
|
||||
}
|
||||
|
@ -145,21 +140,6 @@ while [ $# -gt 0 ]; do
|
|||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-inc=*)
|
||||
QC_WITH_LIBTORRENT_INC=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-lib=*)
|
||||
QC_WITH_LIBTORRENT_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-static-lib=*)
|
||||
QC_WITH_LIBTORRENT_STATIC_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libboost-inc=*)
|
||||
QC_WITH_LIBBOOST_INC=$optarg
|
||||
shift
|
||||
|
@ -211,9 +191,6 @@ echo PREFIX=$PREFIX
|
|||
echo BINDIR=$BINDIR
|
||||
echo DATADIR=$DATADIR
|
||||
echo EX_QTDIR=$EX_QTDIR
|
||||
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||
echo QC_WITH_LIBTORRENT_LIB=$QC_WITH_LIBTORRENT_LIB
|
||||
echo QC_WITH_LIBTORRENT_STATIC_LIB=$QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
|
||||
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
||||
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
|
||||
|
@ -346,70 +323,29 @@ public:
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
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-----
|
||||
*/
|
||||
// see Conf::findPkgConfig
|
||||
class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14"; }
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.14.4 advised)"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/magnet_uri.hpp")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/magnet_uri.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-rasterbar")) {
|
||||
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-rasterbar")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
QStringList incs;
|
||||
QString req_ver = "0.14.0";
|
||||
QString adv_ver = "0.14.4";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
|
||||
return false;
|
||||
for(int n = 0; n < incs.count(); ++n)
|
||||
conf->addIncludePath(incs[n]);
|
||||
if(!libs.isEmpty())
|
||||
conf->addLib(libs);
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other))
|
||||
printf("\nWarning: libtorrent-rasterbar v%s was detected. Although it will compile and run, you will probably experience some bugs. Please consider updating to v%s!\n", version.toUtf8().data(), adv_ver.toUtf8().data());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
@ -1567,9 +1503,6 @@ export PREFIX
|
|||
export BINDIR
|
||||
export DATADIR
|
||||
export EX_QTDIR
|
||||
export QC_WITH_LIBTORRENT_INC
|
||||
export QC_WITH_LIBTORRENT_LIB
|
||||
export QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
export QC_WITH_LIBBOOST_INC
|
||||
export QC_WITH_LIBCURL_INC
|
||||
export QC_WITH_LIBCURL_LIB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue