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

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

  ViewVC Help
Powered by ViewVC 1.1.20