summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-09-30 22:09:29 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-09-30 22:09:29 +0100
commitdbec6742130b46eed6a2b1943a1af76e46a1fdbf (patch)
tree11f7cf37da47d9b918bf6c038d56c7ce52c60a3b /dev-qt
parentnet-misc/openssh-8.4_p1: Version bump (no X509 support yet) (diff)
downloadgentoo-dbec6742130b46eed6a2b1943a1af76e46a1fdbf.tar.gz
gentoo-dbec6742130b46eed6a2b1943a1af76e46a1fdbf.tar.bz2
gentoo-dbec6742130b46eed6a2b1943a1af76e46a1fdbf.zip
dev-qt/qtstyleplugins: New package
Closes: https://bugs.gentoo.org/579880 Package-Manager: Portage-3.0.6, Repoman-3.0.1 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtstyleplugins/Manifest1
-rw-r--r--dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch47
-rw-r--r--dev-qt/qtstyleplugins/metadata.xml11
-rw-r--r--dev-qt/qtstyleplugins/qtstyleplugins-5.0.0_p20170311.ebuild46
4 files changed, 105 insertions, 0 deletions
diff --git a/dev-qt/qtstyleplugins/Manifest b/dev-qt/qtstyleplugins/Manifest
new file mode 100644
index 000000000000..2e8f46bed53d
--- /dev/null
+++ b/dev-qt/qtstyleplugins/Manifest
@@ -0,0 +1 @@
+DIST qtstyleplugins-5.0.0_p20170311.tar.gz 306394 BLAKE2B a59343602062ec1d0f215acf568322a5be874552b0c03dec75f268cec2123b1baa30bee524e36c9d522a8c935a58f204b5362feaf028df87ca10ea01dd29b3fb SHA512 e8c2d0e9c6b0a47cab04ffd2e9384606638905b63a7c1580f9b629bbcc84ebff19743363ffee3dbd31c3de1dcda684211ad3052932b5aa0081e529afd9cbb14d
diff --git a/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch b/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch
new file mode 100644
index 000000000000..caedd05baa83
--- /dev/null
+++ b/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch
@@ -0,0 +1,47 @@
+From: Fabian Vogt <fvogt@suse.de>
+Subject: Fix build against Qt 5.15
+
+With 0a93db4d82c051164923a10e4382b12de9049b45
+("Unify application palette handling between QGuiApplication and QApplication")
+QApplicationPrivate::setSystemPalette does no longer exist.
+
+This style does explictly not support "system colors" defined by the platform
+theme, which have priority over the style provided palette. To prevent the
+theme from overriding the colors, it previously used the system palette
+mechanism (which has priority over the theme), but that way does not work
+anymore. Instead, simply use QApplication::setPalette. While that has
+different behaviour and might break in some applications, it's better than
+having a completely messed up palette with certain themes.
+This is the same change as suggested by gamezelda on
+https://aur.archlinux.org/packages/qt5-styleplugins/#comment-749190.
+
+Index: qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle.cpp
+===================================================================
+--- qtstyleplugins-opensource-src-5.0.0+git20170311.orig/src/plugins/styles/gtk2/qgtkstyle.cpp
++++ qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle.cpp
+@@ -440,7 +440,11 @@ void QGtkStyle::polish(QApplication *app
+ // not supported as these should be entirely determined by
+ // current Gtk settings
+ if (app->desktopSettingsAware() && d->isThemeAvailable()) {
++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
+ QApplicationPrivate::setSystemPalette(standardPalette());
++#else
++ QApplication::setPalette(standardPalette());
++#endif
+ QApplicationPrivate::setSystemFont(d->getThemeFont());
+ d->applyCustomPaletteHash();
+ if (!d->isKDE4Session())
+Index: qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle_p.cpp
+===================================================================
+--- qtstyleplugins-opensource-src-5.0.0+git20170311.orig/src/plugins/styles/gtk2/qgtkstyle_p.cpp
++++ qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle_p.cpp
+@@ -508,7 +508,9 @@ void QGtkStyleUpdateScheduler::updateThe
+ if (oldTheme != QGtkStylePrivate::getThemeName()) {
+ oldTheme = QGtkStylePrivate::getThemeName();
+ QPalette newPalette = qApp->style()->standardPalette();
++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
+ QApplicationPrivate::setSystemPalette(newPalette);
++#endif
+ QApplication::setPalette(newPalette);
+ if (!QGtkStylePrivate::instances.isEmpty()) {
+ QGtkStylePrivate::instances.last()->initGtkWidgets();
diff --git a/dev-qt/qtstyleplugins/metadata.xml b/dev-qt/qtstyleplugins/metadata.xml
new file mode 100644
index 000000000000..dc9c7c4c678b
--- /dev/null
+++ b/dev-qt/qtstyleplugins/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chewi@gentoo.org</email>
+ <name>James Le Cuirot</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">qt/qtstyleplugins</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtstyleplugins/qtstyleplugins-5.0.0_p20170311.ebuild b/dev-qt/qtstyleplugins/qtstyleplugins-5.0.0_p20170311.ebuild
new file mode 100644
index 000000000000..24e7e83cdc2f
--- /dev/null
+++ b/dev-qt/qtstyleplugins/qtstyleplugins-5.0.0_p20170311.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit qmake-utils
+
+COMMIT="335dbece103e2cbf6c7cf819ab6672c2956b17b3"
+DESCRIPTION="Additional style plugins for Qt5 (gtk2, cleanlook, plastic, motif)"
+HOMEPAGE="https://github.com/qt/qtstyleplugins"
+SRC_URI="https://github.com/qt/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+LICENSE="LGPL-2.1"
+SLOT="5"
+KEYWORDS="~amd64"
+
+DEPEND="
+ dev-qt/qtcore:5=
+ dev-qt/qtgui:5=
+ dev-qt/qtwidgets:5=
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/pango
+"
+
+RDEPEND="
+ ${DEPEND}
+"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+PATCHES=(
+ "${FILESDIR}"/fix-build-qt5.15.patch
+)
+
+src_configure() {
+ eqmake5
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+}
+
+pkg_postinst() {
+ elog "To make Qt5 use the gtk2 style, set this in your environment:"
+ elog " QT_QPA_PLATFORMTHEME=gtk2"
+}