commit:     28494ae23e418fdaf0d75b7a63625f927ed73f3d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  5 12:56:03 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jan  5 13:03:11 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28494ae2

kde-frameworks/kwindowsystem: Always provide KX11Extras

These functions may not be relevant outside of X11 but at least they
do not require X11 libs to be present. Since revdeps do not currently
hide KX11Extras use behind ifdefs just install it unconditionally for
our purpose.

See also:
https://phabricator.kde.org/T12413
https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/72

Bug: https://bugs.gentoo.org/885525
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...wsystem-5.101.0-always-provide-KX11Extras.patch | 45 ++++++++++++++++++++
 .../files/kwindowsystem-5.101.0-cmake.patch        | 48 +++++++++++++++++++++
 .../kwindowsystem/kwindowsystem-5.101.0-r1.ebuild  | 49 ++++++++++++++++++++++
 3 files changed, 142 insertions(+)

diff --git 
a/kde-frameworks/kwindowsystem/files/kwindowsystem-5.101.0-always-provide-KX11Extras.patch
 
b/kde-frameworks/kwindowsystem/files/kwindowsystem-5.101.0-always-provide-KX11Extras.patch
new file mode 100644
index 000000000000..94c019c82e5b
--- /dev/null
+++ 
b/kde-frameworks/kwindowsystem/files/kwindowsystem-5.101.0-always-provide-KX11Extras.patch
@@ -0,0 +1,45 @@
+From 9f4229d2628d882b5aa2248546ad23f2e8d280dd Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Thu, 5 Jan 2023 13:38:38 +0100
+Subject: [PATCH 2/2] Always provide KX11Extras
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ src/CMakeLists.txt | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 27577ef..fb7c28e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -36,6 +36,10 @@ ecm_qt_declare_logging_category(KF5WindowSystem
+     EXPORT KWINDOWSYSTEM
+ )
+ 
++target_sources(KF5WindowSystem PRIVATE
++    kx11extras.cpp
++)
++
+ if (KWINDOWSYSTEM_HAVE_X11)
+    if(NOT X11_Xfixes_LIB)
+       message(FATAL_ERROR "The XFixes library could not be found. Please 
install the development package for it.")
+@@ -71,7 +75,6 @@ if (KWINDOWSYSTEM_HAVE_X11)
+         platforms/xcb/kxmessages.cpp
+         platforms/xcb/kxutils.cpp
+         platforms/xcb/netwm.cpp
+-        kx11extras.cpp
+    )
+ 
+    # we install kkeyserver_x11.h which needs the X11 headers available
+@@ -149,7 +152,7 @@ ecm_generate_headers(KWindowSystem_HEADERS
+   REQUIRED_HEADERS KWindowSystem_HEADERS
+ )
+ 
+-if (KWINDOWSYSTEM_HAVE_X11)
++if (TRUE)
+     ecm_generate_headers(KWindowSystem_HEADERS
+     HEADER_NAMES
+     KX11Extras
+-- 
+2.39.0
+

diff --git 
a/kde-frameworks/kwindowsystem/files/kwindowsystem-5.101.0-cmake.patch 
b/kde-frameworks/kwindowsystem/files/kwindowsystem-5.101.0-cmake.patch
new file mode 100644
index 000000000000..721f1ee997c4
--- /dev/null
+++ b/kde-frameworks/kwindowsystem/files/kwindowsystem-5.101.0-cmake.patch
@@ -0,0 +1,48 @@
+From 765dd7112f728369d63e3be91c844e0cdf8674c1 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Thu, 5 Jan 2023 13:21:00 +0100
+Subject: [PATCH 1/2] Merge two KWINDOWSYSTEM_HAVE_X11 sections into one
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ src/CMakeLists.txt | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 163ea38..27577ef 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -36,16 +36,6 @@ ecm_qt_declare_logging_category(KF5WindowSystem
+     EXPORT KWINDOWSYSTEM
+ )
+ 
+-if (KWINDOWSYSTEM_HAVE_X11)
+-  target_sources(KF5WindowSystem PRIVATE
+-    platforms/xcb/kselectionowner.cpp
+-    platforms/xcb/kselectionwatcher.cpp
+-    platforms/xcb/kxerrorhandler.cpp
+-    platforms/xcb/kxutils.cpp
+-    kx11extras.cpp
+-  )
+-endif()
+-
+ if (KWINDOWSYSTEM_HAVE_X11)
+    if(NOT X11_Xfixes_LIB)
+       message(FATAL_ERROR "The XFixes library could not be found. Please 
install the development package for it.")
+@@ -75,8 +65,13 @@ if (KWINDOWSYSTEM_HAVE_X11)
+ 
+    target_sources(KF5WindowSystem PRIVATE
+         platforms/xcb/kkeyserver.cpp
++        platforms/xcb/kselectionowner.cpp
++        platforms/xcb/kselectionwatcher.cpp
++        platforms/xcb/kxerrorhandler.cpp
+         platforms/xcb/kxmessages.cpp
++        platforms/xcb/kxutils.cpp
+         platforms/xcb/netwm.cpp
++        kx11extras.cpp
+    )
+ 
+    # we install kkeyserver_x11.h which needs the X11 headers available
+-- 
+2.39.0
+

diff --git a/kde-frameworks/kwindowsystem/kwindowsystem-5.101.0-r1.ebuild 
b/kde-frameworks/kwindowsystem/kwindowsystem-5.101.0-r1.ebuild
new file mode 100644
index 000000000000..4841645c5e3c
--- /dev/null
+++ b/kde-frameworks/kwindowsystem/kwindowsystem-5.101.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QTMIN=5.15.5
+VIRTUALX_REQUIRED="test"
+inherit ecm frameworks.kde.org
+
+DESCRIPTION="Framework providing access to properties and features of the 
window manager"
+
+LICENSE="|| ( LGPL-2.1 LGPL-3 ) MIT"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="wayland X"
+
+RESTRICT="test"
+
+RDEPEND="
+       >=dev-qt/qtgui-${QTMIN}:5
+       X? (
+               >=dev-qt/qtx11extras-${QTMIN}:5
+               x11-libs/libX11
+               x11-libs/libXfixes
+               x11-libs/libxcb
+               x11-libs/xcb-util-keysyms
+       )
+"
+DEPEND="${RDEPEND}
+       X? ( x11-base/xorg-proto )
+       test? ( >=dev-qt/qtwidgets-${QTMIN}:5 )
+"
+BDEPEND=">=dev-qt/linguist-tools-${QTMIN}:5"
+PDEPEND="wayland? ( >=kde-plasma/kwayland-integration-5.25.5-r1:5 )"
+
+DOCS=( docs/README.kstartupinfo )
+
+PATCHES=(
+       "${FILESDIR}/${P}-cmake.patch" # KF 5.102
+       "${FILESDIR}/${P}-always-provide-KX11Extras.patch" # bug 885525
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DKWINDOWSYSTEM_NO_WIDGETS=ON
+               $(cmake_use_find_package X X11)
+       )
+
+       ecm_src_configure
+}

Reply via email to