diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-10-28 12:47:47 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-10-31 23:33:00 +0100 |
commit | 22057df950560f294d2dc537301eef6eb7bf9002 (patch) | |
tree | e4ab9e7a615be22599e6f5234f0ae55727a32192 /kde-frameworks/kjobwidgets | |
parent | kde-frameworks/kglobalaccel: drop 6.7.0 (diff) | |
download | gentoo-22057df950560f294d2dc537301eef6eb7bf9002.tar.gz gentoo-22057df950560f294d2dc537301eef6eb7bf9002.tar.bz2 gentoo-22057df950560f294d2dc537301eef6eb7bf9002.zip |
kde-frameworks/kjobwidgets: Add IUSE X
Upstream commit 7a297c5469247c8391673b1d12d1279ace26ae28
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kjobwidgets')
-rw-r--r-- | kde-frameworks/kjobwidgets/files/kjobwidgets-6.7.0-with_x11.patch | 89 | ||||
-rw-r--r-- | kde-frameworks/kjobwidgets/kjobwidgets-6.7.0-r1.ebuild | 34 |
2 files changed, 123 insertions, 0 deletions
diff --git a/kde-frameworks/kjobwidgets/files/kjobwidgets-6.7.0-with_x11.patch b/kde-frameworks/kjobwidgets/files/kjobwidgets-6.7.0-with_x11.patch new file mode 100644 index 000000000000..ea5f3a80a3d9 --- /dev/null +++ b/kde-frameworks/kjobwidgets/files/kjobwidgets-6.7.0-with_x11.patch @@ -0,0 +1,89 @@ +From 7a297c5469247c8391673b1d12d1279ace26ae28 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Thu, 26 Sep 2024 00:53:12 +0200 +Subject: [PATCH] Add dedicated WITH_X11 option to avoid automagic + +So we can configure to build without it even if the header is present. + +Amends 7a16bd22527f58dcf909bffeb9be9a865075e660 + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 4 ++++ + src/CMakeLists.txt | 4 +++- + src/config-kjobwidgets.h.cmake | 1 + + src/kdialogjobuidelegate.cpp | 8 +++----- + 4 files changed, 11 insertions(+), 6 deletions(-) + create mode 100644 src/config-kjobwidgets.h.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 580140a0..3662379e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,6 +28,10 @@ include(CMakePackageConfigHelpers) + set(REQUIRED_QT_VERSION 6.5.0) + find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) + ++if(NOT WIN32 AND NOT APPLE AND NOT ANDROID) ++ option(WITH_X11 "Build with support for QX11Info::appUserTime()" ON) ++endif() ++ + # shall we use DBus? + # enabled per default on Linux & BSD systems + set(USE_DBUS_DEFAULT OFF) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index f7fbba29..f79cfb8a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,3 +1,5 @@ ++configure_file(config-kjobwidgets.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kjobwidgets.h ) ++ + add_library(KF6JobWidgets) + add_library(KF6::JobWidgets ALIAS KF6JobWidgets) + +@@ -81,7 +83,7 @@ if (HAVE_QTDBUS) + target_link_libraries(KF6JobWidgets PRIVATE Qt6::DBus) + endif() + +-if (NOT WIN32 AND NOT APPLE AND NOT ANDROID) ++if (WITH_X11) + target_link_libraries(KF6JobWidgets PRIVATE Qt6::GuiPrivate) # qtx11extras_p.h + endif () + +diff --git a/src/config-kjobwidgets.h.cmake b/src/config-kjobwidgets.h.cmake +new file mode 100644 +index 00000000..03550c09 +--- /dev/null ++++ b/src/config-kjobwidgets.h.cmake +@@ -0,0 +1 @@ ++#cmakedefine01 WITH_X11 +diff --git a/src/kdialogjobuidelegate.cpp b/src/kdialogjobuidelegate.cpp +index 81343df2..86982587 100644 +--- a/src/kdialogjobuidelegate.cpp ++++ b/src/kdialogjobuidelegate.cpp +@@ -17,11 +17,9 @@ + #include <KJobWidgets> + #include <KMessageBox> + +-#if __has_include(<private/qtx11extras_p.h>) ++#include <config-kjobwidgets.h> ++#if WITH_X11 + #include <private/qtx11extras_p.h> +-#define HAVE_X11 1 +-#else +-#define HAVE_X11 0 + #endif + + enum DialogType { ErrorDialog, WarningDialog }; +@@ -121,7 +119,7 @@ KDialogJobUiDelegate::~KDialogJobUiDelegate() = default; + bool KDialogJobUiDelegate::setJob(KJob *job) + { + bool ret = KJobUiDelegate::setJob(job); +-#if HAVE_X11 ++#if WITH_X11 + if (ret) { + unsigned long time = QX11Info::appUserTime(); + KJobWidgets::updateUserTimestamp(job, time); +-- +GitLab + diff --git a/kde-frameworks/kjobwidgets/kjobwidgets-6.7.0-r1.ebuild b/kde-frameworks/kjobwidgets/kjobwidgets-6.7.0-r1.ebuild new file mode 100644 index 000000000000..387bba31f2b5 --- /dev/null +++ b/kde-frameworks/kjobwidgets/kjobwidgets-6.7.0-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PVCUT=$(ver_cut 1-2) +QTMIN=6.6.2 +inherit ecm frameworks.kde.org + +DESCRIPTION="Framework providing assorted widgets for showing the progress of jobs" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" +IUSE="X" + +# slot op: WITH_X11 uses Qt6::GuiPrivate for qtx11extras_p.h +RDEPEND=" + >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets] + =kde-frameworks/kcoreaddons-${PVCUT}*:6 + =kde-frameworks/knotifications-${PVCUT}*:6 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:6 + X? ( >=dev-qt/qtbase-${QTMIN}:6=[X] ) +" +DEPEND="${RDEPEND}" +BDEPEND=">=dev-qt/qttools-${QTMIN}:6[linguist]" + +PATCHES=( "${FILESDIR}/${P}-with_x11.patch" ) + +src_configure() { + local mycmakeargs=( + -DWITH_X11=$(usex X) + ) + ecm_src_configure +} |