Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 06 Apr 2018 01:34:46
Message-Id: 1522978464.d6267b0f1b02f0a69ef44c3aa923a3d75d097726.asturm@gentoo
1 commit: d6267b0f1b02f0a69ef44c3aa923a3d75d097726
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 6 00:55:40 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 6 01:34:24 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6267b0f
7
8 kde4-meta.eclass: Remove last-rited eclass
9
10 Closes: https://bugs.gentoo.org/637774
11
12 eclass/kde4-meta.eclass | 631 ------------------------------------------------
13 1 file changed, 631 deletions(-)
14
15 diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass
16 deleted file mode 100644
17 index 88d9ef89ad1..00000000000
18 --- a/eclass/kde4-meta.eclass
19 +++ /dev/null
20 @@ -1,631 +0,0 @@
21 -# Copyright 1999-2016 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -#
24 -# @DEAD
25 -# Removal on 2018-03-06.
26 -# @ECLASS: kde4-meta.eclass
27 -# @MAINTAINER:
28 -# kde@g.o
29 -# @BLURB: Eclass for writing "split" KDE packages.
30 -# @DESCRIPTION:
31 -# This eclass provides all necessary functions for writing split KDE ebuilds.
32 -#
33 -# You must define KMNAME to use this eclass, and do so before inheriting it. All other variables are optional.
34 -# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY.
35 -
36 -if [[ -z ${_KDE4_META_ECLASS} ]]; then
37 -_KDE4_META_ECLASS=1
38 -
39 -[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
40 -
41 -inherit kde4-base
42 -
43 -KDEMETA_EXPF="pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm"
44 -EXPORT_FUNCTIONS ${KDEMETA_EXPF}
45 -
46 -# Add dependencies that all packages in a certain module share.
47 -case ${KMNAME} in
48 - kdepim|kdepim-runtime)
49 - case ${PN} in
50 - akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
51 - IUSE+=" +kontact"
52 - RDEPEND+=" kontact? ( $(add_kdeapps_dep kontact '' ${PV}) )"
53 - ;;
54 - esac
55 - ;;
56 -esac
57 -
58 -DEPEND+=" ${COMMONDEPEND}"
59 -RDEPEND+=" ${COMMONDEPEND}"
60 -unset COMMONDEPEND
61 -
62 -debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
63 -debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
64 -
65 -# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc)
66 -case ${KDE_BUILD_TYPE} in
67 - live)
68 - if [[ ${KDE_SCM} == svn ]]; then
69 - case ${KMNAME} in
70 - extragear*|playground*)
71 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
72 - ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
73 - ;;
74 - esac
75 - fi
76 - ;;
77 -esac
78 -
79 -# @ECLASS-VARIABLE: KMNAME
80 -# @DESCRIPTION:
81 -# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it
82 -# _before_ inheriting this eclass, (unlike the other parameters), since it's
83 -# used to set $SRC_URI.
84 -
85 -# @ECLASS-VARIABLE: KMMODULE
86 -# @DESCRIPTION:
87 -# Specify exactly one subdirectory of $KMNAME here. Defaults to $PN.
88 -# The subdirectory listed here is treated exactly like items in $KMEXTRA.
89 -#
90 -# Example: The ebuild name of "kdebase/l10n" is kde-base/kdebase-l10n, because
91 -# just 'l10n' would be too confusing. Hence it sets KMMODULE="l10n".
92 -
93 -# @ECLASS-VARIABLE: KMNOMODULE
94 -# @DESCRIPTION:
95 -# If set to "true", $KMMODULE doesn't have to be defined.
96 -#
97 -# Example usage: If you're installing subdirectories of a package, like plugins,
98 -# you mark the top subdirectory (containing the package) as $KMEXTRACTONLY, and
99 -# set KMNOMODULE="true".
100 -if [[ -z ${KMMODULE} ]] && [[ ${KMNOMODULE} != true ]]; then
101 - KMMODULE=${PN}
102 -fi
103 -
104 -# @ECLASS-VARIABLE: KMEXTRA
105 -# @DESCRIPTION:
106 -# All subdirectories listed here will be extracted, compiled & installed.
107 -# $KMMODULE is always added to $KMEXTRA.
108 -# If KDE_HANDBOOK is 'always' or 'optional' and handbook USE-flag is set, and if this
109 -# directory exists, then "doc/$KMMODULE" is added to $KMEXTRA. If there's additional
110 -# documentation in different subdirectories, it should be added to KMEXTRA manually..
111 -
112 -# @ECLASS-VARIABLE: KMCOMPILEONLY
113 -# @DESCRIPTION:
114 -# All subdirectories listed here will be extracted & compiled, but not installed.
115 -
116 -# TODO: better formulation may be needed
117 -# @ECLASS-VARIABLE: KMEXTRACTONLY
118 -# @DESCRIPTION:
119 -# All subdirectories listed here will be extracted, but neither compiled nor installed.
120 -# This can be used to avoid compilation in a subdirectory of a directory in $KMMODULE or $KMEXTRA
121 -
122 -# @ECLASS-VARIABLE: KMTARPARAMS
123 -# @DESCRIPTION:
124 -# Specify extra parameters to pass to tar, in kde4-meta_src_extract.
125 -# '-xpf -j' are passed to tar by default.
126 -
127 -# @FUNCTION: kde4-meta_pkg_setup
128 -# @DESCRIPTION:
129 -# Currently calls its equivalent in kde4-base.eclass(5) and checks the gcc version.
130 -# Use this one in split ebuilds.
131 -kde4-meta_pkg_setup() {
132 - debug-print-function ${FUNCNAME} "$@"
133 -
134 - kde4-base_pkg_setup
135 -}
136 -
137 -# @FUNCTION: kde4-meta_src_unpack
138 -# @DESCRIPTION:
139 -# This function unpacks the source for split ebuilds.
140 -# Further more is processed in kde4-meta_src_extract
141 -kde4-meta_src_unpack() {
142 - debug-print-function ${FUNCNAME} "$@"
143 -
144 - if [[ ${KDE_BUILD_TYPE} = live ]]; then
145 - case "${KDE_SCM}" in
146 - svn)
147 - S="${WORKDIR}/${P}"
148 - mkdir -p "${S}"
149 - ESVN_RESTRICT="export" subversion_src_unpack
150 - subversion_wc_info
151 - subversion_bootstrap
152 - ;;
153 - git)
154 - git-r3_src_unpack
155 - ;;
156 - esac
157 - fi
158 - kde4-meta_src_extract
159 -}
160 -
161 -# @FUNCTION: kde4-meta_src_extract
162 -# @DESCRIPTION:
163 -# A function to extract the source for a split KDE ebuild.
164 -# Also see KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and
165 -# KMTARPARAMS.
166 -kde4-meta_src_extract() {
167 - debug-print-function ${FUNCNAME} "$@"
168 -
169 - if [[ ${KDE_BUILD_TYPE} = live ]]; then
170 - # Export working copy to ${S}
171 - einfo "Exporting parts of working copy to ${S}"
172 - kde4-meta_create_extractlists
173 -
174 - case ${KDE_SCM} in
175 - svn)
176 - local rsync_options subdir targetdir wc_path escm
177 -
178 - rsync_options="--group --links --owner --perms --quiet --exclude=.svn/ --exclude=.git/"
179 - wc_path="${ESVN_WC_PATH}"
180 - escm="{ESVN}"
181 -
182 - # Copy ${KMNAME} non-recursively (toplevel files)
183 - rsync ${rsync_options} "${wc_path}"/* "${S}" \
184 - || die "${escm}: can't export toplevel files to '${S}'."
185 - # Copy cmake directory
186 - if [[ -d "${wc_path}/cmake" ]]; then
187 - rsync --recursive ${rsync_options} "${wc_path}/cmake" "${S}" \
188 - || die "${escm}: can't export cmake files to '${S}'."
189 - fi
190 - # Copy all subdirectories
191 - for subdir in $(_list_needed_subdirectories); do
192 - targetdir=""
193 - if [[ $subdir = doc/* && ! -e "$wc_path/$subdir" ]]; then
194 - continue
195 - fi
196 -
197 - [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}"
198 - rsync --recursive ${rsync_options} "${wc_path}/${subdir%/}" "${S}/${targetdir}" \
199 - || die "${escm}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'."
200 - done
201 - ;;
202 - esac
203 - else
204 - local abort tarball tarfile f extractlist postfix
205 -
206 - if [[ ${PV} =~ 4.4.11 ]]; then
207 - postfix="bz2"
208 - KMTARPARAMS+=" --bzip2"
209 - else
210 - postfix="xz"
211 - KMTARPARAMS+=" --xz"
212 - fi
213 -
214 - tarball="${KMNAME}-${PV}.tar.${postfix}"
215 -
216 - # Full path to source tarball
217 - tarfile="${DISTDIR}/${tarball}"
218 -
219 - # Detect real toplevel dir from tarball name - it will be used upon extraction
220 - # and in _list_needed_subdirectories
221 - topdir="${tarball%.tar.*}/"
222 -
223 - ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"
224 -
225 - kde4-meta_create_extractlists
226 -
227 - for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake
228 - do
229 - extractlist+=" ${topdir}${f}"
230 - done
231 - extractlist+=" $(_list_needed_subdirectories)"
232 -
233 - pushd "${WORKDIR}" > /dev/null || die
234 -
235 - # @ECLASS-VARIABLE: KDE4_STRICTER
236 - # @DESCRIPTION:
237 - # Print out all issues found executing tar / kmextract files
238 - # Set on if you want to find issues in kde-base ebuild unpack sequences
239 - [[ -n ${KDE4_STRICTER} ]] && echo 'tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist}'
240 - tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null || echo "tar extract command failed at least partially - continuing anyway"
241 -
242 - # Default $S is based on $P; rename the extracted directory to match $S if necessary
243 - if [[ ${KMNAME} != ${PN} ]]; then
244 - mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\""
245 - fi
246 -
247 - popd > /dev/null || die
248 -
249 - eend $?
250 -
251 - if [[ -n ${KDE4_STRICTER} ]]; then
252 - for f in $(_list_needed_subdirectories fatal); do
253 - if [[ ! -e ${S}/${f#*/} ]]; then
254 - eerror "'${f#*/}' is missing"
255 - abort=true
256 - fi
257 - done
258 - [[ -n ${abort} ]] && die "There were missing files."
259 - fi
260 -
261 - # We don't need it anymore
262 - unset topdir
263 - fi
264 -}
265 -
266 -# @FUNCTION: kde4-meta_create_extractlists
267 -# @DESCRIPTION:
268 -# Create lists of files and subdirectories to extract.
269 -# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
270 -# KMEXTRACTONLY and KMTARPARAMS.
271 -kde4-meta_create_extractlists() {
272 - debug-print-function ${FUNCNAME} "$@"
273 -
274 - # Add default handbook locations
275 - # FIXME - legacy code - remove when 4.4.5 is gone or preferrably port 4.4.5.
276 - if [[ $(get_kde_version) < 4.5 ]] && use_if_iuse handbook && [[ -z ${KMNOMODULE} ]]; then
277 - # We use the basename of $KMMODULE because $KMMODULE can contain
278 - # the path to the module subdirectory.
279 - KMEXTRA_NONFATAL+="
280 - doc/${KMMODULE##*/}"
281 - fi
282 -
283 - # Add default handbook locations
284 - if [[ -z ${KMNOMODULE} ]] && ( [[ ${KDE_HANDBOOK} == always ]] || ( [[ ${KDE_HANDBOOK} == optional ]] && use handbook ) ); then
285 - KMEXTRA_NONFATAL+=" doc/${KMMODULE##*/}"
286 - fi
287 -
288 - # Add some CMake-files to KMEXTRACTONLY.
289 - # Note that this actually doesn't include KMEXTRA handling.
290 - # In those cases you should care to add the relevant files to KMEXTRACTONLY
291 - case ${KMNAME} in
292 - kde-baseapps)
293 - KMEXTRACTONLY+="
294 - CTestConfig.cmake
295 - config-apps.h.cmake
296 - ConfigureChecks.cmake"
297 - ;;
298 - kde-runtime)
299 - KMEXTRACTONLY+="
300 - cmake/modules/
301 - CTestConfig.cmake
302 - config-runtime.h.cmake"
303 - ;;
304 - kde-workspace)
305 - KMEXTRACTONLY+="
306 - cmake/modules/
307 - config-unix.h.cmake
308 - ConfigureChecks.cmake
309 - config-workspace.h.cmake
310 - config-X11.h.cmake
311 - startkde.cmake
312 - KDE4WorkspaceConfig.cmake.in"
313 - ;;
314 - kdepim)
315 - if [[ ${PN} != libkdepim ]]; then
316 - KMEXTRACTONLY+="
317 - libkdepim/"
318 - fi
319 - KMEXTRACTONLY+="
320 - config-enterprise.h.cmake
321 - kleopatra/ConfigureChecks.cmake
322 - CTestCustom.cmake
323 - kdepim-version.h.cmake
324 - kdepim-version.h"
325 - if use_if_iuse kontact; then
326 - KMEXTRA+="
327 - kontact/plugins/${PLUGINNAME:-${PN}}/"
328 - fi
329 - ;;
330 - esac
331 -
332 - debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}"
333 -}
334 -
335 -_list_needed_subdirectories() {
336 - local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
337 -
338 - # We expand KMEXTRA by adding CMakeLists.txt files
339 - kmextra="${KMEXTRA}"
340 - [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}"
341 - for i in ${kmextra}; do
342 - kmextra_expanded+=" ${i}"
343 - j=$(dirname ${i})
344 - while [[ ${j} != "." ]]; do
345 - kmextra_expanded+=" ${j}/CMakeLists.txt";
346 - j=$(dirname ${j})
347 - done
348 - done
349 -
350 - # Expand KMMODULE
351 - if [[ -n ${KMMODULE} ]]; then
352 - kmmodule_expanded="${KMMODULE}"
353 - j=$(dirname ${KMMODULE})
354 - while [[ ${j} != "." ]]; do
355 - kmmodule_expanded+=" ${j}/CMakeLists.txt";
356 - j=$(dirname ${j})
357 - done
358 - fi
359 -
360 - # Expand KMCOMPILEONLY
361 - for i in ${KMCOMPILEONLY}; do
362 - kmcompileonly_expanded+=" ${i}"
363 - j=$(dirname ${i})
364 - while [[ ${j} != "." ]]; do
365 - kmcompileonly_expanded+=" ${j}/CMakeLists.txt";
366 - j=$(dirname ${j})
367 - done
368 - done
369 -
370 - debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}"
371 - debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmmodule_expanded: ${kmmodule_expanded}"
372 - debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmcompileonly_expanded: ${kmcompileonly_expanded}"
373 -
374 - # Create final list of stuff to extract
375 - # We append topdir only when specified (usually for tarballs)
376 - for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
377 - ${KMEXTRACTONLY}
378 - do
379 - extractlist+=" ${topdir}${i}"
380 - done
381 -
382 - echo ${extractlist}
383 -}
384 -
385 -# @FUNCTION: kde4-meta_src_prepare
386 -# @DESCRIPTION:
387 -# Meta-package build system configuration handling - commenting out targets, etc..
388 -kde4-meta_src_prepare() {
389 - debug-print-function ${FUNCNAME} "$@"
390 -
391 - kde4-meta_change_cmakelists
392 - kde4-base_src_prepare
393 -}
394 -
395 -# @FUNCTION: _change_cmakelists_parent_dirs
396 -# @DESCRIPTION:
397 -# Adjust CMakeLists.txt to shadow subdirectories
398 -# that are not required for the build.
399 -_change_cmakelists_parent_dirs() {
400 - debug-print-function ${FUNCNAME} "$@"
401 -
402 - local _olddir _dir
403 - _dir="${S}"/${1}
404 - until [[ ${_dir} == ${S} ]]; do
405 - _olddir=$(basename "${_dir}")
406 - _dir=$(dirname "${_dir}")
407 - debug-print "${LINENO}: processing ${_dir} CMakeLists.txt searching for ${_olddir}"
408 - if [[ -f ${_dir}/CMakeLists.txt ]]; then
409 - sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${_olddir}[[:space:]]*)/s/#DONOTCOMPILE //g" \
410 - -e "/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${_olddir}[[:space:]]*)/s/#DONOTCOMPILE //g" \
411 - -i ${_dir}/CMakeLists.txt || die "${LINENO}: died in ${FUNCNAME} while processing ${_dir}"
412 - fi
413 - done
414 -}
415 -
416 -# @FUNCTION: kde4-meta_change_cmakelists
417 -# @DESCRIPTION:
418 -# Adjust CMakeLists.txt to comply to our splitting.
419 -kde4-meta_change_cmakelists() {
420 - debug-print-function ${FUNCNAME} "$@"
421 -
422 - pushd "${S}" > /dev/null || die
423 -
424 - comment_all_add_subdirectory ./
425 -
426 - # Restore "add_subdirectory( cmake )" in ${S}/CMakeLists.txt
427 - if [[ -f CMakeLists.txt ]]; then
428 - sed -e '/add_subdirectory[[:space:]]*([[:space:]]*cmake[[:space:]]*)/s/^#DONOTCOMPILE //' \
429 - -e '/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*cmake[[:space:]]*)/s/^#DONOTCOMPILE //' \
430 - -i CMakeLists.txt || die "${LINENO}: cmake sed died"
431 - fi
432 -
433 - # Restore "add_subdirectory( ${ ..." (this is done in kdesdk)
434 - if [[ -f CMakeLists.txt ]]; then
435 - sed -e '/add_subdirectory[[:space:]]*([[:space:]]*\${/s/^#DONOTCOMPILE //' \
436 - -e '/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*\${/s/^#DONOTCOMPILE //' \
437 - -i CMakeLists.txt || die "${LINENO}: cmake sed died"
438 - fi
439 -
440 - if [[ -z ${KMNOMODULE} ]]; then
441 - # Restore "add_subdirectory" in $KMMODULE subdirectories
442 - find "${S}"/${KMMODULE} -name CMakeLists.txt -print0 | \
443 - xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
444 - die "${LINENO}: died in KMMODULE section"
445 - _change_cmakelists_parent_dirs ${KMMODULE}
446 - fi
447 -
448 - local i
449 -
450 - # KMEXTRACTONLY section - Some ebuilds need to comment out some subdirs in KMMODULE and they use KMEXTRACTONLY
451 - for i in ${KMEXTRACTONLY}; do
452 - if [[ -d ${i} && -f ${i}/../CMakeLists.txt ]]; then
453 - sed -e "/([[:space:]]*$(basename $i)[[:space:]]*)/s/^/#DONOTCOMPILE /" \
454 - -i ${i}/../CMakeLists.txt || \
455 - die "${LINENO}: sed died while working in the KMEXTRACTONLY section while processing ${i}"
456 - fi
457 - done
458 -
459 - # KMCOMPILEONLY
460 - for i in ${KMCOMPILEONLY}; do
461 - debug-print "${LINENO}: KMCOMPILEONLY, processing ${i}"
462 - # Uncomment "add_subdirectory" instructions inside $KMCOMPILEONLY, then comment "install" instructions.
463 - find "${S}"/${i} -name CMakeLists.txt -print0 | \
464 - xargs -0 sed -i \
465 - -e 's/^#DONOTCOMPILE //g' \
466 - -e '/install(.*)/I{s/^/#DONOTINSTALL /;}' \
467 - -e '/^install(/,/)/I{s/^/#DONOTINSTALL /;}' \
468 - -e '/kde4_install_icons(.*)/I{s/^/#DONOTINSTALL /;}' || \
469 - die "${LINENO}: sed died in the KMCOMPILEONLY section while processing ${i}"
470 - _change_cmakelists_parent_dirs ${i}
471 - done
472 -
473 - # KMEXTRA section
474 - for i in ${KMEXTRA}; do
475 - debug-print "${LINENO}: KMEXTRA section, processing ${i}"
476 - find "${S}"/${i} -name CMakeLists.txt -print0 | \
477 - xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
478 - die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}"
479 - _change_cmakelists_parent_dirs ${i}
480 - done
481 - # KMEXTRA_NONFATAL section
482 - for i in ${KMEXTRA_NONFATAL}; do
483 - if [[ -d "${S}"/${i} ]]; then
484 - find "${S}"/${i} -name CMakeLists.txt -print0 | \
485 - xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
486 - die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}"
487 - _change_cmakelists_parent_dirs ${i}
488 - fi
489 - done
490 -
491 - case ${KMNAME} in
492 - kde-workspace)
493 - # COLLISION PROTECT section
494 - # Install the startkde script just once, as a part of kde-plasma/kdebase-startkde,
495 - # not as a part of every package.
496 - if [[ ${PN} != kdebase-startkde && -f CMakeLists.txt ]]; then
497 - # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0.
498 - sed -e '/startkde/s/^/#DONOTINSTALL /' \
499 - -i CMakeLists.txt || die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
500 - fi
501 - # Remove workspace target prefix in order to get direct linking to workspace libs
502 - sed -e '/set(KDE4WORKSPACE_TARGET_PREFIX/s/^/#OVERRIDE /' \
503 - -i CMakeLists.txt || die "${LINENO}: sed died in KDE4WORKSPACE_TARGET_PREFIX removal section"
504 - # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82
505 - if [[ ${PN} != libkworkspace ]]; then
506 - sed -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
507 - -i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace strip config install and fix EXPORT section"
508 - fi
509 - # <KDE/4.11
510 - if [[ ${PN} != plasma-workspace ]]; then
511 - sed -e '/KActivities/s/REQUIRED//' \
512 - -i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace dep reduction section"
513 - fi
514 - sed -e '/QImageBlitz/s/REQUIRED//' \
515 - -i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace dep reduction section 2"
516 -
517 - # >=KDE/4.11
518 - sed -e 's/TYPE REQUIRED/TYPE OPTIONAL/' -e 's/XCB REQUIRED/XCB/' -e 's/X11 REQUIRED/X11/' \
519 - -e 's/message(FATAL_ERROR/message(/' -i CMakeLists.txt \
520 - || die "${LINENO}: sed died in kde-workspace dep reduction section"
521 - if [[ "${PN}" != "kwin" ]]; then
522 - sed -i -e "/^ macro_log_feature(OPENGL_OR_ES_FOUND/s/TRUE/FALSE/" \
523 - "${S}"/CMakeLists.txt || die "${LINENO}: sed died removing kde-workspace opengl dependency"
524 - fi
525 - ;;
526 - kde-runtime)
527 - sed -e 's/TYPE REQUIRED/TYPE OPTIONAL/' -e '/LibGcrypt/s/REQUIRED//' -i CMakeLists.txt \
528 - || die "${LINENO}: sed died in kde-runtime dep reduction section"
529 -
530 - # COLLISION PROTECT section
531 - # Only install the kde4 script as part of kde-base/kdebase-data
532 - if [[ ${PN} != kdebase-data && -f CMakeLists.txt ]]; then
533 - sed -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
534 - -i CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
535 - fi
536 - ;;
537 - kdenetwork)
538 - # Disable hardcoded kdepimlibs check
539 - sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
540 - -i CMakeLists.txt || die "failed to disable hardcoded checks"
541 - ;;
542 - kdepim)
543 - # Disable hardcoded checks
544 - sed -r -e 's/TYPE REQUIRED/TYPE OPTIONAL/' -e '/find_package\(KdepimLibs/s/REQUIRED//' \
545 - -e '/find_package\((KdepimLibs|Boost|QGpgme|Akonadi|ZLIB|Strigi|SharedDesktopOntologies|Soprano|Nepomuk)/{/macro_optional_/!s/find/macro_optional_&/}' \
546 - -e '/macro_log_feature\((Boost|QGPGME|Akonadi|ZLIB|STRIGI|SHAREDDESKTOPONTOLOGIES|Soprano|Nepomuk)_FOUND/s/ TRUE / FALSE /' \
547 - -e 's/if[[:space:]]*([[:space:]]*BUILD_.*)[[:space:]]*/if(1) # &/' \
548 - -e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \
549 - -i CMakeLists.txt || die "failed to disable hardcoded checks"
550 - # Disable broken or redundant build logic
551 - if use_if_iuse kontact || [[ ${PN} = kontact ]]; then
552 - sed -e 's/if[[:space:]]*([[:space:]]*BUILD_.*)[[:space:]]*$/if(1) # &/' \
553 - -e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \
554 - -i kontact/plugins/CMakeLists.txt || die 'failed to override build logic'
555 - fi
556 - case ${PV} in
557 - 4.4*)
558 - case ${PN} in
559 - kalarm|kmailcvt|kontact|korganizer|korn)
560 - sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
561 - -e '/add_custom_target(kmail_xml /,/)/p' \
562 - -i kmail/CMakeLists.txt || die "uncommenting xml failed"
563 - _change_cmakelists_parent_dirs kmail
564 - ;;
565 - esac
566 - ;;
567 - esac
568 - ;;
569 - esac
570 -
571 - popd > /dev/null || die
572 -}
573 -
574 -# @FUNCTION: kde4-meta_src_configure
575 -# @DESCRIPTION:
576 -# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
577 -# ebuilds.
578 -kde4-meta_src_configure() {
579 - debug-print-function ${FUNCNAME} "$@"
580 -
581 - kde4-base_src_configure
582 -}
583 -
584 -# @FUNCTION: kde4-meta_src_compile
585 -# @DESCRIPTION:
586 -# General function for compiling split KDE4 applications.
587 -# Overrides kde4-base_src_compile.
588 -kde4-meta_src_compile() {
589 - debug-print-function ${FUNCNAME} "$@"
590 -
591 - kde4-base_src_compile "$@"
592 -}
593 -
594 -# @FUNCTION: kde4-meta_src_test
595 -# @DESCRIPTION:
596 -# Currently just calls its equivalent in kde4-base.eclass(5) if
597 -# I_KNOW_WHAT_I_AM_DOING is set. Use this in split ebuilds.
598 -kde4-meta_src_test() {
599 - debug-print-function ${FUNCNAME} "$@"
600 -
601 - if [[ $I_KNOW_WHAT_I_AM_DOING ]]; then
602 - kde4-base_src_test
603 - else
604 - einfo "Tests disabled"
605 - fi
606 -}
607 -
608 -# @FUNCTION: kde4-meta_src_install
609 -# @DESCRIPTION:
610 -# Function for installing KDE4 split applications.
611 -kde4-meta_src_install() {
612 - debug-print-function ${FUNCNAME} "$@"
613 -
614 - # Search ${S}/${KMMODULE} and install common documentation files found
615 - local doc
616 - for doc in "${S}/${KMMODULE}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
617 - [[ -f "${doc}" ]] && [[ -s "${doc}" ]] && dodoc "${doc}"
618 - done
619 -
620 - kde4-base_src_install
621 -}
622 -
623 -# @FUNCTION: kde4-meta_pkg_preinst
624 -# @DESCRIPTION:
625 -# Invoke its equivalent in kde4-base.eclass.
626 -kde4-meta_pkg_preinst() {
627 - debug-print-function ${FUNCNAME} "$@"
628 -
629 - kde4-base_pkg_preinst
630 -}
631 -
632 -# @FUNCTION: kde4-meta_pkg_postinst
633 -# @DESCRIPTION:
634 -# Invoke kbuildsycoca4.
635 -kde4-meta_pkg_postinst() {
636 - debug-print-function ${FUNCNAME} "$@"
637 -
638 - kde4-base_pkg_postinst
639 -}
640 -
641 -# @FUNCTION: kde4-meta_pkg_postrm
642 -# @DESCRIPTION:
643 -# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
644 -# ebuilds.
645 -kde4-meta_pkg_postrm() {
646 - debug-print-function ${FUNCNAME} "$@"
647 -
648 - kde4-base_pkg_postrm
649 -}
650 -
651 -fi