diff options
Diffstat (limited to 'kde-apps')
-rw-r--r-- | kde-apps/kruler/files/kruler-22.04.3-without_x11.patch | 64 | ||||
-rw-r--r-- | kde-apps/kruler/kruler-22.04.3.ebuild | 4 |
2 files changed, 67 insertions, 1 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 000000000000..79bd597d9377 --- /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.04.3.ebuild b/kde-apps/kruler/kruler-22.04.3.ebuild index 7b51b8f8f795..0a74d158d6f9 100644 --- a/kde-apps/kruler/kruler-22.04.3.ebuild +++ b/kde-apps/kruler/kruler-22.04.3.ebuild @@ -34,9 +34,11 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/${P}-without_x11.patch" ) + src_configure() { local mycmakeargs=( - $(cmake_use_find_package X X11) + -DWITHOUT_X11=$(usex !X) ) ecm_src_configure |