summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-08-23 13:01:04 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-08-23 13:01:04 +0200
commit462eed65e8bfa0380704852d616e2d210e9c41b7 (patch)
tree82eea584ca02ab0e7dbba97d587c9cfa9b1e5b2c
parentdev-lang/julia-bin: fix VariableScope (EROOT) (diff)
downloadgentoo-462eed65.tar.gz
gentoo-462eed65.tar.bz2
gentoo-462eed65.zip
kde-apps/kalarm: Add missing patch
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--kde-apps/kalarm/files/kalarm-22.07.90-without_x11.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/kde-apps/kalarm/files/kalarm-22.07.90-without_x11.patch b/kde-apps/kalarm/files/kalarm-22.07.90-without_x11.patch
new file mode 100644
index 000000000000..6dc0d4e02d0d
--- /dev/null
+++ b/kde-apps/kalarm/files/kalarm-22.07.90-without_x11.patch
@@ -0,0 +1,75 @@
+From 308aa74653acc86cd6a206599a56500c827927ef 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.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 21 +++++++++++++--------
+ src/CMakeLists.txt | 2 +-
+ 2 files changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 05ef5181..c1849f2a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -127,18 +127,23 @@ endif()
+ 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()
+- find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui) # qtx11extras_p.h for Qt6 < 6.2
++ 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)
++ if (QT_MAJOR_VERSION STREQUAL "5")
++ find_package(Qt5X11Extras ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
++ else()
++ find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui) # qtx11extras_p.h for Qt6 < 6.2
++ endif()
++ endif()
+ endif()
++ add_feature_info(WITHOUT_X11 ${WITHOUT_X11} "Build without X11 integration")
+ endif()
++
+ 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 6bb3e5ba..9a3fb73c 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -335,7 +335,7 @@ if (ENABLE_WAKE_FROM_SUSPEND)
+ target_link_libraries(kalarm_bin KF5::AuthCore)
+ endif()
+
+-if(X11_FOUND)
++if(KDEPIM_HAVE_X11)
+ if (QT_MAJOR_VERSION STREQUAL "5")
+ target_link_libraries(kalarm_bin Qt${QT_MAJOR_VERSION}::X11Extras ${X11_X11_LIB})
+ elseif (Qt6_VERSION_MINOR LESS 2)
+--
+GitLab
+