1 |
commit: e2d24bb6db29ecfc80eb18b32e8dab583f5163e3 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 12 16:09:32 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 12 16:20:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2d24bb6 |
7 |
|
8 |
dev-qt/qtprintsupport: Fix revdeps segfault if built with USE=-cups |
9 |
|
10 |
Tested-by: David Flogeras <dflogeras2 <AT> gmail.com> |
11 |
Thanks-to: David Flogeras <dflogeras2 <AT> gmail.com> |
12 |
Closes: https://bugs.gentoo.org/704936 |
13 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
.../files/qtprintsupport-5.13.2-no-cups.patch | 49 ++++++++++++++++++++++ |
17 |
.../qtprintsupport/qtprintsupport-5.13.2-r1.ebuild | 44 +++++++++++++++++++ |
18 |
.../qtprintsupport/qtprintsupport-5.14.0-r1.ebuild | 44 +++++++++++++++++++ |
19 |
3 files changed, 137 insertions(+) |
20 |
|
21 |
diff --git a/dev-qt/qtprintsupport/files/qtprintsupport-5.13.2-no-cups.patch b/dev-qt/qtprintsupport/files/qtprintsupport-5.13.2-no-cups.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..fe19baf4096 |
24 |
--- /dev/null |
25 |
+++ b/dev-qt/qtprintsupport/files/qtprintsupport-5.13.2-no-cups.patch |
26 |
@@ -0,0 +1,49 @@ |
27 |
+From 2ad3348031d8a622374920eac5bdd8fb9ecefcd7 Mon Sep 17 00:00:00 2001 |
28 |
+From: Christian Ehrlicher <ch.ehrlicher@×××.de> |
29 |
+Date: Sat, 21 Dec 2019 19:57:45 +0100 |
30 |
+Subject: QPrintDialog: don't access dangling pointer when cups is disabled |
31 |
+ |
32 |
+When no cups support is available, ui.pagesRadioButton is destroyed in |
33 |
+QPrintDialogPrivate::init() but was accessed later on. Fix it by moving |
34 |
+the cups check one line above. |
35 |
+ |
36 |
+Fixes: QTBUG-80945 |
37 |
+Change-Id: Ieb062b39e1461f39665ef612dfea1d7757274b7e |
38 |
+Reviewed-by: Timur Pocheptsov <timur.pocheptsov@××.io> |
39 |
+--- |
40 |
+ src/printsupport/dialogs/qprintdialog_unix.cpp | 8 +++++--- |
41 |
+ 1 file changed, 5 insertions(+), 3 deletions(-) |
42 |
+ |
43 |
+diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp |
44 |
+index c7328d9732..7bbf137977 100644 |
45 |
+--- a/src/printsupport/dialogs/qprintdialog_unix.cpp |
46 |
++++ b/src/printsupport/dialogs/qprintdialog_unix.cpp |
47 |
+@@ -637,8 +637,10 @@ void QPrintDialogPrivate::init() |
48 |
+ options.pageSetCombo->addItem(tr("Odd Pages"), QVariant::fromValue(QCUPSSupport::OddPages)); |
49 |
+ options.pageSetCombo->addItem(tr("Even Pages"), QVariant::fromValue(QCUPSSupport::EvenPages)); |
50 |
+ #else |
51 |
+- for (int i = options.pagesLayout->count() - 1; i >= 0; --i) |
52 |
+- delete options.pagesLayout->itemAt(i)->widget(); |
53 |
++ delete options.pagesRadioButton; |
54 |
++ delete options.pagesLineEdit; |
55 |
++ options.pagesRadioButton = nullptr; |
56 |
++ options.pagesLineEdit = nullptr; |
57 |
+ #endif |
58 |
+ |
59 |
+ top->d->setOptionsPane(this); |
60 |
+@@ -727,12 +729,12 @@ void QPrintDialogPrivate::selectPrinter(const QPrinter::OutputFormat outputForma |
61 |
+ else |
62 |
+ options.pageSetCombo->setEnabled(true); |
63 |
+ |
64 |
++#if QT_CONFIG(cups) |
65 |
+ // Disable complex page ranges widget when printing to pdf |
66 |
+ // It doesn't work since it relies on cups to do the heavy lifting and cups |
67 |
+ // is not used when printing to PDF |
68 |
+ options.pagesRadioButton->setEnabled(outputFormat != QPrinter::PdfFormat); |
69 |
+ |
70 |
+-#if QT_CONFIG(cups) |
71 |
+ // Disable color options on main dialog if not printing to file, it will be handled by CUPS advanced dialog |
72 |
+ options.colorMode->setVisible(outputFormat == QPrinter::PdfFormat); |
73 |
+ #endif |
74 |
+-- |
75 |
+cgit v1.2.1 |
76 |
|
77 |
diff --git a/dev-qt/qtprintsupport/qtprintsupport-5.13.2-r1.ebuild b/dev-qt/qtprintsupport/qtprintsupport-5.13.2-r1.ebuild |
78 |
new file mode 100644 |
79 |
index 00000000000..7ce0cf6ddbd |
80 |
--- /dev/null |
81 |
+++ b/dev-qt/qtprintsupport/qtprintsupport-5.13.2-r1.ebuild |
82 |
@@ -0,0 +1,44 @@ |
83 |
+# Copyright 1999-2020 Gentoo Authors |
84 |
+# Distributed under the terms of the GNU General Public License v2 |
85 |
+ |
86 |
+EAPI=7 |
87 |
+QT5_MODULE="qtbase" |
88 |
+VIRTUALX_REQUIRED="test" |
89 |
+inherit qt5-build |
90 |
+ |
91 |
+DESCRIPTION="Printing support library for the Qt5 framework" |
92 |
+ |
93 |
+if [[ ${QT5_BUILD_TYPE} == release ]]; then |
94 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
95 |
+fi |
96 |
+ |
97 |
+IUSE="cups gles2" |
98 |
+ |
99 |
+RDEPEND=" |
100 |
+ ~dev-qt/qtcore-${PV} |
101 |
+ ~dev-qt/qtgui-${PV}[gles2=] |
102 |
+ ~dev-qt/qtwidgets-${PV}[gles2=] |
103 |
+ cups? ( >=net-print/cups-1.4 ) |
104 |
+" |
105 |
+DEPEND="${RDEPEND} |
106 |
+ test? ( ~dev-qt/qtnetwork-${PV} ) |
107 |
+" |
108 |
+ |
109 |
+QT5_TARGET_SUBDIRS=( |
110 |
+ src/printsupport |
111 |
+ src/plugins/printsupport |
112 |
+) |
113 |
+ |
114 |
+QT5_GENTOO_CONFIG=( |
115 |
+ cups |
116 |
+) |
117 |
+ |
118 |
+PATCHES=( "${FILESDIR}/${P}-no-cups.patch" ) # bug #704936, QTBUG-80945 |
119 |
+ |
120 |
+src_configure() { |
121 |
+ local myconf=( |
122 |
+ $(qt_use cups) |
123 |
+ -opengl $(usex gles2 es2 desktop) |
124 |
+ ) |
125 |
+ qt5-build_src_configure |
126 |
+} |
127 |
|
128 |
diff --git a/dev-qt/qtprintsupport/qtprintsupport-5.14.0-r1.ebuild b/dev-qt/qtprintsupport/qtprintsupport-5.14.0-r1.ebuild |
129 |
new file mode 100644 |
130 |
index 00000000000..b9cb036a03b |
131 |
--- /dev/null |
132 |
+++ b/dev-qt/qtprintsupport/qtprintsupport-5.14.0-r1.ebuild |
133 |
@@ -0,0 +1,44 @@ |
134 |
+# Copyright 1999-2020 Gentoo Authors |
135 |
+# Distributed under the terms of the GNU General Public License v2 |
136 |
+ |
137 |
+EAPI=7 |
138 |
+QT5_MODULE="qtbase" |
139 |
+VIRTUALX_REQUIRED="test" |
140 |
+inherit qt5-build |
141 |
+ |
142 |
+DESCRIPTION="Printing support library for the Qt5 framework" |
143 |
+ |
144 |
+if [[ ${QT5_BUILD_TYPE} == release ]]; then |
145 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
146 |
+fi |
147 |
+ |
148 |
+IUSE="cups gles2" |
149 |
+ |
150 |
+RDEPEND=" |
151 |
+ ~dev-qt/qtcore-${PV} |
152 |
+ ~dev-qt/qtgui-${PV}[gles2=] |
153 |
+ ~dev-qt/qtwidgets-${PV}[gles2=] |
154 |
+ cups? ( >=net-print/cups-1.4 ) |
155 |
+" |
156 |
+DEPEND="${RDEPEND} |
157 |
+ test? ( ~dev-qt/qtnetwork-${PV} ) |
158 |
+" |
159 |
+ |
160 |
+QT5_TARGET_SUBDIRS=( |
161 |
+ src/printsupport |
162 |
+ src/plugins/printsupport |
163 |
+) |
164 |
+ |
165 |
+QT5_GENTOO_CONFIG=( |
166 |
+ cups |
167 |
+) |
168 |
+ |
169 |
+PATCHES=( "${FILESDIR}/${PN}-5.13.2-no-cups.patch" ) # bug #704936, QTBUG-80945 |
170 |
+ |
171 |
+src_configure() { |
172 |
+ local myconf=( |
173 |
+ $(qt_use cups) |
174 |
+ -opengl $(usex gles2 es2 desktop) |
175 |
+ ) |
176 |
+ qt5-build_src_configure |
177 |
+} |