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

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

  ViewVC Help
Powered by ViewVC 1.1.20