diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2022-08-02 20:21:44 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-08-08 16:39:05 +0200 |
commit | 14765c4ecbdd43cd19a0d265d9e5c060d8cfafbf (patch) | |
tree | 75db9fbd01c78280bf743dbd9055f15c3a14a37d /kde-frameworks | |
parent | kde-frameworks/khtml: Fix build with USE -X (diff) | |
download | gentoo-14765c4ecbdd43cd19a0d265d9e5c060d8cfafbf.tar.gz gentoo-14765c4ecbdd43cd19a0d265d9e5c060d8cfafbf.tar.bz2 gentoo-14765c4ecbdd43cd19a0d265d9e5c060d8cfafbf.zip |
kde-frameworks/kinit: Fix build with USE -X
Upstream commit 85ca4b6515ac2539fb31b74db6fe5ceae1590be1
Bug: https://bugs.gentoo.org/813450
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r-- | kde-frameworks/kinit/files/kinit-5.96.0-with_x11.patch | 72 | ||||
-rw-r--r-- | kde-frameworks/kinit/kinit-5.96.0-r1.ebuild | 51 |
2 files changed, 123 insertions, 0 deletions
diff --git a/kde-frameworks/kinit/files/kinit-5.96.0-with_x11.patch b/kde-frameworks/kinit/files/kinit-5.96.0-with_x11.patch new file mode 100644 index 000000000000..fd6efe2fae00 --- /dev/null +++ b/kde-frameworks/kinit/files/kinit-5.96.0-with_x11.patch @@ -0,0 +1,72 @@ +From 85ca4b6515ac2539fb31b74db6fe5ceae1590be1 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Tue, 2 Aug 2022 00:19:19 +0200 +Subject: [PATCH] Add CMake option to build WITH_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. + +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. This is a behavior change as previously +it was silently disabled if X11 was not found. + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 15 +++++++++------ + src/kdeinit/CMakeLists.txt | 4 ++-- + 2 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 90baa57..e27c41f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,13 +30,16 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KINIT + + #optional features + if (NOT APPLE) +- find_package(X11) ++ option(WITH_X11 "Build with X11 integration" ON) ++ if(WITH_X11) ++ find_package(X11 REQUIRED) ++ set(HAVE_X11 1) ++ ++ find_package(XCB MODULE COMPONENTS XCB) ++ set_package_properties(XCB PROPERTIES TYPE OPTIONAL) ++ set(HAVE_XCB ${XCB_XCB_FOUND}) ++ endif() + endif() +-set(HAVE_X11 ${X11_FOUND}) +- +-find_package(XCB MODULE COMPONENTS XCB) +-set_package_properties(XCB PROPERTIES TYPE OPTIONAL) +-set(HAVE_XCB ${XCB_XCB_FOUND}) + + # used by 4 executables in this module + if(HAVE_SOCKET_LIBRARY) +diff --git a/src/kdeinit/CMakeLists.txt b/src/kdeinit/CMakeLists.txt +index af84a14..3fcbd1c 100644 +--- a/src/kdeinit/CMakeLists.txt ++++ b/src/kdeinit/CMakeLists.txt +@@ -38,7 +38,7 @@ target_compile_definitions(kdeinit5 PRIVATE + KDE_INSTALL_FULL_LIBEXECDIR_KF5="${KDE_INSTALL_FULL_LIBEXECDIR_KF5}" + ) + +-if (X11_FOUND) ++if (HAVE_X11) + target_link_libraries(kdeinit5 ${X11_X11_LIB}) + endif() + +@@ -63,7 +63,7 @@ if (NOT WIN32) + + target_link_libraries(kdeinit5_wrapper ${KINIT_SOCKET_LIBRARY} Qt5::Core KF5::DBusAddons) + +- if (NOT X11_FOUND) ++ if (NOT HAVE_X11) + target_compile_definitions(kdeinit5_wrapper PRIVATE -DNO_DISPLAY) + endif () + +-- +GitLab + diff --git a/kde-frameworks/kinit/kinit-5.96.0-r1.ebuild b/kde-frameworks/kinit/kinit-5.96.0-r1.ebuild new file mode 100644 index 000000000000..986e68c5fce6 --- /dev/null +++ b/kde-frameworks/kinit/kinit-5.96.0-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_QTHELP="false" +ECM_TEST="false" +PVCUT=$(ver_cut 1-2) +QTMIN=5.15.4 +inherit ecm frameworks.kde.org + +DESCRIPTION="Helper library to speed up start of applications on KDE workspaces" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="+caps +man X" + +RDEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + =kde-frameworks/kconfig-${PVCUT}*:5 + =kde-frameworks/kcoreaddons-${PVCUT}*:5 + =kde-frameworks/kcrash-${PVCUT}*:5 + =kde-frameworks/kdbusaddons-${PVCUT}*:5 + =kde-frameworks/ki18n-${PVCUT}*:5 + =kde-frameworks/kio-${PVCUT}*:5 + =kde-frameworks/kservice-${PVCUT}*:5 + =kde-frameworks/kwindowsystem-${PVCUT}*:5[X?] + caps? ( sys-libs/libcap ) + X? ( + x11-libs/libX11 + x11-libs/libxcb + ) +" +DEPEND="${RDEPEND} + X? ( x11-base/xorg-proto ) +" +BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )" + +# Approved upstream: https://invent.kde.org/frameworks/kinit/-/merge_requests/13 +PATCHES=( "${FILESDIR}/${P}-with_x11.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package caps Libcap) + $(cmake_use_find_package man KF5DocTools) + -DWITH_X11=$(usex X) + ) + + ecm_src_configure +} |