/[gentoo-x86]/eclass/kde4-meta.eclass
Gentoo

Diff of /eclass/kde4-meta.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.11 Revision 1.21
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.11 2009/03/01 11:44:09 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.21 2009/05/29 10:29:10 dagger Exp $
4# 4#
5# @ECLASS: kde4-meta.eclass 5# @ECLASS: kde4-meta.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: Eclass for writing "split" KDE packages. 8# @BLURB: Eclass for writing "split" KDE packages.
29 HOMEPAGE="http://www.koffice.org/" 29 HOMEPAGE="http://www.koffice.org/"
30 LICENSE="GPL-2" 30 LICENSE="GPL-2"
31 ;; 31 ;;
32esac 32esac
33 33
34# Add khelpcenter dependency when installing
35if [[ ${PN} != khelpcenter ]] && has doc ${IUSE//+} && use doc; then
36 RDEPEND="${RDEPEND}
37 >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=]
38 "
39fi
40
34# Add dependencies that all packages in a certain module share. 41# Add dependencies that all packages in a certain module share.
35case ${KMNAME} in 42case ${KMNAME} in
36 kdebase|kdebase-workspace|kdebase-runtime) 43 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphic)
44 DEPEND="${DEPEND}
37 DEPEND="${DEPEND} >=kde-base/qimageblitz-0.0.4" 45 >=kde-base/qimageblitz-0.0.4
38 RDEPEND="${RDEPEND} >=kde-base/qimageblitz-0.0.4" 46 "
47 RDEPEND="${RDEPEND}
48 >=kde-base/qimageblitz-0.0.4
49 "
50 ;;
51 kdenetwork)
52 DEPEND="${DEPEND}
53 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
54 "
55 RDEPEND="${RDEPEND}
56 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
57 "
39 ;; 58 ;;
40 kdepim) 59 kdepim)
41 DEPEND="${DEPEND} dev-libs/boost app-office/akonadi-server" 60 DEPEND="${DEPEND}
42 RDEPEND="${RDEPEND} dev-libs/boost" 61 dev-libs/boost
43 if [[ ${PN} != kode ]]; then
44 DEPEND="${DEPEND} >=kde-base/kode-${PV}:${SLOT}[kdeprefix=]" 62 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
45 RDEPEND="${RDEPEND} >=kde-base/kode-${PV}:${SLOT}[kdeprefix=]" 63 "
46 fi 64 RDEPEND="${RDEPEND}
65 dev-libs/boost
66 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
67 "
47 case ${PN} in 68 case ${PN} in
48 akregator|kaddressbook|kjots|kmail|kmobiletools|knode|knotes|korganizer|ktimetracker) 69 akregator|kaddressbook|kjots|kmail|kmobiletools|knode|knotes|korganizer|ktimetracker)
49 IUSE="+kontact" 70 IUSE="+kontact"
71 RDEPEND="${RDEPEND}
50 DEPEND="${DEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )" 72 kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )
51 RDEPEND="${RDEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )" 73 "
52 ;; 74 ;;
53 esac 75 esac
54 ;; 76 ;;
55 kdegames) 77 kdegames)
56 if [[ ${PN} != libkdegames ]]; then 78 if [[ ${PN} != libkdegames ]]; then
79 DEPEND="${DEPEND}
57 DEPEND="${DEPEND} >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]" 80 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]
81 "
82 RDEPEND="${RDEPEND}
58 RDEPEND="${RDEPEND} >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]" 83 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]
84 "
59 fi 85 fi
60 ;; 86 ;;
61 koffice) 87 koffice)
62 [[ ${PN} != koffice-data ]] && IUSE="debug" 88 [[ ${PN} != koffice-data ]] && IUSE="debug"
63 case ${PV} in
64 9999*) DEPEND="${DEPEND} !app-office/${PN}:2" ;;
65 1.9*|2*) DEPEND="${DEPEND} !app-office/${PN}:live" ;;
66 esac
67 DEPEND="${DEPEND} 89 RDEPEND="${RDEPEND}
68 !app-office/${PN}:0 90 !app-office/${PN}:0
69 !app-office/koffice:0 91 !app-office/koffice:0
70 !app-office/koffice-meta:0" 92 !app-office/koffice-meta:0
71 case ${PN} in 93 "
72 koffice-data) 94 if has openexr ${IUSE//+}; then
73 DEPEND="${DEPEND} media-libs/lcms" 95 COMMON_DEPEND="media-gfx/imagemagick[openexr?]"
74 RDEPEND="${RDEPEND} media-libs/lcms" 96 else
75 ;; 97 COMMON_DEPEND="media-gfx/imagemagick"
76 *) 98 fi
77 DEPEND="${DEPEND} 99
100 COMMON_DEPEND="${COMMON_DEPEND}
78 dev-cpp/eigen:2 101 dev-cpp/eigen:2
79 media-gfx/imagemagick[openexr?]
80 media-libs/fontconfig 102 media-libs/fontconfig
81 media-libs/freetype:2 103 media-libs/freetype:2
82 " 104 "
83 RDEPEND="${DEPEND}" 105 DEPEND="${DEPEND} ${COMMON_DEPEND}"
106 RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
107 unset COMMON_DEPEND
84 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then 108 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
85 DEPEND="${DEPEND} 109 DEPEND="${DEPEND}
86 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]" 110 >=app-office/koffice-libs-${PV}:${SLOT}
111 "
87 RDEPEND="${RDEPEND} 112 RDEPEND="${RDEPEND}
88 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]" 113 >=app-office/koffice-libs-${PV}:${SLOT}
114 "
89 fi 115 fi
90 ;;
91 esac
92 ;; 116 ;;
93esac 117esac
94 118
95debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies" 119debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
96debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies" 120debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
97 121
98# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc) 122# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc)
99case ${SLOT} in 123case ${BUILD_TYPE} in
100 live) 124 live)
101 case ${KMNAME} in 125 case ${KMNAME} in
102 extragear*|playground*) 126 extragear*|playground*)
103 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 127 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
128 ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
104 ;; 129 ;;
105 esac 130 esac
106 ;; 131 ;;
107esac 132esac
108 133
133 158
134# @ECLASS-VARIABLE: KMEXTRA 159# @ECLASS-VARIABLE: KMEXTRA
135# @DESCRIPTION: 160# @DESCRIPTION:
136# All subdirectories listed here will be extracted, compiled & installed. 161# All subdirectories listed here will be extracted, compiled & installed.
137# $KMMODULE is always added to $KMEXTRA. 162# $KMMODULE is always added to $KMEXTRA.
138# If the htmlhandbook USE-flag is set, and if this directory exists, 163# If the doc USE-flag is set, and if this directory exists,
139# then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be 164# then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be
140# handled in the ebuild. 165# handled in the ebuild.
141# If the documentation is in a different subdirectory, you should add it to KMEXTRA. 166# If the documentation is in a different subdirectory, you should add it to KMEXTRA.
142 167
143# @ECLASS-VARIABLE: KMCOMPILEONLY 168# @ECLASS-VARIABLE: KMCOMPILEONLY
211 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}cmake" "${S}" \ 236 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}cmake" "${S}" \
212 || die "${ESVN}: can't export cmake files to '${S}'." 237 || die "${ESVN}: can't export cmake files to '${S}'."
213 fi 238 fi
214 # Copy all subdirectories 239 # Copy all subdirectories
215 for subdir in $(__list_needed_subdirectories); do 240 for subdir in $(__list_needed_subdirectories); do
216 targetdir="" 241 targetdir=""
217 if [[ $subdir = doc/* && ! -e "$ESVN_WC_PATH/$kmnamedir$subdir" ]]; then 242 if [[ $subdir = doc/* && ! -e "$ESVN_WC_PATH/$kmnamedir$subdir" ]]; then
218 continue 243 continue
219 fi 244 fi
220 245
221 [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}" 246 [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}"
222 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}${subdir%/}" "${S}/${targetdir}" \ 247 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}${subdir%/}" "${S}/${targetdir}" \
223 || die "${ESVN}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'." 248 || die "${ESVN}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'."
224 done 249 done
225 250
226 if [[ ${KMNAME} = kdebase-runtime && ${PN} != kdebase-data ]]; then 251 if [[ ${KMNAME} = kdebase-runtime && ${PN} != kdebase-data ]]; then
227 sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \ 252 sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
228 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 253 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
229 fi 254 fi
230 else 255 else
231 local abort tarball tarfile f extractlist moduleprefix 256 local abort tarball tarfile f extractlist moduleprefix postfix
232 257 case ${PV} in
233 case $KMNAME in 258 4.2.85)
234 kdebase-apps) 259 # block for normally packed upstream unstable snapshots
235 tarball="${KMNAME#-apps}-${PV}.tar.bz2" 260 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
261 postfix="bz2"
262 ;;
263 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
264 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma
265 postfix="lzma"
236 ;; 266 ;;
237 *) 267 *)
238 tarball="${KMNAME}-${PV}.tar.bz2" 268 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
269 postfix="bz2"
239 ;; 270 ;;
240 esac 271 esac
272 case ${KMNAME} in
273 kdebase-apps)
274 # kdebase/apps -> kdebasa-apps
275 tarball="kdebase-${PV}.tar.${postfix}"
276 # Go one level deeper for kdebase-apps in tarballs
277 moduleprefix=apps/
278 KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||"
279 ;;
280 *)
281 # Create tarball name from module name (this is the default)
282 tarball="${KMNAME}-${PV}.tar.${postfix}"
283 ;;
284 esac
285
286 # Full patch to source tarball
241 tarfile="${DISTDIR}/${tarball}" 287 tarfile="${DISTDIR}/${tarball}"
288
289 # Detect real toplevel dir from tarball name - it will be used upon extraction
290 # and in __list_needed_subdirectories
291 topdir="${tarball%.tar.*}/"
242 292
243 ebegin "Unpacking parts of ${tarball} to ${WORKDIR}" 293 ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"
244 294
245 kde4-meta_create_extractlists 295 kde4-meta_create_extractlists
246 296
247 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ 297 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
248 AUTHORS COPYING INSTALL README NEWS ChangeLog 298 AUTHORS COPYING INSTALL README NEWS ChangeLog
249 do 299 do
250 extractlist="${extractlist} ${KMNAME}-${PV}/${f}" 300 extractlist="${extractlist} ${topdir}${moduleprefix}${f}"
251 done 301 done
252 extractlist="${extractlist} $(__list_needed_subdirectories)" 302 extractlist="${extractlist} $(__list_needed_subdirectories)"
253 KMTARPARAMS="${KMTARPARAMS} -j"
254 303
255 pushd "${WORKDIR}" > /dev/null 304 pushd "${WORKDIR}" > /dev/null
256 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 305 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
257 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null 306 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null
258 307
259 # Default $S is based on $P; rename the extracted directory to match $S if necessary 308 # Default $S is based on $P; rename the extracted directory to match $S if necessary
260 mv ${KMNAME}-${PV} ${P} || die "Died while moving \"${KMNAME}-${PV}\" to \"${P}\"" 309 mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\""
261 310
262 popd > /dev/null 311 popd > /dev/null
263 312
264 eend $? 313 eend $?
265 314
273 abort=true 322 abort=true
274 fi 323 fi
275 done 324 done
276 [[ -n ${abort} ]] && die "There were missing files." 325 [[ -n ${abort} ]] && die "There were missing files."
277 fi 326 fi
327
328 # We don't need it anymore
329 unset topdir
278 fi 330 fi
279} 331}
280 332
281# @FUNCTION: kde4-meta_create_extractlists 333# @FUNCTION: kde4-meta_create_extractlists
282# @DESCRIPTION: 334# @DESCRIPTION:
284# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 336# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
285# KMEXTRACTONLY and KMTARPARAMS. 337# KMEXTRACTONLY and KMTARPARAMS.
286kde4-meta_create_extractlists() { 338kde4-meta_create_extractlists() {
287 debug-print-function ${FUNCNAME} "$@" 339 debug-print-function ${FUNCNAME} "$@"
288 340
289 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 341 # TODO change to KMEXTRA for more strict check
342 if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then
290 # We use the basename of $KMMODULE because $KMMODULE can contain 343 # We use the basename of $KMMODULE because $KMMODULE can contain
291 # the path to the module subdirectory. 344 # the path to the module subdirectory.
292 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 345 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
293 fi 346 fi
294 347
324 KMEXTRACTONLY="${KMEXTRACTONLY} 377 KMEXTRACTONLY="${KMEXTRACTONLY}
325 libkdegames" 378 libkdegames"
326 fi 379 fi
327 ;; 380 ;;
328 kdepim) 381 kdepim)
382 if [[ ${PN} != libkdepim ]]; then
383 KMEXTRACTONLY="${KMEXTRACTONLY}
384 libkdepim"
385 fi
386 case ${SLOT} in
387 4.3|live)
388 KMEXTRACTONLY="${KMEXTRACTONLY}
389 kdepim-version.h
390 config-enterprise.h.cmake"
391 ;;
392 esac
329 KMEXTRACTONLY="${KMEXTRACTONLY} 393 KMEXTRACTONLY="${KMEXTRACTONLY}
330 kleopatra/ConfigureChecks.cmake 394 kleopatra/ConfigureChecks.cmake"
331 libkdepim/kdepim_export.h"
332 if has kontact ${IUSE//+} && use kontact; then 395 if has kontact ${IUSE//+} && use kontact; then
333 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 396 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
334 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 397 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
335 fi 398 fi
336 ;; 399 ;;
344 config-prefix.h.cmake" 407 config-prefix.h.cmake"
345 ;; 408 ;;
346 esac 409 esac
347 # Don't install cmake modules for split ebuilds, to avoid collisions. 410 # Don't install cmake modules for split ebuilds, to avoid collisions.
348 case ${KMNAME} in 411 case ${KMNAME} in
412 kdepim)
413 # No need for unpack since 4.2.86
414 # Remove when 4.2 is wiped out from the tree
415 case ${PV} in
416 4.1*|4.2.0|4.2.1|4.2.2|4.2.3|4.2.4|4.2.85)
417 KMCOMPILEONLY="${KMCOMPILEONLY}
418 cmake/modules/"
419 ;;
420 *) ;;
421 esac
422 ;;
349 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 423 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics)
350 case ${PN} in 424 case ${PN} in
351 libkdegames|libkdeedu|marble|libkworkspace) 425 libkdegames|libkdeedu|libkworkspace)
352 KMEXTRA="${KMEXTRA} 426 KMEXTRA="${KMEXTRA}
353 cmake/modules/" 427 cmake/modules/"
354 ;; 428 ;;
355 *) 429 *)
356 KMCOMPILEONLY="${KMCOMPILEONLY} 430 KMCOMPILEONLY="${KMCOMPILEONLY}
362 436
363 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}" 437 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}"
364} 438}
365 439
366__list_needed_subdirectories() { 440__list_needed_subdirectories() {
367 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist topdir 441 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
368 442
369 # We expand KMEXTRA by adding CMakeLists.txt files 443 # We expand KMEXTRA by adding CMakeLists.txt files
370 kmextra="${KMEXTRA}" 444 kmextra="${KMEXTRA}"
371 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}" 445 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}"
372 for i in ${kmextra}; do 446 for i in ${kmextra}; do
400 474
401 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}" 475 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}"
402 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmmodule_expanded: ${kmmodule_expanded}" 476 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmmodule_expanded: ${kmmodule_expanded}"
403 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmcompileonly_expanded: ${kmcompileonly_expanded}" 477 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmcompileonly_expanded: ${kmcompileonly_expanded}"
404 478
405 case ${PV} in
406 scm|9999*) : ;;
407 *) topdir="${KMNAME}-${PV}/" ;;
408 esac
409 # Create final list of stuff to extract 479 # Create final list of stuff to extract
410 # We append topleveldir only when specified (usually for tarballs) 480 # We append topdir only when specified (usually for tarballs)
411 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ 481 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
412 ${KMEXTRACTONLY} 482 ${KMEXTRACTONLY}
413 do 483 do
414 extractlist="${extractlist} ${topdir}${moduleprefix}${i}" 484 extractlist="${extractlist} ${topdir}${moduleprefix}${i}"
415 done 485 done
424 debug-print-function ${FUNCNAME} "$@" 494 debug-print-function ${FUNCNAME} "$@"
425 495
426 kde4-meta_change_cmakelists 496 kde4-meta_change_cmakelists
427 kde4-base_src_prepare 497 kde4-base_src_prepare
428} 498}
429
430 499
431# FIXME: no comment here? 500# FIXME: no comment here?
432_change_cmakelists_parent_dirs() { 501_change_cmakelists_parent_dirs() {
433 debug-print-function ${FUNCNAME} "$@" 502 debug-print-function ${FUNCNAME} "$@"
434 503
468 find "${S}"/${KMMODULE} -name CMakeLists.txt -print0 | xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \ 537 find "${S}"/${KMMODULE} -name CMakeLists.txt -print0 | xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
469 die "${LINENO}: died in KMMODULE section" 538 die "${LINENO}: died in KMMODULE section"
470 _change_cmakelists_parent_dirs ${KMMODULE} 539 _change_cmakelists_parent_dirs ${KMMODULE}
471 fi 540 fi
472 541
542 local i
543
544 # KMEXTRACTONLY section - Some ebuilds need to comment out some subdirs in KMMODULE and they use KMEXTRACTONLY
545 for i in ${KMEXTRACTONLY}; do
546 if [[ -d "${S}"/${i} && -f "${S}"/${i}/../CMakeLists.txt ]]; then
547 sed -i -e "/([[:space:]]*$(basename $i)[[:space:]]*)/s/^/#DONOTCOMPILE /" "${S}"/${i}/../CMakeLists.txt || \
548 die "${LINENO}: sed died while working in the KMEXTRACTONLY section while processing ${i}"
549 fi
550 done
551
473 # KMCOMPILEONLY 552 # KMCOMPILEONLY
474 local i
475 for i in ${KMCOMPILEONLY}; do 553 for i in ${KMCOMPILEONLY}; do
476 debug-print "${LINENO}: KMCOMPILEONLY, processing ${i}" 554 debug-print "${LINENO}: KMCOMPILEONLY, processing ${i}"
477 # Uncomment "add_subdirectory" instructions inside $KMCOMPILEONLY, then comment "install" instructions. 555 # Uncomment "add_subdirectory" instructions inside $KMCOMPILEONLY, then comment "install" instructions.
478 find "${S}"/${i} -name CMakeLists.txt -print0 | \ 556 find "${S}"/${i} -name CMakeLists.txt -print0 | \
479 xargs -0 sed -i \ 557 xargs -0 sed -i \
498 if [[ -d "${S}"/${i} ]]; then 576 if [[ -d "${S}"/${i} ]]; then
499 find "${S}"/${i} -name CMakeLists.txt -print0 | \ 577 find "${S}"/${i} -name CMakeLists.txt -print0 | \
500 xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \ 578 xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
501 die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}" 579 die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}"
502 _change_cmakelists_parent_dirs ${i} 580 _change_cmakelists_parent_dirs ${i}
503 fi
504 done
505
506 # KMEXTRACTONLY section - Some ebuilds need to comment out some subdirs in KMMODULE and they use KMEXTRACTONLY
507 for i in ${KMEXTRACTONLY}; do
508 if [[ -d "${S}"/${i} && -f "${S}"/${i}/../CMakeLists.txt ]]; then
509 sed -i -e "/([[:space:]]*$(basename $i)[[:space:]]*)/s/^/#DONOTCOMPILE /" "${S}"/${i}/../CMakeLists.txt || \
510 die "${LINENO}: sed died while working in the KMEXTRACTONLY section while processing ${i}"
511 fi 581 fi
512 done 582 done
513 583
514 case ${KMNAME} in 584 case ${KMNAME} in
515 kdebase-workspace) 585 kdebase-workspace)
521 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \ 591 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \
522 die "${LINENO}: sed died in the kdebase-startkde collision prevention section" 592 die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
523 fi 593 fi
524 # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82 594 # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82
525 if [[ ${PN} != libkworkspace ]]; then 595 if [[ ${PN} != libkworkspace ]]; then
596 sed -i \
526 sed -i -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ 597 -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
527 CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip EXPORT section" 598 CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section"
528 fi 599 fi
529 ;; 600 ;;
530 kdebase-runtime) 601 kdebase-runtime)
531 # COLLISION PROTECT section 602 # COLLISION PROTECT section
532 # Only install the kde4 script as part of kde-base/kdebase-data 603 # Only install the kde4 script as part of kde-base/kdebase-data
541 sed -i -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \ 612 sed -i -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
542 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed" 613 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
543 _change_cmakelists_parent_dirs kmail 614 _change_cmakelists_parent_dirs kmail
544 ;; 615 ;;
545 esac 616 esac
617 ;;
618 kdewebdev)
619 # Disable hardcoded kdepimlibs check
620 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
621 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \
622 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \
623 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost)/' \
624 -i CMakeLists.txt || die "failed to disable hardcoded checks"
546 ;; 625 ;;
547 koffice) 626 koffice)
548 # prevent collisions 627 # prevent collisions
549 if [[ ${PN} != koffice-data ]]; then 628 if [[ ${PN} != koffice-data ]]; then
550 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 629 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
564# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 643# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
565# ebuilds. 644# ebuilds.
566kde4-meta_src_configure() { 645kde4-meta_src_configure() {
567 debug-print-function ${FUNCNAME} "$@" 646 debug-print-function ${FUNCNAME} "$@"
568 647
648 # Set some cmake default values here (usually workarounds for automagic deps)
649 case ${KMNAME} in
650 kdewebdev)
651 mycmakeargs="
652 -DWITH_KdepimLibs=OFF
653 -DWITH_LibXml2=OFF
654 -DWITH_LibXslt=OFF
655 -DWITH_Boost=OFF
656 -DWITH_LibTidy=OFF
657 ${mycmakeargs}"
658 ;;
659 esac
660
569 kde4-base_src_configure 661 kde4-base_src_configure
570} 662}
571 663
572# @FUNCTION: kde4-meta_src_compile 664# @FUNCTION: kde4-meta_src_compile
573# @DESCRIPTION: 665# @DESCRIPTION:
574# General function for compiling split KDE4 applications. 666# General function for compiling split KDE4 applications.
575# Overrides kde4-base_src_compile. 667# Overrides kde4-base_src_compile.
576kde4-meta_src_compile() { 668kde4-meta_src_compile() {
577 debug-print-function ${FUNCNAME} "$@" 669 debug-print-function ${FUNCNAME} "$@"
578 670
579 kde4-base_src_make 671 kde4-base_src_compile
580} 672}
581 673
582# @FUNCTION: kde4-meta_src_test 674# @FUNCTION: kde4-meta_src_test
583# @DESCRIPTION: 675# @DESCRIPTION:
584# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 676# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
593# @DESCRIPTION: 685# @DESCRIPTION:
594# Function for installing KDE4 split applications. 686# Function for installing KDE4 split applications.
595kde4-meta_src_install() { 687kde4-meta_src_install() {
596 debug-print-function $FUNCNAME "$@" 688 debug-print-function $FUNCNAME "$@"
597 689
598 kde4-meta_src_make_doc 690 kde4-base_src_install
599 cmake-utils_src_install
600
601 if [[ -n ${KMSAVELIBS} ]]; then
602 install_library_dependencies
603 fi
604} 691}
605 692
606# @FUNCTION: kde4-meta_src_make_doc 693# @FUNCTION: kde4-meta_src_make_doc
607# @DESCRIPTION: 694# @DESCRIPTION:
608# This function searches in ${S}/${KMMODULE}, 695# This function searches in ${S}/${KMMODULE},
618 kde4-base_src_make_doc 705 kde4-base_src_make_doc
619} 706}
620 707
621# @FUNCTION: kde4-meta_pkg_postinst 708# @FUNCTION: kde4-meta_pkg_postinst
622# @DESCRIPTION: 709# @DESCRIPTION:
623# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 710# Display information about application handbook and invoke kbuildsycoca4.
624# ebuilds.
625kde4-meta_pkg_postinst() { 711kde4-meta_pkg_postinst() {
626 debug-print-function ${FUNCNAME} "$@" 712 debug-print-function ${FUNCNAME} "$@"
713
714 if has doc ${IUSE//+} && ! use doc; then
715 echo
716 einfo "Application handbook for ${PN} has not been installed."
717 einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'doc' USE flag."
718 echo
719 fi
627 720
628 kde4-base_pkg_postinst 721 kde4-base_pkg_postinst
629} 722}
630 723
631# @FUNCTION: kde4-meta_pkg_postrm 724# @FUNCTION: kde4-meta_pkg_postrm

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.20