summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-11-27 14:10:40 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-08-06 09:26:46 +0200
commitb56ec81c56cd13fca4f34fc632d275560c5c4dbe (patch)
treec7b932fdc359442f8ff9e6d8e6d180d21b7dfb41 /kde-apps/kio-extras
parentkde-frameworks/plasma: drop 5.96.0 (diff)
downloadgentoo-b56ec81c56cd13fca4f34fc632d275560c5c4dbe.tar.gz
gentoo-b56ec81c56cd13fca4f34fc632d275560c5c4dbe.tar.bz2
gentoo-b56ec81c56cd13fca4f34fc632d275560c5c4dbe.zip
kde-apps/kio-extras: Fix build with USE -X
Upstream commit b8dda4b3129f42323e1f6ccb37c16cb62a740d39 Bug: https://bugs.gentoo.org/813450 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/kio-extras')
-rw-r--r--kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch62
-rw-r--r--kde-apps/kio-extras/kio-extras-22.04.3.ebuild4
2 files changed, 65 insertions, 1 deletions
diff --git a/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch b/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch
new file mode 100644
index 000000000000..4c97ab5187c6
--- /dev/null
+++ b/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch
@@ -0,0 +1,62 @@
+From b8dda4b3129f42323e1f6ccb37c16cb62a740d39 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sat, 27 Nov 2021 14:07: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.
+
+-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
+as required in their cmake config, also X11_FOUND could be set by
+cascading cmake dependencies.
+
+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>
+---
+ thumbnail/CMakeLists.txt | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt
+index f6f38992d..ee322a1bf 100644
+--- a/thumbnail/CMakeLists.txt
++++ b/thumbnail/CMakeLists.txt
+@@ -21,13 +21,16 @@ set_package_properties(libappimage PROPERTIES
+ PURPOSE "Provides support for AppImage thumbnails"
+ )
+
+-find_package(X11)
+-set_package_properties(X11 PROPERTIES
+- DESCRIPTION "X11 libraries"
+- URL "https://www.x.org"
+- TYPE OPTIONAL
+- PURPOSE "Provides support for XCursor thumbnails"
+-)
++option(WITHOUT_X11 "Build without support for XCursor thumbnails (disables finding X11)" OFF)
++if (NOT WITHOUT_X11)
++ find_package(X11)
++ set_package_properties(X11 PROPERTIES
++ DESCRIPTION "X11 libraries"
++ URL "https://www.x.org"
++ TYPE OPTIONAL
++ PURPOSE "Provides support for XCursor thumbnails"
++ )
++endif()
+
+ find_package(Taglib 1.11)
+ set_package_properties(Taglib PROPERTIES
+@@ -210,7 +213,7 @@ endif()
+
+ ########### next target ###############
+
+-if(X11_Xcursor_FOUND)
++if(X11_Xcursor_FOUND AND NOT WITHOUT_X11)
+
+ add_library(cursorthumbnail MODULE cursorcreator.cpp cursorcreatorplugin.cpp)
+
+--
+GitLab
+
diff --git a/kde-apps/kio-extras/kio-extras-22.04.3.ebuild b/kde-apps/kio-extras/kio-extras-22.04.3.ebuild
index abf5c1450dcd..dd98f82228bd 100644
--- a/kde-apps/kio-extras/kio-extras-22.04.3.ebuild
+++ b/kde-apps/kio-extras/kio-extras-22.04.3.ebuild
@@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
"
BDEPEND="man? ( dev-util/gperf )"
+PATCHES=( "${FILESDIR}/${P}-without_x11.patch" )
+
src_configure() {
local mycmakeargs=(
$(cmake_use_find_package activities KF5Activities)
@@ -83,7 +85,7 @@ src_configure() {
$(cmake_use_find_package samba Samba)
$(cmake_use_find_package sftp libssh)
$(cmake_use_find_package taglib Taglib)
- $(cmake_use_find_package X X11)
+ -DWITHOUT_X11=$(usex !X)
)
use samba && mycmakeargs+=(
-DBUILD_KDSoapWSDiscoveryClient=OFF # disable bundled stuff