From 9ffe9c2006954ce2baddf8d49266e98a973d6880 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 19 Jan 2010 22:55:49 +0000 Subject: [PATCH] - Configure file now checks for pkg-config executable since it is required to detect libtorrent-rasterbar --- INSTALL | 4 ++++ configure | 20 ++++++++++++++++++++ qbittorrent.qc | 3 +++ qcm/pkg-config.qcm | 16 ++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 qcm/pkg-config.qcm diff --git a/INSTALL b/INSTALL index 7ee28efad..9b96c73a6 100644 --- a/INSTALL +++ b/INSTALL @@ -12,6 +12,8 @@ qBittorrent - A BitTorrent client in C++ / Qt4 Dependencies: - Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml) + - pkg-config executable + - libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED) -> http://www.libtorrent.net Be careful: another library (the one used by rTorrent) uses a similar name. @@ -40,6 +42,8 @@ qBittorrent - A BitTorrent client in C++ / Qt4 Dependencies: - Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork) + - pkg-config executable + - libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED) -> http://www.libtorrent.net Be careful: another library (the one used by rTorrent) uses a similar name. diff --git a/configure b/configure index d9bcb4de0..f2dd9f649 100755 --- a/configure +++ b/configure @@ -319,6 +319,23 @@ public: } }; +#line 1 "pkg-config.qcm" +/* +-----BEGIN QCMOD----- +name: pkg-config +-----END QCMOD----- +*/ +#include +class qc_pkg_config : public ConfObj +{ +public: + qc_pkg_config(Conf *c) : ConfObj(c) {} + QString name() const { return "pkg-config executable"; } + QString shortname() const { return "pkg-config"; } + bool exec(){ + return !conf->findProgram("pkg-config").isEmpty(); + } +}; #line 1 "libtorrent-rasterbar.qcm" /* -----BEGIN QCMOD----- @@ -494,6 +511,9 @@ cat >$1/modules_new.cpp <required = true; o->disabled = false; + o = new qc_pkg_config(conf); + o->required = true; + o->disabled = false; o = new qc_libtorrent_rasterbar(conf); o->required = true; o->disabled = false; diff --git a/qbittorrent.qc b/qbittorrent.qc index 1b35806db..3874ab186 100644 --- a/qbittorrent.qc +++ b/qbittorrent.qc @@ -6,6 +6,9 @@ + + + diff --git a/qcm/pkg-config.qcm b/qcm/pkg-config.qcm new file mode 100644 index 000000000..287de5a35 --- /dev/null +++ b/qcm/pkg-config.qcm @@ -0,0 +1,16 @@ +/* +-----BEGIN QCMOD----- +name: pkg-config +-----END QCMOD----- +*/ +#include +class qc_pkg_config : public ConfObj +{ +public: + qc_pkg_config(Conf *c) : ConfObj(c) {} + QString name() const { return "pkg-config executable"; } + QString shortname() const { return "pkg-config"; } + bool exec(){ + return !conf->findProgram("pkg-config").isEmpty(); + } +};