diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-11-27 13:30:03 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-08-06 09:44:06 +0200 |
commit | c715608c66dc78a2556b5f2561be6e337ccd0c8c (patch) | |
tree | 514469acbfbb8f98e4b7903ecb90f27f7bc1a890 /kde-apps/kalarm | |
parent | kde-apps/ktouch: Fix build with USE -X (diff) | |
download | gentoo-c715608c66dc78a2556b5f2561be6e337ccd0c8c.tar.gz gentoo-c715608c66dc78a2556b5f2561be6e337ccd0c8c.tar.bz2 gentoo-c715608c66dc78a2556b5f2561be6e337ccd0c8c.zip |
kde-apps/kalarm: Fix build with USE -X
Upstream commit 308aa74653acc86cd6a206599a56500c827927ef
Bug: https://bugs.gentoo.org/813450
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/kalarm')
-rw-r--r-- | kde-apps/kalarm/files/kalarm-22.04.3-without_x11.patch | 73 | ||||
-rw-r--r-- | kde-apps/kalarm/kalarm-22.04.3-r1.ebuild (renamed from kde-apps/kalarm/kalarm-22.04.3.ebuild) | 7 |
2 files changed, 77 insertions, 3 deletions
diff --git a/kde-apps/kalarm/files/kalarm-22.04.3-without_x11.patch b/kde-apps/kalarm/files/kalarm-22.04.3-without_x11.patch new file mode 100644 index 000000000000..2f904201566b --- /dev/null +++ b/kde-apps/kalarm/files/kalarm-22.04.3-without_x11.patch @@ -0,0 +1,73 @@ +From f8646ef6db5b4d0e6add5c9a83a13707f6175b13 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Sat, 27 Nov 2021 12:59:32 +0100 +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. + +KDEPIM_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. + +Introducing this option means there is no behavior change by default, +cmake will just skip finding X11 or adding unwanted features if the +option is enabled. + +* backported to release/22.04 + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 17 +++++++++-------- + src/CMakeLists.txt | 2 +- + 2 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06623ad9..3446a87c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -114,18 +114,19 @@ find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED) + configure_file(kalarm-version-string.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kalarm-version-string.h @ONLY) + + if (NOT APPLE) +- find_package(X11) +-endif() +-if (X11_FOUND) +- if (QT_MAJOR_VERSION STREQUAL "5") +- find_package(Qt5X11Extras ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE) +- else() +- #TODO X11 on Qt6 ++ option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF) ++ if (NOT WITHOUT_X11) ++ find_package(X11) ++ set(KDEPIM_HAVE_X11 ${X11_FOUND}) ++ if (X11_FOUND) ++ find_package(Qt5X11Extras ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE) ++ endif() + endif() + endif() ++add_feature_info(WITHOUT_X11 ${WITHOUT_X11} "Build without X11 integration") ++ + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + +-set(KDEPIM_HAVE_X11 ${X11_FOUND}) + configure_file(src/config-kalarm.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kalarm.h) + + include_directories(${kalarm_SOURCE_DIR} ${kalarm_BINARY_DIR}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e8d70203..3aee2965 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -298,7 +298,7 @@ target_link_libraries(kalarm_bin + KF5::PimCommon + ) + +-if (Qt${QT_MAJOR_VERSION}X11Extras_FOUND) ++if(KDEPIM_HAVE_X11) + target_link_libraries(kalarm_bin Qt${QT_MAJOR_VERSION}::X11Extras ${X11_X11_LIB}) + endif() + +-- +2.35.1 + diff --git a/kde-apps/kalarm/kalarm-22.04.3.ebuild b/kde-apps/kalarm/kalarm-22.04.3-r1.ebuild index 6a291cf0cc6b..ef402863f33c 100644 --- a/kde-apps/kalarm/kalarm-22.04.3.ebuild +++ b/kde-apps/kalarm/kalarm-22.04.3-r1.ebuild @@ -57,7 +57,7 @@ DEPEND=" >=kde-frameworks/kservice-${KFMIN}:5 >=kde-frameworks/ktextwidgets-${KFMIN}:5 >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 - >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5[X?] >=kde-frameworks/kxmlgui-${KFMIN}:5 >=media-libs/phonon-4.11.0 X? ( @@ -70,10 +70,11 @@ RDEPEND="${DEPEND} >=kde-apps/kdepim-runtime-${PVCUT}:5 " +PATCHES=( "${FILESDIR}/${P}-without_x11.patch" ) + src_configure() { local mycmakeargs=( - $(cmake_use_find_package X Qt5X11Extras) - $(cmake_use_find_package X X11) + -DWITHOUT_X11=$(usex !X) ) ecm_src_configure |