1 |
commit: fbc10178e93c0498b1d77a40874d717699a90966 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 5 22:12:53 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 5 22:12:53 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=fbc10178 |
7 |
|
8 |
kde-frameworks/kidletime: Add IUSE X, xscreensaver |
9 |
|
10 |
x11-libs/libXScrnSaver is only used as a fallback, |
11 |
built as additional plugin that requires Qt5DBus. |
12 |
|
13 |
Upstream commit 79d45ca682b8ae59b839a5ee7341a97ba4122018 |
14 |
|
15 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
16 |
|
17 |
.../kidletime/files/kidletime-5.37.0-qtdbus.patch | 32 ++++++++++++++++++ |
18 |
kde-frameworks/kidletime/kidletime-9999.ebuild | 38 ++++++++++++++++++---- |
19 |
2 files changed, 63 insertions(+), 7 deletions(-) |
20 |
|
21 |
diff --git a/kde-frameworks/kidletime/files/kidletime-5.37.0-qtdbus.patch b/kde-frameworks/kidletime/files/kidletime-5.37.0-qtdbus.patch |
22 |
new file mode 100644 |
23 |
index 0000000000..44d1bc4bea |
24 |
--- /dev/null |
25 |
+++ b/kde-frameworks/kidletime/files/kidletime-5.37.0-qtdbus.patch |
26 |
@@ -0,0 +1,32 @@ |
27 |
+commit e86d576d4030231617d191a569354e368a038384 |
28 |
+Author: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
29 |
+Date: Sat Aug 5 23:45:39 2017 +0200 |
30 |
+ |
31 |
+ Qt5DBus is only required with HAVE_XSCREENSAVER |
32 |
+ |
33 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
34 |
+index e3c89d8..39cae72 100644 |
35 |
+--- a/CMakeLists.txt |
36 |
++++ b/CMakeLists.txt |
37 |
+@@ -32,10 +32,6 @@ include(KDECMakeSettings) |
38 |
+ set(REQUIRED_QT_VERSION 5.6.0) |
39 |
+ find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) |
40 |
+ |
41 |
+-if(NOT WIN32 AND NOT APPLE) |
42 |
+- find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus) |
43 |
+-endif() |
44 |
+- |
45 |
+ if(APPLE) |
46 |
+ cmake_find_frameworks(CoreFoundation Carbon) |
47 |
+ endif() |
48 |
+@@ -66,6 +62,10 @@ if(X11_FOUND) |
49 |
+ set(HAVE_XSCREENSAVER ${X11_Xscreensaver_FOUND}) |
50 |
+ add_feature_info("X-Screensaver based poller" HAVE_XSCREENSAVER "KIdleTime fallback mode (libXss)") |
51 |
+ |
52 |
++ if(HAVE_XSCREENSAVER AND NOT WIN32) |
53 |
++ find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus) |
54 |
++ endif() |
55 |
++ |
56 |
+ if(NOT HAVE_XSCREENSAVER AND NOT HAVE_XSYNC) |
57 |
+ message(FATAL_ERROR "\nNeither the XSync (libXext) nor XScreensaver (libXss) development package was found.\nPlease install one of them (XSync is recommended)") |
58 |
+ endif() |
59 |
|
60 |
diff --git a/kde-frameworks/kidletime/kidletime-9999.ebuild b/kde-frameworks/kidletime/kidletime-9999.ebuild |
61 |
index 4779b3a045..812edf6821 100644 |
62 |
--- a/kde-frameworks/kidletime/kidletime-9999.ebuild |
63 |
+++ b/kde-frameworks/kidletime/kidletime-9999.ebuild |
64 |
@@ -9,16 +9,40 @@ inherit kde5 |
65 |
DESCRIPTION="Framework for detection and notification of device idle time" |
66 |
LICENSE="LGPL-2+" |
67 |
KEYWORDS="" |
68 |
-IUSE="" |
69 |
+IUSE="X xscreensaver" |
70 |
+ |
71 |
+REQUIRED_USE="xscreensaver? ( X )" |
72 |
|
73 |
RDEPEND=" |
74 |
- $(add_qt_dep qtdbus) |
75 |
$(add_qt_dep qtgui) |
76 |
$(add_qt_dep qtwidgets) |
77 |
- $(add_qt_dep qtx11extras) |
78 |
- x11-libs/libX11 |
79 |
- x11-libs/libXScrnSaver |
80 |
- x11-libs/libXext |
81 |
- x11-libs/libxcb |
82 |
+ X? ( |
83 |
+ $(add_qt_dep qtx11extras) |
84 |
+ x11-libs/libX11 |
85 |
+ x11-libs/libxcb |
86 |
+ x11-libs/libXext |
87 |
+ ) |
88 |
+ xscreensaver? ( |
89 |
+ $(add_qt_dep qtdbus) |
90 |
+ x11-libs/libXScrnSaver |
91 |
+ ) |
92 |
" |
93 |
DEPEND="${RDEPEND}" |
94 |
+ |
95 |
+PATCHES=( "${FILESDIR}/${PN}-5.37.0-qtdbus.patch" ) |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ kde5_src_prepare |
99 |
+ if ! use xscreensaver; then |
100 |
+ sed -i -e "s/\${X11_Xscreensaver_FOUND}/0/" CMakeLists.txt || die |
101 |
+ fi |
102 |
+} |
103 |
+ |
104 |
+src_configure() { |
105 |
+ local mycmakeargs=( |
106 |
+ $(cmake-utils_use_find_package X X11) |
107 |
+ $(cmake-utils_use_find_package X XCB) |
108 |
+ ) |
109 |
+ |
110 |
+ kde5_src_configure |
111 |
+} |