summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-11-29 20:26:36 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-11-29 21:50:21 +0100
commit86fcda6b6820db801a0faa240e0dbc73a1e2e9bb (patch)
treee7b1e20b2ef2807b05f67186a46658520b28a82f
parentdev-qt/qtgraphicaleffects: 5.15.7 version bump (diff)
downloadgentoo-86fcda6b6820db801a0faa240e0dbc73a1e2e9bb.tar.gz
gentoo-86fcda6b6820db801a0faa240e0dbc73a1e2e9bb.tar.bz2
gentoo-86fcda6b6820db801a0faa240e0dbc73a1e2e9bb.zip
dev-qt/qtgui: 5.15.7 version bump
- Add upstream pending fix https://invent.kde.org/qt/qt/qtbase/-/merge_requests/211 - Apply downstream workaround for QT_CONFIG(dbus) not working right now https://github.com/gentoo/qt/pull/260#issue-1366402992 Bug: https://bugs.gentoo.org/875959 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--dev-qt/qtgui/Manifest3
-rw-r--r--dev-qt/qtgui/files/qtgui-5.15.7-fix-no-dbus.patch94
-rw-r--r--dev-qt/qtgui/files/qtgui-5.15.7-xcb-correctly-disconnect-xsettings-callbacks.patch64
-rw-r--r--dev-qt/qtgui/qtgui-5.15.7.ebuild185
4 files changed, 346 insertions, 0 deletions
diff --git a/dev-qt/qtgui/Manifest b/dev-qt/qtgui/Manifest
index 88d6a49f0581..5bfde5e5b772 100644
--- a/dev-qt/qtgui/Manifest
+++ b/dev-qt/qtgui/Manifest
@@ -1,3 +1,6 @@
DIST qtbase-5.15-gentoo-patchset-1.tar.xz 4204 BLAKE2B 1399eb6f4c776d370e1837351a72b604440658a3a2d1bd0c725b9ef149b09d236347f5f4b37f652c33310048a0a7df54e24453b404dc45507fd4f7c5fdf144cd SHA512 c857fc746bacb047321cdb762f3c7c48ce2a0d24045a9e708edd38532568dbbc74e9e971425a72a3c2a5ca0662b3e6333831f6c1b7746525b99d46000b63111f
+DIST qtbase-5.15-gentoo-patchset-2.tar.xz 3844 BLAKE2B 6dcb69398cf8a6b1be737e8c7bf1041529c4e704ca892cef10ba3bc5ce435c903607b64e981cf8aa12c785b3e423aa1d52bce1f67ec1bd8dbb1421dfb6f62700 SHA512 b7fd7e17bcab2f9803c7bfc0473082ee4640299c23ce8da943ef80ed181e880ebc9157bcebde28077e80e6f907aa14a59c42416b3e32f49baebd54fbe5a37497
DIST qtbase-5.15.5-gentoo-kde-2.tar.xz 526240 BLAKE2B 68ecca0805c2ea0b29b65706b0c03a3ead1d106e089f2a48a988035842d0cc8ac67d950cbc67ae8f8be860fd11443579d3e06bfe96a2e3161f94e07206d2815e SHA512 d877a2eb4cd05b712a7db6a943f955d3ced88f51efe3e29b2d6716fba4da08398dbd2ed580ca5b9bfbd92a5a20e34451e06a324274447d4b3692b25af4ff8ddf
+DIST qtbase-5.15.7-gentoo-kde-1.tar.xz 798056 BLAKE2B 3c7fefa65ab6de25c2c82261ad0f1371e32acd4bd4b3303f20a5ebf36d19690df94290d102c65e4941a6c51a5d5f2db0253bafca5ac85cf480f7434405cb2671 SHA512 20ab17220489009c98d7f783a02614507e157974c7cb16f47d50d3954ccd1cd065562effc393df6e07c9ba6ad8ccd4e6b3f0bf5b5b890183b8631b8b570bf064
DIST qtbase-everywhere-opensource-src-5.15.5.tar.xz 50247388 BLAKE2B e9bbfe8e73e6f25ccadeef722818b5aeb82d1f136bec21fcbc3b26bf76044b38f25c7268010c648e1161e9b61013b8b775f17b9fdcfdd70402bdfbf70bf7f9d5 SHA512 ce80eedc88abbd5a200bacc10a8e94adc1ef2122ac220715ba084adf1e32d67f2dc66168503de5fb5b5a6ab15f7a75ca23dc9956aed12ead994a8ffa6291ef87
+DIST qtbase-everywhere-opensource-src-5.15.7.tar.xz 50260196 BLAKE2B 69029a910af0e3bfe742b5870334406e03274b0677ef47f9c7c10f730ff031bae49bd21a686497215505b19a183ca395c275d8afefaaa903125297f8e693bb4d SHA512 316de71fba1d5dd91354155dcd0f77e1ce2a798f8296a8699a795ea5e86ad10b6e233299775a92e23328290f3e041240585947e89ee7bd39eb464c5f0ffec343
diff --git a/dev-qt/qtgui/files/qtgui-5.15.7-fix-no-dbus.patch b/dev-qt/qtgui/files/qtgui-5.15.7-fix-no-dbus.patch
new file mode 100644
index 000000000000..74aa5a213cfa
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.7-fix-no-dbus.patch
@@ -0,0 +1,94 @@
+From 6b95957de0ca356e566ac82924b28544effb3579 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Fri, 9 Sep 2022 20:13:13 +0200
+Subject: [PATCH] Replace #if QT_CONFIG(dbus) with #ifndef QT_NO_DBUS
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ src/gui/kernel/qguiapplication.cpp | 2 +-
+ .../services/genericunix/qgenericunixservices.cpp | 14 +++++++-------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
+index 87643a3a39..e191420303 100644
+--- a/src/gui/kernel/qguiapplication.cpp
++++ b/src/gui/kernel/qguiapplication.cpp
+@@ -263,7 +263,7 @@ static void initThemeHints()
+
+ static bool checkNeedPortalSupport()
+ {
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty() || qEnvironmentVariableIsSet("SNAP");
+ #else
+ return false;
+diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
+index 2abe039126..69ff0de916 100644
+--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp
++++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
+@@ -54,7 +54,7 @@
+ #include <QtGui/QGuiApplication>
+ #include <QtGui/QWindow>
+
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ // These QtCore includes are needed for xdg-desktop-portal support
+ #include <QtCore/private/qcore_unix_p.h>
+
+@@ -185,7 +185,7 @@ static inline bool launch(const QString &launcher, const QUrl &url)
+ return ok;
+ }
+
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ static inline bool checkNeedPortalSupport()
+ {
+ return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty() || qEnvironmentVariableIsSet("SNAP");
+@@ -392,7 +392,7 @@ private:
+
+ QGenericUnixServices::QGenericUnixServices()
+ {
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ if (qEnvironmentVariableIntValue("QT_NO_XDG_DESKTOP_PORTAL") > 0) {
+ return;
+ }
+@@ -417,7 +417,7 @@ QGenericUnixServices::QGenericUnixServices()
+
+ QPlatformServiceColorPicker *QGenericUnixServices::colorPicker(QWindow *parent)
+ {
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ // Make double sure that we are in a wayland environment. In particular check
+ // WAYLAND_DISPLAY so also XWayland apps benefit from portal-based color picking.
+ // Outside wayland we'll rather rely on other means than the XDG desktop portal.
+@@ -441,7 +441,7 @@ QByteArray QGenericUnixServices::desktopEnvironment() const
+ bool QGenericUnixServices::openUrl(const QUrl &url)
+ {
+ if (url.scheme() == QLatin1String("mailto")) {
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ if (checkNeedPortalSupport()) {
+ QDBusError error = xdgDesktopPortalSendEmail(url);
+ if (isPortalReturnPermanent(error))
+@@ -453,7 +453,7 @@ bool QGenericUnixServices::openUrl(const QUrl &url)
+ return openDocument(url);
+ }
+
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ if (checkNeedPortalSupport()) {
+ QDBusError error = xdgDesktopPortalOpenUrl(url);
+ if (isPortalReturnPermanent(error))
+@@ -470,7 +470,7 @@ bool QGenericUnixServices::openUrl(const QUrl &url)
+
+ bool QGenericUnixServices::openDocument(const QUrl &url)
+ {
+-#if QT_CONFIG(dbus)
++#ifndef QT_NO_DBUS
+ if (checkNeedPortalSupport()) {
+ QDBusError error = xdgDesktopPortalOpenFile(url);
+ if (isPortalReturnPermanent(error))
+--
+2.38.1
+
diff --git a/dev-qt/qtgui/files/qtgui-5.15.7-xcb-correctly-disconnect-xsettings-callbacks.patch b/dev-qt/qtgui/files/qtgui-5.15.7-xcb-correctly-disconnect-xsettings-callbacks.patch
new file mode 100644
index 000000000000..5692ecc5379e
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.7-xcb-correctly-disconnect-xsettings-callbacks.patch
@@ -0,0 +1,64 @@
+From c78370cabc56668f45bdc2e96eaa8a1565d52c85 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Mon, 17 Oct 2022 22:18:58 +0100
+Subject: [PATCH] xcb: correctly disconnect xsettings callbacks
+
+registerCallbackForProperty can be initialized without us completely
+initialializing a GTK theme. We need a different guard for the
+destructor.
+
+(part cherry-picked from 012132c60d625b2de0039bdda3c22a0a8fe2dfe5)
+---
+ src/plugins/platforms/xcb/qxcbcursor.cpp | 8 +++++---
+ src/plugins/platforms/xcb/qxcbcursor.h | 1 +
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
+index 4210bf428e..0670b6ebce 100644
+--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
++++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
+@@ -300,7 +300,7 @@ QXcbCursorCacheKey::QXcbCursorCacheKey(const QCursor &c)
+ #endif // !QT_NO_CURSOR
+
+ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
+- : QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false)
++ : QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false), m_callbackForPropertyRegistered(false)
+ {
+ #if QT_CONFIG(cursor)
+ // see NUM_BITMAPS in libXcursor/src/xcursorint.h
+@@ -343,7 +343,7 @@ QXcbCursor::~QXcbCursor()
+ {
+ xcb_connection_t *conn = xcb_connection();
+
+- if (m_gtkCursorThemeInitialized) {
++ if (m_callbackForPropertyRegistered) {
+ m_screen->xSettings()->removeCallbackForHandle(this);
+ }
+
+@@ -562,8 +562,10 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+ xcb_cursor_t cursor = XCB_NONE;
+
+ #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+- if (m_screen->xSettings()->initialized())
++ if (m_screen->xSettings()->initialized()) {
+ m_screen->xSettings()->registerCallbackForProperty("Gtk/CursorThemeName",cursorThemePropertyChanged,this);
++ m_callbackForPropertyRegistered = true;
++ }
+
+ // Try Xcursor first
+ if (cshape >= 0 && cshape <= Qt::LastCursor) {
+diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
+index 0b238823f0..82fb47e55d 100644
+--- a/src/plugins/platforms/xcb/qxcbcursor.h
++++ b/src/plugins/platforms/xcb/qxcbcursor.h
+@@ -122,6 +122,7 @@ private:
+ void *handle);
+ #endif
+ bool m_gtkCursorThemeInitialized;
++ bool m_callbackForPropertyRegistered;
+ };
+
+ QT_END_NAMESPACE
+--
+GitLab
+
diff --git a/dev-qt/qtgui/qtgui-5.15.7.ebuild b/dev-qt/qtgui/qtgui-5.15.7.ebuild
new file mode 100644
index 000000000000..800ea7df7ff4
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.7.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != *9999* ]]; then
+ QT5_KDEPATCHSET_REV=1
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+SLOT=5/${QT5_PV} # bug 707658
+IUSE="accessibility dbus egl eglfs evdev gles2-only ibus jpeg +libinput
+ linuxfb +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs linuxfb vnc X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ =dev-qt/qtcore-${QT5_PV}*:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/harfbuzz:=
+ sys-libs/zlib:=
+ dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+ eglfs? (
+ media-libs/mesa[gbm(+)]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ gles2-only? ( media-libs/libglvnd )
+ !gles2-only? ( media-libs/libglvnd[X] )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ udev? ( virtual/libudev:= )
+ vnc? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libxcb:=
+ x11-libs/libxkbcommon[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ linuxfb? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( =dev-qt/qtwayland-${QT5_PV}* )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=(
+ # Approved but pending rebase:
+ # https://invent.kde.org/qt/qt/qtbase/-/merge_requests/211
+ "${FILESDIR}/${P}-xcb-correctly-disconnect-xsettings-callbacks.patch"
+ # Downstream workaround the fact that QT_CONFIG(dbus) does not work for us:
+ "${FILESDIR}/${P}-fix-no-dbus.patch"
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usev dbus -dbus-linked)
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usev eglfs '-gbm -kms')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use linuxfb)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usev X '-xcb-xlib')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}