Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: eclass/
Date: Tue, 24 Dec 2019 21:35:37
Message-Id: 1577223035.122b7843e32b058b9958d7f77d14b80032abe85d.asturm@gentoo
1 commit: 122b7843e32b058b9958d7f77d14b80032abe85d
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 24 21:27:03 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 24 21:30:35 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=122b7843
7
8 kde5.eclass: Drop obsolete eclass
9
10 No more development, remaining ebuilds in Gentoo repo only.
11
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 eclass/kde5.eclass | 422 -----------------------------------------------------
15 1 file changed, 422 deletions(-)
16
17 diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
18 deleted file mode 100644
19 index 0227900e26..0000000000
20 --- a/eclass/kde5.eclass
21 +++ /dev/null
22 @@ -1,422 +0,0 @@
23 -# Copyright 1999-2019 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -# @ECLASS: kde5.eclass
27 -# @MAINTAINER:
28 -# kde@g.o
29 -# @SUPPORTED_EAPIS: 7
30 -# @BLURB: Support eclass for packages that follow KDE packaging conventions.
31 -# @DESCRIPTION:
32 -# This eclass is *deprecated*. Please read the PORTING notes for switching to
33 -# ecm.eclass in case the package is using extra-cmake-modules, otherwise just
34 -# use cmake-utils.eclass instead. For projects hosted on kde.org infrastructure,
35 -# inherit kde.org.eclass to fetch and unpack sources independent of the build
36 -# system being used.
37 -#
38 -# This eclass unconditionally inherits kde5-functions.eclass and all its public
39 -# functions and variables may be considered as part of this eclass's API.
40 -#
41 -# This eclass inherits either ecm.eclass if KDE_AUTODEPS=true (default) or
42 -# cmake-utils.eclass if false. All its public variables and helper functions
43 -# (not phase functions) may be considered as part of this eclass's API.
44 -#
45 -# This eclass's phase functions are not intended to be mixed and matched, so if
46 -# any phase functions are overridden the version here should also be called.
47 -
48 -if [[ -z ${_KDE5_ECLASS} ]]; then
49 -_KDE5_ECLASS=1
50 -
51 -# Propagate KMNAME to kde.org.eclass
52 -# PORTING: Use KDE_ORG_NAME from kde.org.eclass instead
53 -if [[ -z ${KDE_ORG_NAME} ]]; then
54 - KDE_ORG_NAME=${KMNAME:=$PN}
55 -fi
56 -
57 -inherit flag-o-matic kde.org kde5-functions xdg
58 -
59 -# @ECLASS-VARIABLE: KDE_AUTODEPS
60 -# @DESCRIPTION:
61 -# If set to "false", do nothing.
62 -# For any other value, add dependencies on dev-qt/qtcore:5, kde-frameworks/kf-env
63 -# and kde-frameworks/extra-cmake-modules:5. Additionally, required blockers may
64 -# be set depending on the value of CATEGORY.
65 -# PORTING: no replacement
66 -: ${KDE_AUTODEPS:=true}
67 -
68 -# @ECLASS-VARIABLE: KDE_DEBUG
69 -# @DESCRIPTION:
70 -# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG
71 -# to CPPFLAGS.
72 -# Otherwise, add debug to IUSE.
73 -# PORTING: ECM_DEBUG in ecm.eclass
74 -: ${KDE_DEBUG:=true}
75 -
76 -# @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN
77 -# @DESCRIPTION:
78 -# If set to "false", do nothing.
79 -# Otherwise, add "designer" to IUSE to toggle build of designer plugins
80 -# and add the necessary DEPENDs.
81 -# PORTING: ECM_DESIGNERPLUGIN in ecm.eclass
82 -: ${KDE_DESIGNERPLUGIN:=false}
83 -
84 -# @ECLASS-VARIABLE: KDE_EXAMPLES
85 -# @DESCRIPTION:
86 -# If set to "false", unconditionally ignore a top-level examples subdirectory.
87 -# Otherwise, add "examples" to IUSE to toggle adding that subdirectory.
88 -# PORTING: ECM_EXAMPLES in ecm.eclass
89 -: ${KDE_EXAMPLES:=false}
90 -
91 -# @ECLASS-VARIABLE: KDE_HANDBOOK
92 -# @DESCRIPTION:
93 -# If set to "false", do nothing.
94 -# Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and
95 -# generate and install KDE handbook.
96 -# If set to "optional", config with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
97 -# when USE=!handbook. In case package requires KF5KDELibs4Support, see next:
98 -# If set to "forceoptional", remove a KF5DocTools dependency from the root
99 -# CMakeLists.txt in addition to the above.
100 -# PORTING: ECM_HANDBOOK in ecm.eclass
101 -: ${KDE_HANDBOOK:=false}
102 -
103 -# @ECLASS-VARIABLE: KDE_DOC_DIR
104 -# @DESCRIPTION:
105 -# Specifies the location of the KDE handbook if not the default.
106 -# PORTING: ECM_HANDBOOK_DIR in ecm.eclass
107 -: ${KDE_DOC_DIR:=doc}
108 -
109 -# @ECLASS-VARIABLE: KDE_PO_DIRS
110 -# @DESCRIPTION:
111 -# Specifies the possible locations of KDE l10n files if not the default.
112 -# PORTING: ECM_PO_DIRS in ecm.eclass
113 -: ${KDE_PO_DIRS:="po poqm"}
114 -
115 -# @ECLASS-VARIABLE: KDE_QTHELP
116 -# @DESCRIPTION:
117 -# If set to "false", do nothing.
118 -# Otherwise, add "doc" to IUSE, add the appropriate dependency, generate
119 -# and install Qt compressed help files with -DBUILD_QCH=ON when USE=doc.
120 -# PORTING: ECM_QTHELP in ecm.eclass
121 -if [[ ${CATEGORY} = kde-frameworks ]]; then
122 - : ${KDE_QTHELP:=true}
123 -fi
124 -: ${KDE_QTHELP:=false}
125 -
126 -# @ECLASS-VARIABLE: KDE_TEST
127 -# @DESCRIPTION:
128 -# If set to "false", do nothing.
129 -# For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5.
130 -# If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
131 -# when USE=!test.
132 -# If set to "forceoptional", remove a Qt5Test dependency and comment test
133 -# subdirs from the root CMakeLists.txt in addition to the above.
134 -# If set to "forceoptional-recursive", remove Qt5Test dependencies and make
135 -# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in ${S}
136 -# and below conditional on BUILD_TESTING. This is always meant as a short-term
137 -# fix and creates ${T}/${P}-tests-optional.patch to refine and submit upstream.
138 -# PORTING: ECM_TEST in ecm.eclass
139 -if [[ ${CATEGORY} = kde-frameworks ]]; then
140 - : ${KDE_TEST:=true}
141 -fi
142 -: ${KDE_TEST:=false}
143 -
144 -# @ECLASS-VARIABLE: KDE_SUBSLOT
145 -# @DESCRIPTION:
146 -# If set to "false", do nothing.
147 -# If set to "true", add a subslot to the package, where subslot is either
148 -# defined as major.minor version for kde-*/ categories or ${PV} if other.
149 -# For any other value, that value will be used as subslot.
150 -# PORTING: no replacement, define in ebuild
151 -: ${KDE_SUBSLOT:=false}
152 -
153 -# PORTING: LICENSE no longer set by eclass, define in ebuild
154 -LICENSE="GPL-2"
155 -# PORTING: SLOT no longer set by eclass except for kde-frameworks
156 -[[ ${CATEGORY} = kde-frameworks ]] || SLOT=5
157 -
158 -case ${KDE_SUBSLOT} in
159 - false) ;;
160 - true)
161 - case ${CATEGORY} in
162 - kde-frameworks | \
163 - kde-plasma | \
164 - kde-apps)
165 - SLOT+="/$(ver_cut 1-2)"
166 - ;;
167 - *)
168 - SLOT+="/${PV}"
169 - ;;
170 - esac
171 - ;;
172 - *)
173 - SLOT+="/${KDE_SUBSLOT}"
174 - ;;
175 -esac
176 -
177 -case ${KDE_AUTODEPS} in
178 - false)
179 - inherit cmake-utils
180 - # @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS
181 - # @DESCRIPTION:
182 - # If set to "false", do nothing.
183 - # For any other value, assume the package is using KDEInstallDirs macro and switch
184 - # KDE_INSTALL_USE_QT_SYS_PATHS to ON.
185 - : ${ECM_KDEINSTALLDIRS:=true}
186 -
187 - case ${KDE_DEBUG} in
188 - false) ;;
189 - *)
190 - IUSE+=" debug"
191 - ;;
192 - esac
193 -
194 - case ${KDE_TEST} in
195 - false) ;;
196 - *)
197 - IUSE+=" test"
198 - DEPEND+=" test? ( dev-qt/qttest:5 )"
199 - ;;
200 - esac
201 - ;;
202 - *)
203 - # all packages need breeze/oxygen icons for basic iconset, bug #564838
204 - if [[ ${PN} != breeze-icons && ${PN} != oxygen-icons ]]; then
205 - ECM_NONGUI=false
206 - fi
207 - # propagate deprecated variables to ecm.eclass
208 - if [[ -z ${ECM_DESIGNERPLUGIN} && ${CATEGORY} != kde-apps ]]; then
209 - ECM_DESIGNERPLUGIN=${KDE_DESIGNERPLUGIN}
210 - KDE_DESIGNERPLUGIN=false # use fallback var only for kde-apps
211 - fi
212 - [[ -z ${ECM_DEBUG} ]] && ECM_DEBUG=${KDE_DEBUG}
213 - [[ -z ${ECM_EXAMPLES} ]] && ECM_EXAMPLES=${KDE_EXAMPLES}
214 - [[ -z ${ECM_HANDBOOK} ]] && ECM_HANDBOOK=${KDE_HANDBOOK}
215 - [[ -z ${ECM_HANDBOOK_DIR} ]] && ECM_HANDBOOK_DIR=${KDE_DOC_DIR}
216 - [[ -z ${ECM_PO_DIRS} ]] && ECM_PO_DIRS=${KDE_PO_DIRS}
217 - [[ -z ${ECM_QTHELP} ]] && ECM_QTHELP=${KDE_QTHELP}
218 - [[ -z ${ECM_TEST} ]] && ECM_TEST=${KDE_TEST}
219 - [[ -z ${KFMIN} ]] && KFMIN=${FRAMEWORKS_MINIMAL}
220 - inherit ecm
221 - ;;
222 -esac
223 -
224 -EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
225 -
226 -# @FUNCTION: _kde5_strip_handbook_translations
227 -# @INTERNAL
228 -# @DESCRIPTION:
229 -# If LINGUAS is defined, enable only the requested translations when required.
230 -_kde5_strip_handbook_translations() {
231 - if ! [[ -v LINGUAS ]]; then
232 - return
233 - fi
234 -
235 - local lang po
236 - for po in ${ECM_PO_DIRS}; do
237 - if [[ -d ${po} ]] ; then
238 - pushd ${po} > /dev/null || die
239 - local lang
240 - for lang in *; do
241 - if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
242 - case ${lang} in
243 - cmake_modules | \
244 - CMakeLists.txt | \
245 - ${PN}.pot) ;;
246 - *) rm -r ${lang} || die ;;
247 - esac
248 - if [[ -e CMakeLists.txt ]] ; then
249 - cmake_comment_add_subdirectory ${lang}
250 - sed -e "/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \
251 - -i CMakeLists.txt || die
252 - fi
253 - fi
254 - done
255 - popd > /dev/null || die
256 - fi
257 - done
258 -}
259 -
260 -# @FUNCTION: kde5_pkg_pretend
261 -# @DESCRIPTION:
262 -# Checks if the active compiler meets the minimum version requirements.
263 -# phase function is only exported if KDE_GCC_MINIMAL is defined.
264 -kde5_pkg_pretend() {
265 - debug-print-function ${FUNCNAME} "$@"
266 - case ${KDE_AUTODEPS} in
267 - false) ;;
268 - *) ecm_pkg_pretend ;;
269 - esac
270 -}
271 -
272 -# @FUNCTION: kde5_pkg_setup
273 -# @DESCRIPTION:
274 -# Checks if the active compiler meets the minimum version requirements.
275 -kde5_pkg_setup() {
276 - debug-print-function ${FUNCNAME} "$@"
277 - case ${KDE_AUTODEPS} in
278 - false) ;;
279 - *) ecm_pkg_setup ;;
280 - esac
281 -}
282 -
283 -# @FUNCTION: kde5_src_unpack
284 -# @DESCRIPTION:
285 -# Unpack the sources, automatically handling both release and live ebuilds.
286 -kde5_src_unpack() {
287 - debug-print-function ${FUNCNAME} "$@"
288 - kde.org_src_unpack
289 -}
290 -
291 -# @FUNCTION: kde5_src_prepare
292 -# @DESCRIPTION:
293 -# Wrapper for cmake-utils_src_prepare with lots of extra logic for magic
294 -# handling of linguas, tests, handbook etc.
295 -kde5_src_prepare() {
296 - debug-print-function ${FUNCNAME} "$@"
297 - case ${KDE_AUTODEPS} in
298 - false)
299 - cmake-utils_src_prepare
300 -
301 - _kde5_strip_handbook_translations
302 -
303 - # only build unit tests when required
304 - if ! { in_iuse test && use test; } ; then
305 - if [[ ${KDE_TEST} = forceoptional ]] ; then
306 - punt_bogus_dep Qt5 Test
307 - # if forceoptional, also cover non-kde categories
308 - cmake_comment_add_subdirectory autotests test tests
309 - elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
310 - cmake_comment_add_subdirectory autotests test tests
311 - fi
312 - fi
313 - # in frameworks, tests = manual tests so never build them
314 - if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then
315 - cmake_comment_add_subdirectory tests
316 - fi
317 - ;;
318 - *) ecm_src_prepare ;;
319 - esac
320 -
321 - # PORTING: bogus, overzealous 'en' docbook disabling is not carried over
322 - if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then
323 - if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then
324 - pushd ${KDE_DOC_DIR} > /dev/null || die
325 - local lang
326 - for lang in *; do
327 - if ! has ${lang} ${LINGUAS} ; then
328 - cmake_comment_add_subdirectory ${lang}
329 - fi
330 - done
331 - popd > /dev/null || die
332 - fi
333 - fi
334 -}
335 -
336 -# @FUNCTION: kde5_src_configure
337 -# @DESCRIPTION:
338 -# Wrapper for cmake-utils_src_configure with extra logic for magic handling of
339 -# handbook, tests etc.
340 -kde5_src_configure() {
341 - debug-print-function ${FUNCNAME} "$@"
342 - case ${KDE_AUTODEPS} in
343 - false)
344 - # we rely on cmake-utils.eclass to append -DNDEBUG too
345 - if in_iuse debug && ! use debug; then
346 - append-cppflags -DQT_NO_DEBUG
347 - fi
348 -
349 - local cmakeargs
350 -
351 - if in_iuse test && ! use test ; then
352 - cmakeargs+=( -DBUILD_TESTING=OFF )
353 -
354 - if [[ ${KDE_TEST} = optional ]] ; then
355 - cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON )
356 - fi
357 - fi
358 - if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then
359 - cmakeargs+=(
360 - # install mkspecs in the same directory as qt stuff
361 - -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
362 - # move handbook outside of doc dir, bug 667138
363 - -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help"
364 - )
365 - fi
366 -
367 - # allow the ebuild to override what we set here
368 - mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
369 -
370 - cmake-utils_src_configure
371 - ;;
372 - *) ecm_src_configure ;;
373 - esac
374 -}
375 -
376 -# @FUNCTION: kde5_src_compile
377 -# @DESCRIPTION:
378 -# Wrapper for cmake-utils_src_compile. Currently doesn't do anything extra, but
379 -# is included as part of the API just in case it's needed in the future.
380 -kde5_src_compile() {
381 - debug-print-function ${FUNCNAME} "$@"
382 - case ${KDE_AUTODEPS} in
383 - false) cmake-utils_src_compile ;;
384 - *) ecm_src_compile ;;
385 - esac
386 -}
387 -
388 -# @FUNCTION: kde5_src_test
389 -# @DESCRIPTION:
390 -# Wrapper for cmake-utils_src_test with extra logic for magic handling of dbus
391 -# and virtualx.
392 -kde5_src_test() {
393 - debug-print-function ${FUNCNAME} "$@"
394 - case ${KDE_AUTODEPS} in
395 - false) cmake-utils_src_test ;;
396 - *) ecm_src_test ;;
397 - esac
398 -}
399 -
400 -# @FUNCTION: kde5_src_install
401 -# @DESCRIPTION:
402 -# Wrapper for cmake-utils_src_install. Currently doesn't do anything extra.
403 -kde5_src_install() {
404 - debug-print-function ${FUNCNAME} "$@"
405 - case ${KDE_AUTODEPS} in
406 - false) cmake-utils_src_install ;;
407 - *) ecm_src_install ;;
408 - esac
409 -}
410 -
411 -# @FUNCTION: kde5_pkg_preinst
412 -# @DESCRIPTION:
413 -# Sets up environment variables required in kde5_pkg_postinst.
414 -kde5_pkg_preinst() {
415 - debug-print-function ${FUNCNAME} "$@"
416 - case ${KDE_AUTODEPS} in
417 - false) xdg_pkg_preinst ;;
418 - *) ecm_pkg_preinst ;;
419 - esac
420 -}
421 -
422 -# @FUNCTION: kde5_pkg_postinst
423 -# @DESCRIPTION:
424 -# Updates the various XDG caches (icon, desktop, mime) if necessary.
425 -kde5_pkg_postinst() {
426 - debug-print-function ${FUNCNAME} "$@"
427 - case ${KDE_AUTODEPS} in
428 - false) xdg_pkg_postinst ;;
429 - *) ecm_pkg_postinst ;;
430 - esac
431 -}
432 -
433 -# @FUNCTION: kde5_pkg_postrm
434 -# @DESCRIPTION:
435 -# Updates the various XDG caches (icon, desktop, mime) if necessary.
436 -kde5_pkg_postrm() {
437 - debug-print-function ${FUNCNAME} "$@"
438 - case ${KDE_AUTODEPS} in
439 - false) xdg_pkg_postrm ;;
440 - *) ecm_pkg_postrm ;;
441 - esac
442 -}
443 -
444 -fi