Hi David,

I have NMUd diffpdf to include the changes to build with Qt5 instead of Qt4; 
the diff of the NMU is attached and I have already pushed these changes to 
git.

regards
Stuart

-- 
Stuart Prescott    http://www.nanonanonano.net/   stu...@nanonanonano.net
Debian Developer   http://www.debian.org/         stu...@debian.org
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
diff -Nru diffpdf-2.1.3/debian/changelog diffpdf-2.1.3/debian/changelog
--- diffpdf-2.1.3/debian/changelog	2016-09-27 18:34:37.000000000 +1000
+++ diffpdf-2.1.3/debian/changelog	2018-01-18 22:42:45.000000000 +1100
@@ -1,3 +1,11 @@
+diffpdf (2.1.3-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Switch build to Qt5 with thanks to Sune Vuorela for the patch
+    (Closes: 874854).
+
+ -- Stuart Prescott <stu...@debian.org>  Thu, 18 Jan 2018 22:42:45 +1100
+
 diffpdf (2.1.3-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru diffpdf-2.1.3/debian/control diffpdf-2.1.3/debian/control
--- diffpdf-2.1.3/debian/control	2016-09-27 18:19:24.000000000 +1000
+++ diffpdf-2.1.3/debian/control	2017-11-26 10:24:14.000000000 +1100
@@ -4,11 +4,11 @@
 Maintainer: David Paleino <da...@debian.org>
 Build-Depends:
  debhelper (>= 9~)
- , qt4-qmake
- , libqt4-dev
- , qt4-linguist-tools
- , libpoppler-qt4-dev
- , libpoppler-cpp-dev
+ , qt5-qmake
+ , libpoppler-qt5-dev
+ , qtbase5-dev,
+ , qttools5-dev,
+ , qttools5-dev-tools,
 Standards-Version: 3.9.5
 Homepage: http://www.qtrac.eu/diffpdf.html
 Vcs-Git: https://anonscm.debian.org/git/collab-maint/diffpdf.git
diff -Nru diffpdf-2.1.3/debian/patches/diffpdf-qt5.patch diffpdf-2.1.3/debian/patches/diffpdf-qt5.patch
--- diffpdf-2.1.3/debian/patches/diffpdf-qt5.patch	1970-01-01 10:00:00.000000000 +1000
+++ diffpdf-2.1.3/debian/patches/diffpdf-qt5.patch	2017-11-26 10:33:27.000000000 +1100
@@ -0,0 +1,173 @@
+Description: Build with Qt5
+ Enough changes to make things build with Qt5
+Author: Sune Vuorela <s...@debian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2017-11-25
+
+--- a/aboutform.cpp
++++ b/aboutform.cpp
+@@ -11,7 +11,6 @@
+ */
+ 
+ #include "aboutform.hpp"
+-#include <poppler-version.h>
+ #include <QApplication>
+ #include <QHBoxLayout>
+ #include <QSettings>
+@@ -52,7 +51,7 @@
+     "</ul>"
+     "I also provide training and consultancy in C++, Go, Python&nbsp;2, "
+     "Python&nbsp;3, C++/Qt, and PyQt4.").arg(qApp->applicationName())
+-            .arg(Version).arg(qVersion()).arg(POPPLER_VERSION));
++            .arg(Version).arg(qVersion()).arg("Qt 5"));
+     QTextBrowser *contributorsBrowser = new QTextBrowser;
+     contributorsBrowser->setReadOnly(true);
+     contributorsBrowser->setHtml(tr("<table>"
+--- a/diffpdf.pro
++++ b/diffpdf.pro
+@@ -31,38 +31,39 @@
+ TRANSLATIONS += diffpdf_de.ts
+ TRANSLATIONS += diffpdf_es.ts
+ CODECFORTR    = UTF-8
+-LIBS	     += -lpoppler-qt4
++LIBS	     += -lpoppler-qt5
+ QMAKE_CFLAGS += $$(CPPFLAGS) $$(CFLAGS)
+ QMAKE_CXXFLAGS += $$(CPPFLAGS) $$(CXXFLAGS)
+ QMAKE_LFLAGS += $$(LDFLAGS)
++QT += widgets printsupport
+ win32 {
+     CONFIG += release
+ }
+ exists($(HOME)/opt/poppler024/) {
+     message(Using locally built Poppler library)
+     INCLUDEPATH += $(HOME)/opt/poppler024/include/poppler/cpp
+-    INCLUDEPATH += $(HOME)/opt/poppler024/include/poppler/qt4
++    INCLUDEPATH += $(HOME)/opt/poppler024/include/poppler/qt5
+     LIBS += -Wl,-rpath -Wl,$(HOME)/opt/poppler024/lib -L$(HOME)/opt/poppler024/lib
+ } else {
+     exists(/poppler_lib) {
+ 	message(Using locally built Poppler library on Windows)
+ 	INCLUDEPATH += /c/poppler_lib/include/poppler/cpp
+-	INCLUDEPATH += /c/poppler_lib/include/poppler/qt4
++	INCLUDEPATH += /c/poppler_lib/include/poppler/qt5
+ 	LIBS += -Wl,-rpath -Wl,/c/poppler_lib/bin -Wl,-L/c/poppler_lib/bin
+     } else {
+-	exists(/usr/include/poppler/qt4) {
++	exists(/usr/include/poppler/qt5) {
+ 	    INCLUDEPATH += /usr/include/poppler/cpp
+-	    INCLUDEPATH += /usr/include/poppler/qt4
++	    INCLUDEPATH += /usr/include/poppler/qt5
+ 	} else {
+ 	    INCLUDEPATH += /usr/local/include/poppler/cpp
+-	    INCLUDEPATH += /usr/local/include/poppler/qt4
++	    INCLUDEPATH += /usr/local/include/poppler/qt5
+ 	}
+     }
+ }
+ #exists($(HOME)/opt/podofo09/) {
+ #    message(Using locally built PoDoFo library)
+ #    INCLUDEPATH += $(HOME)/opt/podofo09/include/poppler/cpp
+-#    INCLUDEPATH += $(HOME)/opt/podofo09/include/poppler/qt4
++#    INCLUDEPATH += $(HOME)/opt/podofo09/include/poppler/qt5
+ #    LIBS += -Wl,-rpath -Wl,$(HOME)/opt/podofo09/lib64 -Wl,-L$(HOME)/opt/podofo09/lib64
+ #} else {
+ #    exists(/usr/include/podofo) {
+--- a/generic.hpp
++++ b/generic.hpp
+@@ -12,7 +12,7 @@
+     for more details.
+ */
+ 
+-#include <poppler-qt4.h>
++#include <poppler-qt5.h>
+ #include <QMetaType>
+ #include <QPair>
+ #include <QPixmap>
+--- a/helpform.cpp
++++ b/helpform.cpp
+@@ -11,7 +11,6 @@
+ */
+ 
+ #include "helpform.hpp"
+-#include <poppler-version.h>
+ #include <QApplication>
+ #include <QFile>
+ #include <QKeySequence>
+--- a/label.cpp
++++ b/label.cpp
+@@ -15,6 +15,7 @@
+ #include <QDragEnterEvent>
+ #include <QDragEnterEvent>
+ #include <QMouseEvent>
++#include <QMimeData>
+ 
+ Label::Label(QWidget *parent) : QLabel(parent)
+ {
+--- a/lineedit.cpp
++++ b/lineedit.cpp
+@@ -14,6 +14,7 @@
+ #include "lineedit.hpp"
+ #include <QDragEnterEvent>
+ #include <QDragEnterEvent>
++#include <QMimeData>
+ 
+ 
+ LineEdit::LineEdit(QWidget *parent) : QLineEdit(parent)
+--- a/main.cpp
++++ b/main.cpp
+@@ -31,7 +31,6 @@
+     app.setOrganizationDomain("qtrac.eu");
+     app.setApplicationName("DiffPDF");
+     app.setWindowIcon(QIcon(":/icon.png"));
+-    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
+ 
+     QTextStream out(stdout);
+     QStringList args = app.arguments().mid(1);
+--- a/mainwindow.hpp
++++ b/mainwindow.hpp
+@@ -19,7 +19,7 @@
+ #else
+ #include <tr1/memory>
+ #endif
+-#include <poppler-qt4.h>
++#include <poppler-qt5.h>
+ #include <QBrush>
+ #include <QList>
+ #include <QMainWindow>
+--- a/optionsform.cpp
++++ b/optionsform.cpp
+@@ -76,9 +76,9 @@
+             << qMakePair(tr("Diagonal \\"), Qt::FDiagPattern)
+             << qMakePair(tr("Diagonal Cross"), Qt::DiagCrossPattern))
+         brushStyleComboBox->addItem(brushSwatch(pair.second, color),
+-                                                pair.first, pair.second);
++                                                pair.first, QVariant::fromValue(pair.second));
+     brushStyleComboBox->setCurrentIndex(brushStyleComboBox->findData(
+-                brush.style()));
++                QVariant::fromValue(brush.style())));
+ 
+     penStyleComboBox = new QComboBox;
+     typedef QPair<QString, Qt::PenStyle> PenPair;
+@@ -90,9 +90,9 @@
+             << qMakePair(tr("Dash-Dotted"), Qt::DashDotLine)
+             << qMakePair(tr("Dash-Dot-Dotted"), Qt::DashDotDotLine))
+         penStyleComboBox->addItem(penStyleSwatch(pair.second, color),
+-                                  pair.first, pair.second);
++                                  pair.first, QVariant::fromValue(pair.second));
+     penStyleComboBox->setCurrentIndex(penStyleComboBox->findData(
+-                pen.style()));
++                QVariant::fromValue(pen.style())));
+ 
+     alphaSpinBox = new QSpinBox;
+     alphaSpinBox->setRange(1, 100);
diff -Nru diffpdf-2.1.3/debian/patches/series diffpdf-2.1.3/debian/patches/series
--- diffpdf-2.1.3/debian/patches/series	2016-09-27 18:26:20.000000000 +1000
+++ diffpdf-2.1.3/debian/patches/series	2017-11-26 10:25:05.000000000 +1100
@@ -1,2 +1,3 @@
 01-fix_manpage.patch
 02-buildflags.patch
+diffpdf-qt5.patch
diff -Nru diffpdf-2.1.3/debian/rules diffpdf-2.1.3/debian/rules
--- diffpdf-2.1.3/debian/rules	2016-09-27 18:17:42.000000000 +1000
+++ diffpdf-2.1.3/debian/rules	2017-11-26 10:28:22.000000000 +1100
@@ -5,9 +5,10 @@
 #export DH_VERBOSE=1
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export QT_SELECT=5
 
 override_dh_auto_build:
-	qmake-qt4 diffpdf.pro
+	qmake diffpdf.pro
 	for i in *.ts; do \
 		lrelease $$i; \
 	done

Reply via email to