Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-plasma/libkworkspace/, kde-plasma/libkworkspace/files/
Date: Mon, 22 Oct 2018 18:14:44
Message-Id: 1540231572.fb911c3477d846c25f47e37f91deeb2e86e1ef84.asturm@gentoo
1 commit: fb911c3477d846c25f47e37f91deeb2e86e1ef84
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 22 09:04:35 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 22 18:06:12 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=fb911c34
7
8 kde-plasma/libkworkspace: New package (split from plasma-workspace)
9
10 In Plasma 5.13, kde-cli-tools began to depend on libkworkspace for
11 Wayland support in KCMs. Besides making circular dep workarounds
12 necessary, this also meant a considerable chunk of Plasma added to
13 the kde-cli-tools depgraph, which is used by applications even if
14 not having a Plasma desktop installed.
15
16 Revdeps already search for libkworkspace independently, which means
17 no revdep patching is required to support this split package.
18
19 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
20 Package-Manager: Portage-2.3.51, Repoman-2.3.11
21
22 .../files/libkworkspace-5.14.2-standalone.patch | 96 ++++++++++++++++++++++
23 .../libkworkspace-5.14.49.9999.ebuild | 54 ++++++++++++
24 kde-plasma/libkworkspace/libkworkspace-9999.ebuild | 54 ++++++++++++
25 kde-plasma/libkworkspace/metadata.xml | 8 ++
26 4 files changed, 212 insertions(+)
27
28 diff --git a/kde-plasma/libkworkspace/files/libkworkspace-5.14.2-standalone.patch b/kde-plasma/libkworkspace/files/libkworkspace-5.14.2-standalone.patch
29 new file mode 100644
30 index 0000000000..f2332f7261
31 --- /dev/null
32 +++ b/kde-plasma/libkworkspace/files/libkworkspace-5.14.2-standalone.patch
33 @@ -0,0 +1,96 @@
34 +From 2e0a1d8f524d3bb645248787eed4532a250540fc Mon Sep 17 00:00:00 2001
35 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
36 +Date: Mon, 22 Oct 2018 10:35:10 +0200
37 +Subject: [PATCH] libkworkspace: Allow standalone build
38 +
39 +---
40 + libkworkspace/CMakeLists.txt | 64 +++++++++++++++++++++++++++++++++---
41 + 1 file changed, 60 insertions(+), 4 deletions(-)
42 +
43 +diff --git a/libkworkspace/CMakeLists.txt b/libkworkspace/CMakeLists.txt
44 +index f66013f9..4e58bd60 100644
45 +--- a/CMakeLists.txt
46 ++++ b/CMakeLists.txt
47 +@@ -1,3 +1,59 @@
48 ++project(libkworkspace)
49 ++
50 ++if(${CMAKE_SOURCE_DIR} STREQUAL ${libkworkspace_SOURCE_DIR})
51 ++ set(PROJECT_VERSION "GENTOO_PV")
52 ++ set(PROJECT_VERSION_MAJOR 5)
53 ++
54 ++ cmake_minimum_required(VERSION 3.0)
55 ++
56 ++ set(QT_MIN_VERSION "GENTOO_QT_MINIMAL")
57 ++ set(KF5_MIN_VERSION "GENTOO_KF5_MINIMAL")
58 ++ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core DBus)
59 ++ find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
60 ++ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
61 ++
62 ++ include(KDEInstallDirs)
63 ++ include(KDECMakeSettings)
64 ++ include(KDECompilerSettings NO_POLICY_SCOPE)
65 ++ include(ECMMarkNonGuiExecutable)
66 ++ include(CMakePackageConfigHelpers)
67 ++ include(WriteBasicConfigVersionFile)
68 ++ include(CheckIncludeFiles)
69 ++ include(FeatureSummary)
70 ++ include(ECMQtDeclareLoggingCategory)
71 ++ include(KDEPackageAppTemplates)
72 ++ include(ECMMarkAsTest)
73 ++ include(GenerateExportHeader)
74 ++
75 ++ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons I18n Plasma WindowSystem)
76 ++
77 ++ find_package(KWinDBusInterface CONFIG REQUIRED)
78 ++
79 ++ find_package(X11)
80 ++ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
81 ++ URL "http://www.x.org"
82 ++ TYPE OPTIONAL
83 ++ PURPOSE "Required for X11 support")
84 ++
85 ++ if(X11_FOUND)
86 ++ find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG REQUIRED)
87 ++ set(HAVE_X11 1)
88 ++ endif()
89 ++
90 ++ if(BUILD_TESTING)
91 ++ find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED)
92 ++ endif()
93 ++
94 ++ check_include_files(unistd.h HAVE_UNISTD_H)
95 ++
96 ++ configure_file(../config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
97 ++ configure_file(../config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
98 ++
99 ++ set(ksmserver_xml ../ksmserver/org.kde.KSMServerInterface.xml)
100 ++else()
101 ++ set(ksmserver_xml ${plasma-workspace_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml)
102 ++ set_source_files_properties(${KWIN_INTERFACE} PROPERTIES INCLUDE "interface_util.h")
103 ++endif()
104 +
105 + set(kworkspace_LIB_SRCS kdisplaymanager.cpp
106 + kworkspace.cpp
107 +@@ -9,11 +65,7 @@ remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
108 + remove_definitions(-DQT_NO_CAST_TO_ASCII)
109 +
110 +
111 +-set(ksmserver_xml ${plasma-workspace_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml)
112 + qt5_add_dbus_interface( kworkspace_LIB_SRCS ${ksmserver_xml} ksmserver_interface )
113 +-
114 +-set_source_files_properties(${KWIN_INTERFACE} PROPERTIES INCLUDE "interface_util.h")
115 +-
116 + qt5_add_dbus_interface( kworkspace_LIB_SRCS ${KWIN_INTERFACE} kwin_interface )
117 +
118 +
119 +@@ -77,3 +129,7 @@ install(EXPORT libkworkspaceLibraryTargets
120 + if(BUILD_TESTING)
121 + add_subdirectory(autotests)
122 + endif()
123 ++
124 ++if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
125 ++ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
126 ++endif()
127 +--
128 +2.19.1
129 +
130
131 diff --git a/kde-plasma/libkworkspace/libkworkspace-5.14.49.9999.ebuild b/kde-plasma/libkworkspace/libkworkspace-5.14.49.9999.ebuild
132 new file mode 100644
133 index 0000000000..f2e5f9b894
134 --- /dev/null
135 +++ b/kde-plasma/libkworkspace/libkworkspace-5.14.49.9999.ebuild
136 @@ -0,0 +1,54 @@
137 +# Copyright 1999-2018 Gentoo Authors
138 +# Distributed under the terms of the GNU General Public License v2
139 +
140 +EAPI=6
141 +
142 +KDE_TEST="true"
143 +KMNAME="plasma-workspace"
144 +inherit kde5
145 +
146 +DESCRIPTION="Workspace library to interact with the Plasma session manager"
147 +
148 +KEYWORDS=""
149 +IUSE=""
150 +
151 +DEPEND="
152 + $(add_frameworks_dep kcoreaddons)
153 + $(add_frameworks_dep ki18n)
154 + $(add_frameworks_dep kwindowsystem)
155 + $(add_frameworks_dep plasma)
156 + $(add_qt_dep qtdbus)
157 + $(add_qt_dep qtx11extras)
158 + x11-libs/libICE
159 + x11-libs/libSM
160 + x11-libs/libX11
161 + x11-libs/libXau
162 +"
163 +RDEPEND="${DEPEND}
164 + !kde-plasma/libkworkspace:4
165 + !<kde-plasma/plasma-workspace-5.14.2:5
166 +"
167 +
168 +S="${S}/${PN}"
169 +
170 +PATCHES=( "${FILESDIR}/${PN}-5.14.2-standalone.patch" )
171 +
172 +src_prepare() {
173 + # delete colliding libkworkspace translations, let kde5_src_prepare do its magic
174 + if [[ ${KDE_BUILD_TYPE} = release ]]; then
175 + find ../po -type f -name "*po" -and -not -name "libkworkspace*" -delete || die
176 + rm -rf po/*/docs || die
177 + cp -a ../po ./ || die
178 + fi
179 + kde5_src_prepare
180 + if [[ ${KDE_BUILD_TYPE} = release ]]; then
181 + cat >> CMakeLists.txt <<- _EOF_ || die
182 + ki18n_install(po)
183 + _EOF_
184 + fi
185 +
186 + sed -e "/set/s/GENTOO_PV/${PV}/" \
187 + -e "/set/s/GENTOO_QT_MINIMAL/${QT_MINIMAL}/" \
188 + -e "/set/s/GENTOO_KF5_MINIMAL/${FRAMEWORKS_MINIMAL}/" \
189 + -i CMakeLists.txt || die "Failed to prepare CMakeLists.txt"
190 +}
191
192 diff --git a/kde-plasma/libkworkspace/libkworkspace-9999.ebuild b/kde-plasma/libkworkspace/libkworkspace-9999.ebuild
193 new file mode 100644
194 index 0000000000..f2e5f9b894
195 --- /dev/null
196 +++ b/kde-plasma/libkworkspace/libkworkspace-9999.ebuild
197 @@ -0,0 +1,54 @@
198 +# Copyright 1999-2018 Gentoo Authors
199 +# Distributed under the terms of the GNU General Public License v2
200 +
201 +EAPI=6
202 +
203 +KDE_TEST="true"
204 +KMNAME="plasma-workspace"
205 +inherit kde5
206 +
207 +DESCRIPTION="Workspace library to interact with the Plasma session manager"
208 +
209 +KEYWORDS=""
210 +IUSE=""
211 +
212 +DEPEND="
213 + $(add_frameworks_dep kcoreaddons)
214 + $(add_frameworks_dep ki18n)
215 + $(add_frameworks_dep kwindowsystem)
216 + $(add_frameworks_dep plasma)
217 + $(add_qt_dep qtdbus)
218 + $(add_qt_dep qtx11extras)
219 + x11-libs/libICE
220 + x11-libs/libSM
221 + x11-libs/libX11
222 + x11-libs/libXau
223 +"
224 +RDEPEND="${DEPEND}
225 + !kde-plasma/libkworkspace:4
226 + !<kde-plasma/plasma-workspace-5.14.2:5
227 +"
228 +
229 +S="${S}/${PN}"
230 +
231 +PATCHES=( "${FILESDIR}/${PN}-5.14.2-standalone.patch" )
232 +
233 +src_prepare() {
234 + # delete colliding libkworkspace translations, let kde5_src_prepare do its magic
235 + if [[ ${KDE_BUILD_TYPE} = release ]]; then
236 + find ../po -type f -name "*po" -and -not -name "libkworkspace*" -delete || die
237 + rm -rf po/*/docs || die
238 + cp -a ../po ./ || die
239 + fi
240 + kde5_src_prepare
241 + if [[ ${KDE_BUILD_TYPE} = release ]]; then
242 + cat >> CMakeLists.txt <<- _EOF_ || die
243 + ki18n_install(po)
244 + _EOF_
245 + fi
246 +
247 + sed -e "/set/s/GENTOO_PV/${PV}/" \
248 + -e "/set/s/GENTOO_QT_MINIMAL/${QT_MINIMAL}/" \
249 + -e "/set/s/GENTOO_KF5_MINIMAL/${FRAMEWORKS_MINIMAL}/" \
250 + -i CMakeLists.txt || die "Failed to prepare CMakeLists.txt"
251 +}
252
253 diff --git a/kde-plasma/libkworkspace/metadata.xml b/kde-plasma/libkworkspace/metadata.xml
254 new file mode 100644
255 index 0000000000..2fdbf33d96
256 --- /dev/null
257 +++ b/kde-plasma/libkworkspace/metadata.xml
258 @@ -0,0 +1,8 @@
259 +<?xml version="1.0" encoding="UTF-8"?>
260 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
261 +<pkgmetadata>
262 + <maintainer type="project">
263 + <email>kde@g.o</email>
264 + <name>Gentoo KDE Project</name>
265 + </maintainer>
266 +</pkgmetadata>