1 |
commit: dbec6742130b46eed6a2b1943a1af76e46a1fdbf |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 30 21:09:29 2020 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 30 21:09:29 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbec6742 |
7 |
|
8 |
dev-qt/qtstyleplugins: New package |
9 |
|
10 |
Closes: https://bugs.gentoo.org/579880 |
11 |
Package-Manager: Portage-3.0.6, Repoman-3.0.1 |
12 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
13 |
|
14 |
dev-qt/qtstyleplugins/Manifest | 1 + |
15 |
dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch | 47 ++++++++++++++++++++++ |
16 |
dev-qt/qtstyleplugins/metadata.xml | 11 +++++ |
17 |
.../qtstyleplugins-5.0.0_p20170311.ebuild | 46 +++++++++++++++++++++ |
18 |
4 files changed, 105 insertions(+) |
19 |
|
20 |
diff --git a/dev-qt/qtstyleplugins/Manifest b/dev-qt/qtstyleplugins/Manifest |
21 |
new file mode 100644 |
22 |
index 00000000000..2e8f46bed53 |
23 |
--- /dev/null |
24 |
+++ b/dev-qt/qtstyleplugins/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST qtstyleplugins-5.0.0_p20170311.tar.gz 306394 BLAKE2B a59343602062ec1d0f215acf568322a5be874552b0c03dec75f268cec2123b1baa30bee524e36c9d522a8c935a58f204b5362feaf028df87ca10ea01dd29b3fb SHA512 e8c2d0e9c6b0a47cab04ffd2e9384606638905b63a7c1580f9b629bbcc84ebff19743363ffee3dbd31c3de1dcda684211ad3052932b5aa0081e529afd9cbb14d |
27 |
|
28 |
diff --git a/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch b/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..caedd05baa8 |
31 |
--- /dev/null |
32 |
+++ b/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch |
33 |
@@ -0,0 +1,47 @@ |
34 |
+From: Fabian Vogt <fvogt@××××.de> |
35 |
+Subject: Fix build against Qt 5.15 |
36 |
+ |
37 |
+With 0a93db4d82c051164923a10e4382b12de9049b45 |
38 |
+("Unify application palette handling between QGuiApplication and QApplication") |
39 |
+QApplicationPrivate::setSystemPalette does no longer exist. |
40 |
+ |
41 |
+This style does explictly not support "system colors" defined by the platform |
42 |
+theme, which have priority over the style provided palette. To prevent the |
43 |
+theme from overriding the colors, it previously used the system palette |
44 |
+mechanism (which has priority over the theme), but that way does not work |
45 |
+anymore. Instead, simply use QApplication::setPalette. While that has |
46 |
+different behaviour and might break in some applications, it's better than |
47 |
+having a completely messed up palette with certain themes. |
48 |
+This is the same change as suggested by gamezelda on |
49 |
+https://aur.archlinux.org/packages/qt5-styleplugins/#comment-749190. |
50 |
+ |
51 |
+Index: qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle.cpp |
52 |
+=================================================================== |
53 |
+--- qtstyleplugins-opensource-src-5.0.0+git20170311.orig/src/plugins/styles/gtk2/qgtkstyle.cpp |
54 |
++++ qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle.cpp |
55 |
+@@ -440,7 +440,11 @@ void QGtkStyle::polish(QApplication *app |
56 |
+ // not supported as these should be entirely determined by |
57 |
+ // current Gtk settings |
58 |
+ if (app->desktopSettingsAware() && d->isThemeAvailable()) { |
59 |
++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) |
60 |
+ QApplicationPrivate::setSystemPalette(standardPalette()); |
61 |
++#else |
62 |
++ QApplication::setPalette(standardPalette()); |
63 |
++#endif |
64 |
+ QApplicationPrivate::setSystemFont(d->getThemeFont()); |
65 |
+ d->applyCustomPaletteHash(); |
66 |
+ if (!d->isKDE4Session()) |
67 |
+Index: qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle_p.cpp |
68 |
+=================================================================== |
69 |
+--- qtstyleplugins-opensource-src-5.0.0+git20170311.orig/src/plugins/styles/gtk2/qgtkstyle_p.cpp |
70 |
++++ qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle_p.cpp |
71 |
+@@ -508,7 +508,9 @@ void QGtkStyleUpdateScheduler::updateThe |
72 |
+ if (oldTheme != QGtkStylePrivate::getThemeName()) { |
73 |
+ oldTheme = QGtkStylePrivate::getThemeName(); |
74 |
+ QPalette newPalette = qApp->style()->standardPalette(); |
75 |
++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) |
76 |
+ QApplicationPrivate::setSystemPalette(newPalette); |
77 |
++#endif |
78 |
+ QApplication::setPalette(newPalette); |
79 |
+ if (!QGtkStylePrivate::instances.isEmpty()) { |
80 |
+ QGtkStylePrivate::instances.last()->initGtkWidgets(); |
81 |
|
82 |
diff --git a/dev-qt/qtstyleplugins/metadata.xml b/dev-qt/qtstyleplugins/metadata.xml |
83 |
new file mode 100644 |
84 |
index 00000000000..dc9c7c4c678 |
85 |
--- /dev/null |
86 |
+++ b/dev-qt/qtstyleplugins/metadata.xml |
87 |
@@ -0,0 +1,11 @@ |
88 |
+<?xml version="1.0" encoding="UTF-8"?> |
89 |
+<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'> |
90 |
+<pkgmetadata> |
91 |
+ <maintainer type="person"> |
92 |
+ <email>chewi@g.o</email> |
93 |
+ <name>James Le Cuirot</name> |
94 |
+ </maintainer> |
95 |
+ <upstream> |
96 |
+ <remote-id type="github">qt/qtstyleplugins</remote-id> |
97 |
+ </upstream> |
98 |
+</pkgmetadata> |
99 |
|
100 |
diff --git a/dev-qt/qtstyleplugins/qtstyleplugins-5.0.0_p20170311.ebuild b/dev-qt/qtstyleplugins/qtstyleplugins-5.0.0_p20170311.ebuild |
101 |
new file mode 100644 |
102 |
index 00000000000..24e7e83cdc2 |
103 |
--- /dev/null |
104 |
+++ b/dev-qt/qtstyleplugins/qtstyleplugins-5.0.0_p20170311.ebuild |
105 |
@@ -0,0 +1,46 @@ |
106 |
+# Copyright 1999-2020 Gentoo Authors |
107 |
+# Distributed under the terms of the GNU General Public License v2 |
108 |
+ |
109 |
+EAPI=7 |
110 |
+ |
111 |
+inherit qmake-utils |
112 |
+ |
113 |
+COMMIT="335dbece103e2cbf6c7cf819ab6672c2956b17b3" |
114 |
+DESCRIPTION="Additional style plugins for Qt5 (gtk2, cleanlook, plastic, motif)" |
115 |
+HOMEPAGE="https://github.com/qt/qtstyleplugins" |
116 |
+SRC_URI="https://github.com/qt/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" |
117 |
+LICENSE="LGPL-2.1" |
118 |
+SLOT="5" |
119 |
+KEYWORDS="~amd64" |
120 |
+ |
121 |
+DEPEND=" |
122 |
+ dev-qt/qtcore:5= |
123 |
+ dev-qt/qtgui:5= |
124 |
+ dev-qt/qtwidgets:5= |
125 |
+ x11-libs/gtk+:2 |
126 |
+ x11-libs/libX11 |
127 |
+ x11-libs/pango |
128 |
+" |
129 |
+ |
130 |
+RDEPEND=" |
131 |
+ ${DEPEND} |
132 |
+" |
133 |
+ |
134 |
+S="${WORKDIR}/${PN}-${COMMIT}" |
135 |
+ |
136 |
+PATCHES=( |
137 |
+ "${FILESDIR}"/fix-build-qt5.15.patch |
138 |
+) |
139 |
+ |
140 |
+src_configure() { |
141 |
+ eqmake5 |
142 |
+} |
143 |
+ |
144 |
+src_install() { |
145 |
+ emake INSTALL_ROOT="${D}" install |
146 |
+} |
147 |
+ |
148 |
+pkg_postinst() { |
149 |
+ elog "To make Qt5 use the gtk2 style, set this in your environment:" |
150 |
+ elog " QT_QPA_PLATFORMTHEME=gtk2" |
151 |
+} |