From 5713af73752acb3b3bbf25ca68b2b385f8d7e9d9 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 24 Jul 2007 05:08:02 +0000 Subject: [PATCH] - Workaround to build on fedora system (pkg-config problem) --- Changelog | 1 + configure | 22 ++++++++++++++++++++-- qcm/libcommoncpp2.qcm | 11 ++++++++++- qcm/libtorrent.qcm | 11 ++++++++++- 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 0cfd1f378..21ab72128 100644 --- a/Changelog +++ b/Changelog @@ -36,6 +36,7 @@ - BUGFIX: qBittorrent is not exiting anymore when a dialog is closed and main window is hidden - BUGFIX: Search plugin update is not making the GUI freeze anymore (moved to a thread) - BUGFIX: DHT settings were not saved correctly + - BUGFIX: Workaround to build on Fedora system (pkg-config problem) - COSMETIC: Redesigned torrent properties a little - COSMETIC: Redesigned options a little - COSMETIC: Display more logs messages concerning features diff --git a/configure b/configure index 5de2f94aa..ea6a8b302 100755 --- a/configure +++ b/configure @@ -348,7 +348,16 @@ public: if(!found) return false; conf->addLib(QString("-L") + s); } - //conf->addLib("-ltorrent"); + // BUGFIX for Fedora (doesn't support pkg-config?) + QFile issue_file("/etc/issue"); + if(issue_file.open(QIODevice::ReadOnly | QIODevice::Text)){ + QString content = issue_file.readAll(); + issue_file.close(); + if(content.indexOf("Fedora") != -1){ + qWarning("Fedora detected. WORKAROUND for Fedora pkg-config problem enabled"); + conf->addLib("-lssl -lcrypto -lboost_date_time -lboost_filesystem -lboost_thread -lz -ltorrent"); + } + } return true; } }; @@ -470,7 +479,16 @@ public: if(!found) return false; conf->addLib(QString("-L") + s); } - //conf->addLib("-lccext2 -lccgnu2"); + // BUGFIX for Fedora (doesn't support pkg-config?) + QFile issue_file("/etc/issue"); + if(issue_file.open(QIODevice::ReadOnly | QIODevice::Text)){ + QString content = issue_file.readAll(); + issue_file.close(); + if(content.indexOf("Fedora") != -1){ + qWarning("Fedora detected. WORKAROUND for Fedora pkg-config problem enabled"); + conf->addLib("-pthread -lccext2 -lz -lccgnu2 -ldl -lrt"); + } + } return true; } }; diff --git a/qcm/libcommoncpp2.qcm b/qcm/libcommoncpp2.qcm index 8b5e856a7..91fdfd70e 100644 --- a/qcm/libcommoncpp2.qcm +++ b/qcm/libcommoncpp2.qcm @@ -58,7 +58,16 @@ public: if(!found) return false; conf->addLib(QString("-L") + s); } - //conf->addLib("-lccext2 -lccgnu2"); + // BUGFIX for Fedora (doesn't support pkg-config?) + QFile issue_file("/etc/issue"); + if(issue_file.open(QIODevice::ReadOnly | QIODevice::Text)){ + QString content = issue_file.readAll(); + issue_file.close(); + if(content.indexOf("Fedora") != -1){ + qWarning("Fedora detected. WORKAROUND for Fedora pkg-config problem enabled"); + conf->addLib("-pthread -lccext2 -lz -lccgnu2 -ldl -lrt"); + } + } return true; } }; diff --git a/qcm/libtorrent.qcm b/qcm/libtorrent.qcm index d278a3b7a..692d08e96 100644 --- a/qcm/libtorrent.qcm +++ b/qcm/libtorrent.qcm @@ -63,7 +63,16 @@ public: if(!found) return false; conf->addLib(QString("-L") + s); } - //conf->addLib("-ltorrent"); + // BUGFIX for Fedora (doesn't support pkg-config?) + QFile issue_file("/etc/issue"); + if(issue_file.open(QIODevice::ReadOnly | QIODevice::Text)){ + QString content = issue_file.readAll(); + issue_file.close(); + if(content.indexOf("Fedora") != -1){ + qWarning("Fedora detected. WORKAROUND for Fedora pkg-config problem enabled"); + conf->addLib("-lssl -lcrypto -lboost_date_time -lboost_filesystem -lboost_thread -lz -ltorrent"); + } + } return true; } };