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

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

  ViewVC Help
Powered by ViewVC 1.1.20