/[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.19
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.19 2009/05/14 16:46:53 scarabeus 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 COMMON_DEPEND="
73 DEPEND="${DEPEND} media-libs/lcms"
74 RDEPEND="${RDEPEND} media-libs/lcms"
75 ;;
76 *)
77 DEPEND="${DEPEND}
78 dev-cpp/eigen:2 95 dev-cpp/eigen:2
79 media-gfx/imagemagick[openexr?] 96 media-gfx/imagemagick[openexr?]
80 media-libs/fontconfig 97 media-libs/fontconfig
81 media-libs/freetype:2 98 media-libs/freetype:2
82 " 99 "
83 RDEPEND="${DEPEND}" 100 DEPEND="${DEPEND} ${COMMON_DEPEND}"
101 RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
102 unset COMMON_DEPEND
84 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then 103 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
85 DEPEND="${DEPEND} 104 DEPEND="${DEPEND}
86 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]" 105 >=app-office/koffice-libs-${PV}:${SLOT}
106 "
87 RDEPEND="${RDEPEND} 107 RDEPEND="${RDEPEND}
88 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]" 108 >=app-office/koffice-libs-${PV}:${SLOT}
109 "
89 fi 110 fi
90 ;;
91 esac
92 ;; 111 ;;
93esac 112esac
94 113
95debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies" 114debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
96debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies" 115debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
97 116
98# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc) 117# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc)
99case ${SLOT} in 118case ${BUILD_TYPE} in
100 live) 119 live)
101 case ${KMNAME} in 120 case ${KMNAME} in
102 extragear*|playground*) 121 extragear*|playground*)
103 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 122 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
123 ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
104 ;; 124 ;;
105 esac 125 esac
106 ;; 126 ;;
107esac 127esac
108 128
211 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}cmake" "${S}" \ 231 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}cmake" "${S}" \
212 || die "${ESVN}: can't export cmake files to '${S}'." 232 || die "${ESVN}: can't export cmake files to '${S}'."
213 fi 233 fi
214 # Copy all subdirectories 234 # Copy all subdirectories
215 for subdir in $(__list_needed_subdirectories); do 235 for subdir in $(__list_needed_subdirectories); do
216 targetdir="" 236 targetdir=""
217 if [[ $subdir = doc/* && ! -e "$ESVN_WC_PATH/$kmnamedir$subdir" ]]; then 237 if [[ $subdir = doc/* && ! -e "$ESVN_WC_PATH/$kmnamedir$subdir" ]]; then
218 continue 238 continue
219 fi 239 fi
220 240
221 [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}" 241 [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}"
222 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}${subdir%/}" "${S}/${targetdir}" \ 242 rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}${subdir%/}" "${S}/${targetdir}" \
223 || die "${ESVN}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'." 243 || die "${ESVN}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'."
224 done 244 done
225 245
226 if [[ ${KMNAME} = kdebase-runtime && ${PN} != kdebase-data ]]; then 246 if [[ ${KMNAME} = kdebase-runtime && ${PN} != kdebase-data ]]; then
227 sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \ 247 sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
228 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 248 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
229 fi 249 fi
230 else 250 else
231 local abort tarball tarfile f extractlist moduleprefix 251 local abort tarball tarfile f extractlist moduleprefix postfix
232 252 case ${PV} in
233 case $KMNAME in 253 4.2.85)
234 kdebase-apps) 254 # block for normally packed upstream unstable snapshots
235 tarball="${KMNAME#-apps}-${PV}.tar.bz2" 255 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
256 postfix="bz2"
257 ;;
258 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
259 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma
260 postfix="lzma"
236 ;; 261 ;;
237 *) 262 *)
238 tarball="${KMNAME}-${PV}.tar.bz2" 263 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
264 postfix="bz2"
239 ;; 265 ;;
240 esac 266 esac
267 case ${KMNAME} in
268 kdebase-apps)
269 # kdebase/apps -> kdebasa-apps
270 tarball="kdebase-${PV}.tar.${postfix}"
271 # Go one level deeper for kdebase-apps in tarballs
272 moduleprefix=apps/
273 KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||"
274 ;;
275 *)
276 # Create tarball name from module name (this is the default)
277 tarball="${KMNAME}-${PV}.tar.${postfix}"
278 ;;
279 esac
280
281 # Full patch to source tarball
241 tarfile="${DISTDIR}/${tarball}" 282 tarfile="${DISTDIR}/${tarball}"
283
284 # Detect real toplevel dir from tarball name - it will be used upon extraction
285 # and in __list_needed_subdirectories
286 topdir="${tarball%.tar.*}/"
242 287
243 ebegin "Unpacking parts of ${tarball} to ${WORKDIR}" 288 ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"
244 289
245 kde4-meta_create_extractlists 290 kde4-meta_create_extractlists
246 291
247 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ 292 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
248 AUTHORS COPYING INSTALL README NEWS ChangeLog 293 AUTHORS COPYING INSTALL README NEWS ChangeLog
249 do 294 do
250 extractlist="${extractlist} ${KMNAME}-${PV}/${f}" 295 extractlist="${extractlist} ${topdir}${moduleprefix}${f}"
251 done 296 done
252 extractlist="${extractlist} $(__list_needed_subdirectories)" 297 extractlist="${extractlist} $(__list_needed_subdirectories)"
253 KMTARPARAMS="${KMTARPARAMS} -j"
254 298
255 pushd "${WORKDIR}" > /dev/null 299 pushd "${WORKDIR}" > /dev/null
256 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 300 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
257 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null 301 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null
258 302
259 # Default $S is based on $P; rename the extracted directory to match $S if necessary 303 # 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}\"" 304 mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\""
261 305
262 popd > /dev/null 306 popd > /dev/null
263 307
264 eend $? 308 eend $?
265 309
273 abort=true 317 abort=true
274 fi 318 fi
275 done 319 done
276 [[ -n ${abort} ]] && die "There were missing files." 320 [[ -n ${abort} ]] && die "There were missing files."
277 fi 321 fi
322
323 # We don't need it anymore
324 unset topdir
278 fi 325 fi
279} 326}
280 327
281# @FUNCTION: kde4-meta_create_extractlists 328# @FUNCTION: kde4-meta_create_extractlists
282# @DESCRIPTION: 329# @DESCRIPTION:
284# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 331# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
285# KMEXTRACTONLY and KMTARPARAMS. 332# KMEXTRACTONLY and KMTARPARAMS.
286kde4-meta_create_extractlists() { 333kde4-meta_create_extractlists() {
287 debug-print-function ${FUNCNAME} "$@" 334 debug-print-function ${FUNCNAME} "$@"
288 335
289 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 336 # TODO change to KMEXTRA for more strict check
337 if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then
290 # We use the basename of $KMMODULE because $KMMODULE can contain 338 # We use the basename of $KMMODULE because $KMMODULE can contain
291 # the path to the module subdirectory. 339 # the path to the module subdirectory.
292 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 340 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
293 fi 341 fi
294 342
324 KMEXTRACTONLY="${KMEXTRACTONLY} 372 KMEXTRACTONLY="${KMEXTRACTONLY}
325 libkdegames" 373 libkdegames"
326 fi 374 fi
327 ;; 375 ;;
328 kdepim) 376 kdepim)
377 if [[ ${PN} != libkdepim ]]; then
378 KMEXTRACTONLY="${KMEXTRACTONLY}
379 libkdepim"
380 fi
381 case ${SLOT} in
382 4.3|live)
383 KMEXTRACTONLY="${KMEXTRACTONLY}
384 kdepim-version.h
385 config-enterprise.h.cmake"
386 ;;
387 esac
329 KMEXTRACTONLY="${KMEXTRACTONLY} 388 KMEXTRACTONLY="${KMEXTRACTONLY}
330 kleopatra/ConfigureChecks.cmake 389 kleopatra/ConfigureChecks.cmake"
331 libkdepim/kdepim_export.h"
332 if has kontact ${IUSE//+} && use kontact; then 390 if has kontact ${IUSE//+} && use kontact; then
333 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 391 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
334 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 392 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
335 fi 393 fi
336 ;; 394 ;;
346 esac 404 esac
347 # Don't install cmake modules for split ebuilds, to avoid collisions. 405 # Don't install cmake modules for split ebuilds, to avoid collisions.
348 case ${KMNAME} in 406 case ${KMNAME} in
349 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 407 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim)
350 case ${PN} in 408 case ${PN} in
351 libkdegames|libkdeedu|marble|libkworkspace) 409 libkdegames|libkdeedu|libkworkspace)
352 KMEXTRA="${KMEXTRA} 410 KMEXTRA="${KMEXTRA}
353 cmake/modules/" 411 cmake/modules/"
354 ;; 412 ;;
355 *) 413 *)
356 KMCOMPILEONLY="${KMCOMPILEONLY} 414 KMCOMPILEONLY="${KMCOMPILEONLY}
362 420
363 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}" 421 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}"
364} 422}
365 423
366__list_needed_subdirectories() { 424__list_needed_subdirectories() {
367 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist topdir 425 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
368 426
369 # We expand KMEXTRA by adding CMakeLists.txt files 427 # We expand KMEXTRA by adding CMakeLists.txt files
370 kmextra="${KMEXTRA}" 428 kmextra="${KMEXTRA}"
371 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}" 429 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}"
372 for i in ${kmextra}; do 430 for i in ${kmextra}; do
400 458
401 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}" 459 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}"
402 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmmodule_expanded: ${kmmodule_expanded}" 460 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmmodule_expanded: ${kmmodule_expanded}"
403 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmcompileonly_expanded: ${kmcompileonly_expanded}" 461 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmcompileonly_expanded: ${kmcompileonly_expanded}"
404 462
405 case ${PV} in
406 scm|9999*) : ;;
407 *) topdir="${KMNAME}-${PV}/" ;;
408 esac
409 # Create final list of stuff to extract 463 # Create final list of stuff to extract
410 # We append topleveldir only when specified (usually for tarballs) 464 # We append topdir only when specified (usually for tarballs)
411 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ 465 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
412 ${KMEXTRACTONLY} 466 ${KMEXTRACTONLY}
413 do 467 do
414 extractlist="${extractlist} ${topdir}${moduleprefix}${i}" 468 extractlist="${extractlist} ${topdir}${moduleprefix}${i}"
415 done 469 done
424 debug-print-function ${FUNCNAME} "$@" 478 debug-print-function ${FUNCNAME} "$@"
425 479
426 kde4-meta_change_cmakelists 480 kde4-meta_change_cmakelists
427 kde4-base_src_prepare 481 kde4-base_src_prepare
428} 482}
429
430 483
431# FIXME: no comment here? 484# FIXME: no comment here?
432_change_cmakelists_parent_dirs() { 485_change_cmakelists_parent_dirs() {
433 debug-print-function ${FUNCNAME} "$@" 486 debug-print-function ${FUNCNAME} "$@"
434 487
468 find "${S}"/${KMMODULE} -name CMakeLists.txt -print0 | xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \ 521 find "${S}"/${KMMODULE} -name CMakeLists.txt -print0 | xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
469 die "${LINENO}: died in KMMODULE section" 522 die "${LINENO}: died in KMMODULE section"
470 _change_cmakelists_parent_dirs ${KMMODULE} 523 _change_cmakelists_parent_dirs ${KMMODULE}
471 fi 524 fi
472 525
526 local i
527
528 # KMEXTRACTONLY section - Some ebuilds need to comment out some subdirs in KMMODULE and they use KMEXTRACTONLY
529 for i in ${KMEXTRACTONLY}; do
530 if [[ -d "${S}"/${i} && -f "${S}"/${i}/../CMakeLists.txt ]]; then
531 sed -i -e "/([[:space:]]*$(basename $i)[[:space:]]*)/s/^/#DONOTCOMPILE /" "${S}"/${i}/../CMakeLists.txt || \
532 die "${LINENO}: sed died while working in the KMEXTRACTONLY section while processing ${i}"
533 fi
534 done
535
473 # KMCOMPILEONLY 536 # KMCOMPILEONLY
474 local i
475 for i in ${KMCOMPILEONLY}; do 537 for i in ${KMCOMPILEONLY}; do
476 debug-print "${LINENO}: KMCOMPILEONLY, processing ${i}" 538 debug-print "${LINENO}: KMCOMPILEONLY, processing ${i}"
477 # Uncomment "add_subdirectory" instructions inside $KMCOMPILEONLY, then comment "install" instructions. 539 # Uncomment "add_subdirectory" instructions inside $KMCOMPILEONLY, then comment "install" instructions.
478 find "${S}"/${i} -name CMakeLists.txt -print0 | \ 540 find "${S}"/${i} -name CMakeLists.txt -print0 | \
479 xargs -0 sed -i \ 541 xargs -0 sed -i \
498 if [[ -d "${S}"/${i} ]]; then 560 if [[ -d "${S}"/${i} ]]; then
499 find "${S}"/${i} -name CMakeLists.txt -print0 | \ 561 find "${S}"/${i} -name CMakeLists.txt -print0 | \
500 xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \ 562 xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
501 die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}" 563 die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}"
502 _change_cmakelists_parent_dirs ${i} 564 _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 565 fi
512 done 566 done
513 567
514 case ${KMNAME} in 568 case ${KMNAME} in
515 kdebase-workspace) 569 kdebase-workspace)
542 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed" 596 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
543 _change_cmakelists_parent_dirs kmail 597 _change_cmakelists_parent_dirs kmail
544 ;; 598 ;;
545 esac 599 esac
546 ;; 600 ;;
601 kdewebdev)
602 # Disable hardcoded kdepimlibs check
603 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
604 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2 REQUIRED)/' \
605 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt REQUIRED)/' \
606 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost REQUIRED)/' \
607 -i CMakeLists.txt || die "failed to disable hardcoded checks"
608 ;;
547 koffice) 609 koffice)
548 # prevent collisions 610 # prevent collisions
549 if [[ ${PN} != koffice-data ]]; then 611 if [[ ${PN} != koffice-data ]]; then
550 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 612 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
551 "${S}"/cmake/modules/CMakeLists.txt || \ 613 "${S}"/cmake/modules/CMakeLists.txt || \
564# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 626# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
565# ebuilds. 627# ebuilds.
566kde4-meta_src_configure() { 628kde4-meta_src_configure() {
567 debug-print-function ${FUNCNAME} "$@" 629 debug-print-function ${FUNCNAME} "$@"
568 630
631 # Set some cmake default values here (usually workarounds for automagic deps)
632 case ${KMNAME} in
633 kdewebdev)
634 mycmakeargs="
635 -DWITH_KdepimLibs=OFF
636 -DWITH_LibXml2=OFF
637 -DWITH_LibXslt=OFF
638 -DWITH_Boost=OFF
639 -DWITH_LibTidy=OFF
640 ${mycmakeargs}"
641 ;;
642 esac
643
569 kde4-base_src_configure 644 kde4-base_src_configure
570} 645}
571 646
572# @FUNCTION: kde4-meta_src_compile 647# @FUNCTION: kde4-meta_src_compile
573# @DESCRIPTION: 648# @DESCRIPTION:
574# General function for compiling split KDE4 applications. 649# General function for compiling split KDE4 applications.
575# Overrides kde4-base_src_compile. 650# Overrides kde4-base_src_compile.
576kde4-meta_src_compile() { 651kde4-meta_src_compile() {
577 debug-print-function ${FUNCNAME} "$@" 652 debug-print-function ${FUNCNAME} "$@"
578 653
579 kde4-base_src_make 654 kde4-base_src_compile
580} 655}
581 656
582# @FUNCTION: kde4-meta_src_test 657# @FUNCTION: kde4-meta_src_test
583# @DESCRIPTION: 658# @DESCRIPTION:
584# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 659# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
593# @DESCRIPTION: 668# @DESCRIPTION:
594# Function for installing KDE4 split applications. 669# Function for installing KDE4 split applications.
595kde4-meta_src_install() { 670kde4-meta_src_install() {
596 debug-print-function $FUNCNAME "$@" 671 debug-print-function $FUNCNAME "$@"
597 672
598 kde4-meta_src_make_doc 673 kde4-base_src_install
599 cmake-utils_src_install
600
601 if [[ -n ${KMSAVELIBS} ]]; then
602 install_library_dependencies
603 fi
604} 674}
605 675
606# @FUNCTION: kde4-meta_src_make_doc 676# @FUNCTION: kde4-meta_src_make_doc
607# @DESCRIPTION: 677# @DESCRIPTION:
608# This function searches in ${S}/${KMMODULE}, 678# This function searches in ${S}/${KMMODULE},
618 kde4-base_src_make_doc 688 kde4-base_src_make_doc
619} 689}
620 690
621# @FUNCTION: kde4-meta_pkg_postinst 691# @FUNCTION: kde4-meta_pkg_postinst
622# @DESCRIPTION: 692# @DESCRIPTION:
623# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 693# Display information about application handbook and invoke kbuildsycoca4.
624# ebuilds.
625kde4-meta_pkg_postinst() { 694kde4-meta_pkg_postinst() {
626 debug-print-function ${FUNCNAME} "$@" 695 debug-print-function ${FUNCNAME} "$@"
696
697 if has doc ${IUSE//+} && ! use doc; then
698 echo
699 einfo "Application handbook for ${PN} has not been installed."
700 einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'doc' USE flag."
701 echo
702 fi
627 703
628 kde4-base_pkg_postinst 704 kde4-base_pkg_postinst
629} 705}
630 706
631# @FUNCTION: kde4-meta_pkg_postrm 707# @FUNCTION: kde4-meta_pkg_postrm

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

  ViewVC Help
Powered by ViewVC 1.1.20