Control: tags -1 + patch
On Saturday, 25 November 2017 09:52:17 AEDT Stuart Prescott wrote:
> In the absence of either a new upstream appearing or a new maintainer for
> Qt4 appearing, it is perhaps sadly time to remove these packages from
> Debian.
Having shaken that tree, Sune Vuorela produced a patch that ports diffpdf to
Qt5... thanks!
Sune's patch for the upstream code is attached (diffpdf-qt5.patch). I've
incorporated that into a patch series that also switches the packaging to use
Qt5.
I'm happy to push these changes to git and upload if you'd like.
cheers
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
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
--- diffpdf-2.1.3.orig/aboutform.cpp
+++ diffpdf-2.1.3/aboutform.cpp
@@ -11,7 +11,6 @@
*/
#include "aboutform.hpp"
-#include <poppler-version.h>
#include <QApplication>
#include <QHBoxLayout>
#include <QSettings>
@@ -52,7 +51,7 @@ AboutForm::AboutForm(QWidget *parent) :
"</ul>"
"I also provide training and consultancy in C++, Go, Python 2, "
"Python 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>"
--- diffpdf-2.1.3.orig/diffpdf.pro
+++ diffpdf-2.1.3/diffpdf.pro
@@ -31,38 +31,39 @@ TRANSLATIONS += diffpdf_fr.ts
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) {
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) {
--- diffpdf-2.1.3.orig/generic.hpp
+++ diffpdf-2.1.3/generic.hpp
@@ -12,7 +12,7 @@
for more details.
*/
-#include <poppler-qt4.h>
+#include <poppler-qt5.h>
#include <QMetaType>
#include <QPair>
#include <QPixmap>
--- diffpdf-2.1.3.orig/helpform.cpp
+++ diffpdf-2.1.3/helpform.cpp
@@ -11,7 +11,6 @@
*/
#include "helpform.hpp"
-#include <poppler-version.h>
#include <QApplication>
#include <QFile>
#include <QKeySequence>
--- diffpdf-2.1.3.orig/label.cpp
+++ diffpdf-2.1.3/label.cpp
@@ -15,6 +15,7 @@
#include <QDragEnterEvent>
#include <QDragEnterEvent>
#include <QMouseEvent>
+#include <QMimeData>
Label::Label(QWidget *parent) : QLabel(parent)
{
--- diffpdf-2.1.3.orig/lineedit.cpp
+++ diffpdf-2.1.3/lineedit.cpp
@@ -14,6 +14,7 @@
#include "lineedit.hpp"
#include <QDragEnterEvent>
#include <QDragEnterEvent>
+#include <QMimeData>
LineEdit::LineEdit(QWidget *parent) : QLineEdit(parent)
--- diffpdf-2.1.3.orig/main.cpp
+++ diffpdf-2.1.3/main.cpp
@@ -31,7 +31,6 @@ int main(int argc, char *argv[])
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);
--- diffpdf-2.1.3.orig/mainwindow.hpp
+++ diffpdf-2.1.3/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>
--- diffpdf-2.1.3.orig/optionsform.cpp
+++ diffpdf-2.1.3/optionsform.cpp
@@ -76,9 +76,9 @@ void OptionsForm::createWidgets()
<< 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 @@ void OptionsForm::createWidgets()
<< 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);
>From 7e10411374a6dc37a8cbe56b0c854bae6074e4dc Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 10:41:19 +1100
Subject: [PATCH 1/3] Add patch to port upstream from Qt4 to Qt5
Thanks to Sune Vuorela for creating the patch
---
debian/patches/diffpdf-qt5.patch | 173 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 174 insertions(+)
create mode 100644 debian/patches/diffpdf-qt5.patch
diff --git a/debian/patches/diffpdf-qt5.patch b/debian/patches/diffpdf-qt5.patch
new file mode 100644
index 0000000..2bf8629
--- /dev/null
+++ b/debian/patches/diffpdf-qt5.patch
@@ -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 2, "
+ "Python 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 --git a/debian/patches/series b/debian/patches/series
index 8723dc1..1c312c8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
01-fix_manpage.patch
02-buildflags.patch
+diffpdf-qt5.patch
--
2.11.0
>From d490060cb8cab727a543cfee977881f671ce7588 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 10:42:22 +1100
Subject: [PATCH 2/3] Update packaging to Qt5
---
debian/control | 10 +++++-----
debian/rules | 3 ++-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/debian/control b/debian/control
index 0fa02ab..81c3562 100644
--- a/debian/control
+++ b/debian/control
@@ -4,11 +4,11 @@ Priority: optional
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 --git a/debian/rules b/debian/rules
index 39a2020..703bb35 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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
--
2.11.0
>From fe9886c76e015995f94b6b8291622839eba8553d Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 10:42:38 +1100
Subject: [PATCH 3/3] Add changelog for WIP
---
debian/changelog | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 8cdf311..e43fdc3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+diffpdf (2.1.3-1.2) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Switch build to Qt5 with thanks to Sune Vuorela for the patch.
+
+ -- Stuart Prescott <stu...@debian.org> Sun, 26 Nov 2017 10:25:07 +1100
+
diffpdf (2.1.3-1.1) unstable; urgency=medium
* Non-maintainer upload.
--
2.11.0