[neon/qt/qtwebengine/Neon/testing] debian: Add a patch to compile pdf examples

Dmitry Shachnev null at kde.org
Wed May 19 11:53:42 BST 2021


Git commit 8f6f566c100652286fc6f241fca7d0f61595dda7 by Dmitry Shachnev, on behalf of Alexander Volkov.
Committed on 06/10/2020 at 13:06.
Pushed by sitter into branch 'Neon/testing'.

Add a patch to compile pdf examples

Also add a build dependency on libqt5svg5-dev that they require.

M  +4    -0    debian/changelog
M  +1    -0    debian/control
A  +82   -0    debian/patches/compile-pdf-examples.patch
M  +1    -0    debian/patches/series
M  +1    -0    debian/qtpdf5-examples.install

https://invent.kde.org/neon/qt/qtwebengine/commit/8f6f566c100652286fc6f241fca7d0f61595dda7

diff --git a/debian/changelog b/debian/changelog
index 346f766..c0d1769 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ qtwebengine-opensource-src (5.15.1+dfsg-4) UNRELEASED; urgency=medium
   * Backport upstream fix for nullptr dereference in RTCPeerConnectionHandler
     (see QTBUG-86752).
 
+  [ Alexander Volkov ]
+  * Add a patch to compile pdf examples.
+  * Also add a build dependency on libqt5svg5-dev that they require.
+
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 02 Oct 2020 14:45:41 +0300
 
 qtwebengine-opensource-src (5.15.1+dfsg-3) experimental; urgency=medium
diff --git a/debian/control b/debian/control
index aa548a6..a323d71 100644
--- a/debian/control
+++ b/debian/control
@@ -44,6 +44,7 @@ Build-Depends: binutils (>= 2.32-8~),
                libprotobuf-dev,
                libpulse-dev,
                libqt5opengl5-dev (>= 5.15.1+dfsg~),
+               libqt5svg5-dev (>= 5.15.1~),
                libqt5webchannel5-dev (>= 5.15.1~),
                libre2-dev,
                libsnappy-dev,
diff --git a/debian/patches/compile-pdf-examples.patch b/debian/patches/compile-pdf-examples.patch
new file mode 100644
index 0000000..e815e90
--- /dev/null
+++ b/debian/patches/compile-pdf-examples.patch
@@ -0,0 +1,82 @@
+Description: Compile pdf examples
+ Fix typo in examples.pro and update related pro files.
+Origin: upstream, https://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d8c7d966b1ca87ee
+Last-Update: 2020-10-06
+
+--- a/examples/examples.pro
++++ b/examples/examples.pro
+@@ -20,6 +20,6 @@ qtConfig(build-qtwebengine-core):qtConfi
+ }
+ 
+ qtConfig(build-qtpdf):qtConfig(webengine-qtpdf-support) {
+-    SUDIRS += pdf
++    SUBDIRS += pdf
+     qtConfig(pdf-widgets): SUBDIRS += pdfwidgets
+ }
+--- a/examples/pdf/multipage/main.cpp
++++ b/examples/pdf/multipage/main.cpp
+@@ -48,7 +48,7 @@
+ **
+ ****************************************************************************/
+ 
+-#include <QApplication>
++#include <QGuiApplication>
+ #include <QQmlApplicationEngine>
+ 
+ int main(int argc, char* argv[])
+@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
+     QCoreApplication::setOrganizationName("QtProject");
+     QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+     QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+-    QApplication app(argc, argv);
++    QGuiApplication app(argc, argv);
+ 
+     QQmlApplicationEngine engine;
+     engine.load(QUrl(QStringLiteral("qrc:///pdfviewer/viewer.qml")));
+--- a/examples/pdf/multipage/multipage.pro
++++ b/examples/pdf/multipage/multipage.pro
+@@ -1,6 +1,6 @@
+ TEMPLATE = app
+ 
+-QT += qml quick pdf widgets svg
++QT += qml quick pdf svg
+ 
+ SOURCES += main.cpp
+ 
+--- a/examples/pdf/pdf.pro
++++ b/examples/pdf/pdf.pro
+@@ -1,3 +1,3 @@
+ TEMPLATE=subdirs
+ 
+-SUBDIRS += pdfviewer multipage
++qtHaveModule(svg): SUBDIRS += pdfviewer multipage
+--- a/examples/pdf/pdfviewer/main.cpp
++++ b/examples/pdf/pdfviewer/main.cpp
+@@ -48,7 +48,7 @@
+ **
+ ****************************************************************************/
+ 
+-#include <QApplication>
++#include <QGuiApplication>
+ #include <QQmlApplicationEngine>
+ 
+ int main(int argc, char* argv[])
+@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
+     QCoreApplication::setOrganizationName("QtProject");
+     QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+     QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+-    QApplication app(argc, argv);
++    QGuiApplication app(argc, argv);
+ 
+     QQmlApplicationEngine engine;
+     engine.load(QUrl(QStringLiteral("qrc:///pdfviewer/viewer.qml")));
+--- a/examples/pdf/pdfviewer/pdfviewer.pro
++++ b/examples/pdf/pdfviewer/pdfviewer.pro
+@@ -1,6 +1,6 @@
+ TEMPLATE = app
+ 
+-QT += qml quick pdf widgets svg
++QT += qml quick pdf svg
+ 
+ SOURCES += main.cpp
+ 
diff --git a/debian/patches/series b/debian/patches/series
index a59cddf..19291d5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ mipsel-link-atomic.patch
 sandbox-time64-syscalls.patch
 mipsel-code-range-size.patch
 webrtc-crash.patch
+compile-pdf-examples.patch
diff --git a/debian/qtpdf5-examples.install b/debian/qtpdf5-examples.install
index 99ff52c..5dd5130 100644
--- a/debian/qtpdf5-examples.install
+++ b/debian/qtpdf5-examples.install
@@ -1 +1,2 @@
+usr/lib/${DEB_HOST_MULTIARCH}/qt5/examples/pdf/*
 usr/lib/${DEB_HOST_MULTIARCH}/qt5/examples/pdfwidgets/*



More information about the Neon-commits mailing list