summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-11-16 00:37:56 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2023-11-16 00:39:19 +0100
commit53b4fa20842aa56d2b3d61dc4bdbdcde26b60bea (patch)
tree8f9f8460ea2ce6ec1fbafc26d0d62080a61642d8 /kde-misc
parentprofiles, 23.0, musl, arm64: fix CHOST vendor field (diff)
downloadgentoo-53b4fa20842aa56d2b3d61dc4bdbdcde26b60bea.tar.gz
gentoo-53b4fa20842aa56d2b3d61dc4bdbdcde26b60bea.tar.bz2
gentoo-53b4fa20842aa56d2b3d61dc4bdbdcde26b60bea.zip
kde-misc/colord-kde: Fix IUSE=-X
Patch upstreamed. Bug: https://bugs.gentoo.org/917212 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-misc')
-rw-r--r--kde-misc/colord-kde/colord-kde-23.08.3.ebuild6
-rw-r--r--kde-misc/colord-kde/files/colord-kde-23.08.3-without_x11.patch61
2 files changed, 65 insertions, 2 deletions
diff --git a/kde-misc/colord-kde/colord-kde-23.08.3.ebuild b/kde-misc/colord-kde/colord-kde-23.08.3.ebuild
index 8cadd5485a4e..28197edcd668 100644
--- a/kde-misc/colord-kde/colord-kde-23.08.3.ebuild
+++ b/kde-misc/colord-kde/colord-kde-23.08.3.ebuild
@@ -38,7 +38,7 @@ COMMON_DEPEND="
)
"
DEPEND="${COMMON_DEPEND}
- >=kde-frameworks/kwindowsystem-${KFMIN}:5[X=]
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5[X]
"
RDEPEND="${COMMON_DEPEND}
dev-libs/kirigami-addons:5
@@ -48,9 +48,11 @@ RDEPEND="${COMMON_DEPEND}
x11-misc/colord
"
+PATCHES=( "${FILESDIR}/${P}-without_x11.patch" )
+
src_configure() {
local mycmakeargs=(
- $(cmake_use_find_package X X11)
+ -DWITHOUT_X11=$(usex !X)
)
ecm_src_configure
}
diff --git a/kde-misc/colord-kde/files/colord-kde-23.08.3-without_x11.patch b/kde-misc/colord-kde/files/colord-kde-23.08.3-without_x11.patch
new file mode 100644
index 000000000000..d1cfc6f1085d
--- /dev/null
+++ b/kde-misc/colord-kde/files/colord-kde-23.08.3-without_x11.patch
@@ -0,0 +1,61 @@
+From 31e125cc80497b0dc9f16abc808859ce97fd5fd1 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 26 Mar 2023 19:25:40 +0200
+Subject: [PATCH] Add CMake option to build WITHOUT_X11
+
+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.
+
+X11_FOUND is set automagically so far, and using
+-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
+as required in their cmake config.
+
+Introducing this option means there is no behavior change by default,
+cmake will just skip finding X11 if the option is enabled.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9c08b03..d491926 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,13 +47,17 @@ find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED COMPON
+ Widgets
+ )
+
+-find_package(X11)
+-set_package_properties(X11 PROPERTIES
+- TYPE OPTIONAL
+- PURPOSE "For colord integration on X11"
+-)
++option(WITHOUT_X11 "Build without colord-kded for X11 integration (skips finding X11)" OFF)
++if(NOT WITHOUT_X11)
++ find_package(X11)
++ set_package_properties(X11 PROPERTIES
++ TYPE OPTIONAL
++ PURPOSE "For colord integration on X11"
++ )
++ set(HAVE_X11 ${X11_FOUND})
++endif()
+
+-if (X11_FOUND)
++if (HAVE_X11)
+ find_package(XCB REQUIRED COMPONENTS XCB RANDR)
+ if (QT_MAJOR_VERSION STREQUAL "5")
+ find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} NO_MODULE)
+@@ -80,7 +84,7 @@ ecm_set_disabled_deprecation_versions(
+ KF 5.100.0)
+
+
+-if (X11_FOUND)
++if (HAVE_X11)
+ add_subdirectory(colord-kded)
+ endif()
+ add_subdirectory(colord-kcm)
+--
+GitLab
+