public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/kde:master commit in: kde-apps/kruler/files/, kde-apps/kruler/
@ 2022-07-31 15:36 Andreas Sturmlechner
  0 siblings, 0 replies; only message in thread
From: Andreas Sturmlechner @ 2022-07-31 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     f6d5bec93b6044d64e928d0dce57b97745439adb
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 29 08:17:07 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul 31 15:35:55 2022 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=f6d5bec9

kde-apps/kruler: Fix build with USE -X

Upstream commit 7a29873231061948408b36089a683ab4e0fc8a69

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

 .../kruler/files/kruler-22.04.3-without_x11.patch  | 64 ++++++++++++++++++++++
 kde-apps/kruler/kruler-22.07.80.ebuild             |  4 +-
 kde-apps/kruler/kruler-22.08.49.9999.ebuild        |  4 +-
 3 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/kde-apps/kruler/files/kruler-22.04.3-without_x11.patch b/kde-apps/kruler/files/kruler-22.04.3-without_x11.patch
new file mode 100644
index 0000000000..79bd597d93
--- /dev/null
+++ b/kde-apps/kruler/files/kruler-22.04.3-without_x11.patch
@@ -0,0 +1,64 @@
+From 7a29873231061948408b36089a683ab4e0fc8a69 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 31 Jul 2022 14:59:24 +0200
+Subject: [PATCH] Add CMake option to build WITHOUT_X11, drop unused X11
+ dependency
+
+We want to be able to build without X11 support even if some of the
+used libraries may not work w/o X11 themselves yet or need to be built
+with X11 support for other reverse dependencies.
+
+KRULER_HAVE_X11 already exists and is set automagically so far, but
+using -DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies
+list X11 as required in their cmake config.
+
+X11 dependency (introduced in 4c7cab8e90f8f360fb1c6b21c73f4acba609e0fe)
+was not actually used at build time, so the new option will replace it
+to determine if the feature is enabled, however libXCB remains
+non-required.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 86a5dc7..a5839ff 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -41,14 +41,16 @@ set_package_properties(KF5DocTools PROPERTIES DESCRIPTION
+     TYPE OPTIONAL
+ )
+ if (NOT APPLE)
+-    find_package(X11)
+-    set (KRULER_HAVE_X11 ${X11_FOUND})
+-    if (X11_FOUND)
++    option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
++    if (NOT WITHOUT_X11)
+         find_package(XCB COMPONENTS XCB)
+-        if (QT_MAJOR_VERSION STREQUAL "5")
+-            find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED X11Extras)
+-        else()
+-            # qtx11extras_p.h is in Qt6Gui, which implied by the Qt6Gui above
++        set (KRULER_HAVE_X11 ${XCB_FOUND})
++        if (XCB_FOUND)
++            if (QT_MAJOR_VERSION STREQUAL "5")
++                find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED X11Extras)
++            else()
++                # qtx11extras_p.h is in Qt6Gui, which implied by the Qt6Gui above
++            endif()
+         endif()
+     endif()
+ endif()
+@@ -101,7 +103,7 @@ target_link_libraries(kruler
+     KF5::WindowSystem
+     KF5::XmlGui
+ )
+-if (X11_FOUND)
++if (KRULER_HAVE_X11)
+     target_link_libraries(kruler
+         ${XCB_LIBRARIES}
+     )
+-- 
+GitLab
+

diff --git a/kde-apps/kruler/kruler-22.07.80.ebuild b/kde-apps/kruler/kruler-22.07.80.ebuild
index fd82b4364c..0e360ca4f1 100644
--- a/kde-apps/kruler/kruler-22.07.80.ebuild
+++ b/kde-apps/kruler/kruler-22.07.80.ebuild
@@ -34,9 +34,11 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
+
 src_configure() {
 	local mycmakeargs=(
-		$(cmake_use_find_package X X11)
+		-DWITHOUT_X11=$(usex !X)
 	)
 
 	ecm_src_configure

diff --git a/kde-apps/kruler/kruler-22.08.49.9999.ebuild b/kde-apps/kruler/kruler-22.08.49.9999.ebuild
index 54ff896d29..a71920cae3 100644
--- a/kde-apps/kruler/kruler-22.08.49.9999.ebuild
+++ b/kde-apps/kruler/kruler-22.08.49.9999.ebuild
@@ -34,9 +34,11 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
+
 src_configure() {
 	local mycmakeargs=(
-		$(cmake_use_find_package X X11)
+		-DWITHOUT_X11=$(usex !X)
 	)
 
 	ecm_src_configure


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-31 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-31 15:36 [gentoo-commits] proj/kde:master commit in: kde-apps/kruler/files/, kde-apps/kruler/ Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox