Package: qbittorrent
Version: 3.1.11-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu wily ubuntu-patch

Dear Maintainer,

Due to an incompatibility between Qt4 and boost (with gcc5), qbittorrent
fails to build from source with gcc5.

https://bugreports.qt.io/browse/QTBUG-22829

I've applied the attached patch in Ubuntu to work around this.
Thanks for considering it!

-- System Information:
Debian Release: jessie/sid
  APT prefers wily-updates
  APT policy: (500, 'wily-updates'), (500, 'wily-security'), (500, 'wily')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-2-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru qbittorrent-3.1.11/debian/patches/gcc5.patch qbittorrent-3.1.11/debian/patches/gcc5.patch
--- qbittorrent-3.1.11/debian/patches/gcc5.patch	1969-12-31 19:00:00.000000000 -0500
+++ qbittorrent-3.1.11/debian/patches/gcc5.patch	2015-08-12 17:57:52.000000000 -0400
@@ -0,0 +1,196 @@
+Index: qbittorrent-3.1.11/src/about_imp.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/about_imp.h
++++ qbittorrent-3.1.11/src/about_imp.h
+@@ -35,7 +35,9 @@
+ #include <QFile>
+ #include <QtGlobal>
+ #include <libtorrent/version.hpp>
++#ifndef Q_MOC_RUN
+ #include <boost/version.hpp>
++#endif
+ 
+ class about : public QDialog, private Ui::AboutDlg{
+   Q_OBJECT
+Index: qbittorrent-3.1.11/src/properties/peeraddition.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/properties/peeraddition.h
++++ qbittorrent-3.1.11/src/properties/peeraddition.h
+@@ -35,15 +35,21 @@
+ #include <QRegExp>
+ #include <QMessageBox>
+ #include <QHostAddress>
++#ifndef Q_MOC_RUN
+ #include "ui_peer.h"
+ #include <libtorrent/session.hpp>
++#endif
+ 
++#ifndef Q_MOC_RUN
+ #include <boost/version.hpp>
++#endif
+ #if BOOST_VERSION < 103500
+ #include <libtorrent/asio/ip/tcp.hpp>
+ #else
++#ifndef Q_MOC_RUN
+ #include <boost/asio/ip/tcp.hpp>
+ #endif
++#endif
+ 
+ class PeerAdditionDlg: public QDialog, private Ui::addPeerDialog {
+   Q_OBJECT
+Index: qbittorrent-3.1.11/src/properties/peerlistwidget.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/properties/peerlistwidget.h
++++ qbittorrent-3.1.11/src/properties/peerlistwidget.h
+@@ -50,12 +50,16 @@ class QStandardItem;
+ class QStandardItemModel;
+ QT_END_NAMESPACE
+ 
++#ifndef Q_MOC_RUN
+ #include <boost/version.hpp>
++#endif
+ #if BOOST_VERSION < 103500
+ #include <libtorrent/asio/ip/tcp.hpp>
+ #else
++#ifndef Q_MOC_RUN
+ #include <boost/asio/ip/tcp.hpp>
+ #endif
++#endif
+ 
+ class PeerListWidget : public QTreeView {
+   Q_OBJECT
+Index: qbittorrent-3.1.11/src/reverseresolution.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/reverseresolution.h
++++ qbittorrent-3.1.11/src/reverseresolution.h
+@@ -37,12 +37,16 @@
+ #include <QHostInfo>
+ #include "misc.h"
+ 
++#ifndef Q_MOC_RUN
+ #include <boost/version.hpp>
++#endif
+ #if BOOST_VERSION < 103500
+ #include <libtorrent/asio/ip/tcp.hpp>
+ #else
++#ifndef Q_MOC_RUN
+ #include <boost/asio/ip/tcp.hpp>
+ #endif
++#endif
+ 
+ const int CACHE_SIZE = 500;
+ 
+Index: qbittorrent-3.1.11/src/stacktrace_win_dlg.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/stacktrace_win_dlg.h
++++ qbittorrent-3.1.11/src/stacktrace_win_dlg.h
+@@ -3,7 +3,9 @@
+ 
+ #include <QTextStream>
+ #include <QClipboard>
++#ifndef Q_MOC_RUN
+ #include "boost/version.hpp"
++#endif
+ #include "libtorrent/version.hpp"
+ #include "ui_stacktrace_win_dlg.h"
+ 
+Index: qbittorrent-3.1.11/src/main.cpp
+===================================================================
+--- qbittorrent-3.1.11.orig/src/main.cpp
++++ qbittorrent-3.1.11/src/main.cpp
+@@ -33,6 +33,8 @@
+ #include <QFile>
+ #include <QLibraryInfo>
+ 
++#ifndef Q_MOC_RUN
++
+ #ifndef DISABLE_GUI
+ #if defined(QBT_STATIC_QT)
+ #include <QtPlugin>
+@@ -75,6 +77,8 @@ Q_IMPORT_PLUGIN(qico)
+ #include "misc.h"
+ #include "preferences.h"
+ 
++#endif // Q_MOC_RUN
++
+ #if defined(Q_OS_WIN) && !defined(QBT_HAS_GETCURRENTPID)
+ #error You seem to have updated QtSingleApplication without porting our custom QtSingleApplication::getRunningPid() function. Please see previous version to understate how it works.
+ #endif
+Index: qbittorrent-3.1.11/src/qtlibtorrent/qbtsession.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/qtlibtorrent/qbtsession.h
++++ qbittorrent-3.1.11/src/qtlibtorrent/qbtsession.h
+@@ -43,6 +43,7 @@
+ #include <QTimer>
+ #include <QNetworkCookie>
+ 
++#ifndef Q_MOC_RUN
+ #include <libtorrent/version.hpp>
+ #include <libtorrent/session.hpp>
+ #include <libtorrent/ip_filter.hpp>
+@@ -51,6 +52,7 @@
+ #include "qtorrenthandle.h"
+ #include "trackerinfos.h"
+ #include "misc.h"
++#endif
+ 
+ #define MAX_SAMPLES 20
+ 
+Index: qbittorrent-3.1.11/src/qtlibtorrent/filterparserthread.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/qtlibtorrent/filterparserthread.h
++++ qbittorrent-3.1.11/src/qtlibtorrent/filterparserthread.h
+@@ -37,8 +37,10 @@
+ #include <QStringList>
+ #include <QHostAddress>
+ 
++#ifndef Q_MOC_RUN
+ #include <libtorrent/session.hpp>
+ #include <libtorrent/ip_filter.hpp>
++#endif
+ 
+ using namespace std;
+ 
+Index: qbittorrent-3.1.11/src/preferences/options_imp.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/preferences/options_imp.h
++++ qbittorrent-3.1.11/src/preferences/options_imp.h
+@@ -31,8 +31,10 @@
+ #ifndef OPTIONS_IMP_H
+ #define OPTIONS_IMP_H
+ 
++#ifndef Q_MOC_RUN
+ #include "ui_options.h"
+ #include <libtorrent/ip_filter.hpp>
++#endif
+ 
+ // actions on double-click on torrents
+ enum DoubleClickAction {TOGGLE_PAUSE, OPEN_DEST, NO_ACTION};
+Index: qbittorrent-3.1.11/src/geoip/geoipmanager.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/geoip/geoipmanager.h
++++ qbittorrent-3.1.11/src/geoip/geoipmanager.h
+@@ -31,7 +31,9 @@
+ #ifndef GEOIPMANAGER_H
+ #define GEOIPMANAGER_H
+ 
++#ifndef Q_MOC_RUN
+ #include <libtorrent/session.hpp>
++#endif
+ #include <QString>
+ #include <QIcon>
+ 
+Index: qbittorrent-3.1.11/src/trackerlogin.h
+===================================================================
+--- qbittorrent-3.1.11.orig/src/trackerlogin.h
++++ qbittorrent-3.1.11/src/trackerlogin.h
+@@ -33,7 +33,9 @@
+ 
+ #include <QDialog>
+ #include <QMessageBox>
++#ifndef Q_MOC_RUN
+ #include <libtorrent/session.hpp>
++#endif
+ #include "ui_login.h"
+ #include "qtorrenthandle.h"
+ 
diff -Nru qbittorrent-3.1.11/debian/patches/series qbittorrent-3.1.11/debian/patches/series
--- qbittorrent-3.1.11/debian/patches/series	2014-10-27 15:07:04.000000000 -0400
+++ qbittorrent-3.1.11/debian/patches/series	2015-08-12 17:04:11.000000000 -0400
@@ -1 +1,2 @@
 honor-buildflags.patch
+gcc5.patch

Reply via email to