/[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.13 Revision 1.24
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.13 2009/03/11 17:41:50 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.24 2009/08/07 01:00:11 wired 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.
18 18
19if [[ -z ${KMNAME} ]]; then 19if [[ -z ${KMNAME} ]]; then
20 die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild" 20 die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
21fi 21fi
22 22
23case ${KDEBASE} in 23# Add khelpcenter dependency when installing handbooks
24 kde-base) 24if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then
25 HOMEPAGE="http://www.kde.org/" 25 RDEPEND+=" handbook? ( >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=] )"
26 LICENSE="GPL-2" 26fi
27 ;;
28 koffice)
29 HOMEPAGE="http://www.koffice.org/"
30 LICENSE="GPL-2"
31 ;;
32esac
33 27
34# Add dependencies that all packages in a certain module share. 28# Add dependencies that all packages in a certain module share.
35case ${KMNAME} in 29case ${KMNAME} in
36 kdebase|kdebase-{apps,workspace,runtime}) 30 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
37 DEPEND="${DEPEND}
38 >=kde-base/qimageblitz-0.0.4 31 COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4"
39 "
40 RDEPEND="${RDEPEND}
41 >=kde-base/qimageblitz-0.0.4
42 "
43 ;; 32 ;;
44 kdenetwork) 33 kdenetwork)
45 DEPEND="${DEPEND}
46 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] 34 COMMONDEPEND+=" >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]"
47 "
48 RDEPEND="${RDEPEND}
49 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
50 "
51 ;; 35 ;;
52 kdepim) 36 kdepim|kdepim-runtime)
53 DEPEND="${DEPEND} 37 COMMONDEPEND+="
54 dev-libs/boost
55 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
56 "
57 RDEPEND="${RDEPEND}
58 dev-libs/boost 38 dev-libs/boost
59 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] 39 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
60 " 40 "
61 case ${PN} in 41 case ${PN} in
62 akregator|kaddressbook|kjots|kmail|kmobiletools|knode|knotes|korganizer|ktimetracker) 42 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
63 IUSE="+kontact" 43 IUSE+=" +kontact"
64 RDEPEND="${RDEPEND}
65 kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] ) 44 RDEPEND+=" kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )"
66 "
67 ;; 45 ;;
68 esac 46 esac
69 ;; 47 ;;
70 kdegames) 48 kdegames)
71 if [[ ${PN} != libkdegames ]]; then 49 if [[ ${PN} != libkdegames ]]; then
72 DEPEND="${DEPEND}
73 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] 50 COMMONDEPEND+=" >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] "
74 "
75 RDEPEND="${RDEPEND}
76 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]
77 "
78 fi 51 fi
79 ;; 52 ;;
80 koffice) 53 koffice)
81 [[ ${PN} != koffice-data ]] && IUSE="debug" 54 [[ ${PN} != koffice-data ]] && IUSE+=" debug"
82 case ${PV} in 55 RDEPEND+="
83 9999*)
84 DEPEND="${DEPEND}
85 !app-office/${PN}:2
86 "
87 ;;
88 1.9*|2*)
89 DEPEND="${DEPEND}
90 !app-office/${PN}:live
91 "
92 ;;
93 esac
94 DEPEND="${DEPEND}
95 !app-office/${PN}:0 56 !app-office/${PN}:0
96 !app-office/koffice:0 57 !app-office/koffice:0
97 !app-office/koffice-meta:0 58 !app-office/koffice-meta:0
98 " 59 "
99 case ${PN} in 60 if has openexr ${IUSE//+}; then
100 koffice-data) 61 COMMONDEPEND+=" media-gfx/imagemagick[openexr?]"
101 DEPEND="${DEPEND} 62 else
102 media-libs/lcms 63 COMMONDEPEND+=" media-gfx/imagemagick"
103 " 64 fi
104 RDEPEND="${RDEPEND} 65
105 media-libs/lcms
106 "
107 ;;
108 *)
109 COMMON_DEPEND=" 66 COMMONDEPEND+="
110 dev-cpp/eigen:2 67 dev-cpp/eigen:2
111 media-gfx/imagemagick[openexr?]
112 media-libs/fontconfig 68 media-libs/fontconfig
113 media-libs/freetype:2 69 media-libs/freetype:2
114 " 70 "
115 DEPEND="${DEPEND} ${COMMON_DEPEND}"
116 RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
117 unset COMMON_DEPEND
118 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then 71 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
119 DEPEND="${DEPEND} 72 COMMONDEPEND+=" >=app-office/koffice-libs-${PV}:${SLOT}"
120 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]
121 "
122 RDEPEND="${RDEPEND}
123 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]
124 "
125 fi 73 fi
126 ;;
127 esac
128 ;; 74 ;;
129esac 75esac
130 76
77DEPEND+=" ${COMMONDEPEND}"
78RDEPEND+=" ${COMMONDEPEND}"
79unset COMMONDEPEND
80
131debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies" 81debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
132debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies" 82debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
133 83
134# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc) 84# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc)
135case ${SLOT} in 85case ${BUILD_TYPE} in
136 live) 86 live)
137 case ${KMNAME} in 87 case ${KMNAME} in
138 extragear*|playground*) 88 extragear*|playground*)
139 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 89 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
90 ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
140 ;; 91 ;;
141 esac 92 esac
142 ;; 93 ;;
143esac 94esac
144 95
169 120
170# @ECLASS-VARIABLE: KMEXTRA 121# @ECLASS-VARIABLE: KMEXTRA
171# @DESCRIPTION: 122# @DESCRIPTION:
172# All subdirectories listed here will be extracted, compiled & installed. 123# All subdirectories listed here will be extracted, compiled & installed.
173# $KMMODULE is always added to $KMEXTRA. 124# $KMMODULE is always added to $KMEXTRA.
174# If the htmlhandbook USE-flag is set, and if this directory exists, 125# If the handbook USE-flag is set, and if this directory exists,
175# then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be 126# then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be
176# handled in the ebuild. 127# handled in the ebuild.
177# If the documentation is in a different subdirectory, you should add it to KMEXTRA. 128# If the documentation is in a different subdirectory, you should add it to KMEXTRA.
178 129
179# @ECLASS-VARIABLE: KMCOMPILEONLY 130# @ECLASS-VARIABLE: KMCOMPILEONLY
264 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 215 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
265 fi 216 fi
266 else 217 else
267 local abort tarball tarfile f extractlist moduleprefix postfix 218 local abort tarball tarfile f extractlist moduleprefix postfix
268 case ${PV} in 219 case ${PV} in
269 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 220 4.3.85 | 4.3.90 | 4.3.95 | 4.3.96 | 4.3.98 | 4.2.85 | 4.2.90 | 4.2.95 | 4.2.96 | 4.2.98)
221 # block for normally packed upstream unstable snapshots
222 KMTARPARAMS+=" --bzip2" # bz2
223 postfix="bz2"
224 ;;
225 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6* | 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*)
270 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma 226 KMTARPARAMS+=" --lzma" # lzma
271 postfix="lzma" 227 postfix="lzma"
272 ;; 228 ;;
273 *) 229 *)
274 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2 230 KMTARPARAMS+=" --bzip2" # bz2
275 postfix="bz2" 231 postfix="bz2"
276 ;; 232 ;;
277 esac 233 esac
278 case ${KMNAME} in 234 case ${KMNAME} in
279 kdebase-apps) 235 kdebase-apps)
280 # kdebase/apps -> kdebasa-apps 236 # kdebase/apps -> kdebase-apps
281 tarball="kdebase-${PV}.tar.${postfix}" 237 tarball="kdebase-${PV}.tar.${postfix}"
282 # Go one level deeper for kdebase-apps in tarballs 238 # Go one level deeper for kdebase-apps in tarballs
283 moduleprefix=apps/ 239 moduleprefix=apps/
284 KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||" 240 KMTARPARAMS+=" --transform=s|apps/||"
285 ;; 241 ;;
286 *) 242 *)
287 # Create tarball name from module name (this is the default) 243 # Create tarball name from module name (this is the default)
288 tarball="${KMNAME}-${PV}.tar.${postfix}" 244 tarball="${KMNAME}-${PV}.tar.${postfix}"
289 ;; 245 ;;
290 esac 246 esac
291 247
292 # Full patch to source tarball 248 # Full path to source tarball
293 tarfile="${DISTDIR}/${tarball}" 249 tarfile="${DISTDIR}/${tarball}"
294 250
295 # Detect real toplevel dir from tarball name - it will be used upon extraction 251 # Detect real toplevel dir from tarball name - it will be used upon extraction
296 # and in __list_needed_subdirectories 252 # and in __list_needed_subdirectories
297 topdir="${tarball%.tar.*}/" 253 topdir="${tarball%.tar.*}/"
301 kde4-meta_create_extractlists 257 kde4-meta_create_extractlists
302 258
303 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ 259 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
304 AUTHORS COPYING INSTALL README NEWS ChangeLog 260 AUTHORS COPYING INSTALL README NEWS ChangeLog
305 do 261 do
306 extractlist="${extractlist} ${topdir}${moduleprefix}${f}" 262 extractlist+=" ${topdir}${moduleprefix}${f}"
307 done 263 done
308 extractlist="${extractlist} $(__list_needed_subdirectories)" 264 extractlist+=" $(__list_needed_subdirectories)"
309 265
310 pushd "${WORKDIR}" > /dev/null 266 pushd "${WORKDIR}" > /dev/null
311 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 267 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
312 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null 268 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null
313 269
342# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 298# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
343# KMEXTRACTONLY and KMTARPARAMS. 299# KMEXTRACTONLY and KMTARPARAMS.
344kde4-meta_create_extractlists() { 300kde4-meta_create_extractlists() {
345 debug-print-function ${FUNCNAME} "$@" 301 debug-print-function ${FUNCNAME} "$@"
346 302
303 # TODO change to KMEXTRA for more strict check
347 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 304 if has handbook ${IUSE//+} && use handbook && [[ -n ${KMMODULE} ]]; then
348 # We use the basename of $KMMODULE because $KMMODULE can contain 305 # We use the basename of $KMMODULE because $KMMODULE can contain
349 # the path to the module subdirectory. 306 # the path to the module subdirectory.
350 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 307 KMEXTRA_NONFATAL+="
308 doc/${KMMODULE##*/}"
351 fi 309 fi
352 310
353 # Add some CMake-files to KMEXTRACTONLY. 311 # Add some CMake-files to KMEXTRACTONLY.
354 # Note that this actually doesn't include KMEXTRA handling. 312 # Note that this actually doesn't include KMEXTRA handling.
355 # In those cases you should care to add the relevant files to KMEXTRACTONLY 313 # In those cases you should care to add the relevant files to KMEXTRACTONLY
356 case ${KMNAME} in 314 case ${KMNAME} in
357 kdebase) 315 kdebase)
358 KMEXTRACTONLY="${KMEXTRACTONLY} 316 KMEXTRACTONLY+="
359 apps/config-apps.h.cmake 317 apps/config-apps.h.cmake
360 apps/ConfigureChecks.cmake" 318 apps/ConfigureChecks.cmake"
361 ;; 319 ;;
362 kdebase-apps) 320 kdebase-apps)
363 KMEXTRACTONLY="${KMEXTRACTONLY} 321 KMEXTRACTONLY+="
364 config-apps.h.cmake 322 config-apps.h.cmake
365 ConfigureChecks.cmake" 323 ConfigureChecks.cmake"
366 ;; 324 ;;
367 kdebase-runtime) 325 kdebase-runtime)
368 KMEXTRACTONLY="${KMEXTRACTONLY} 326 KMEXTRACTONLY+="
369 config-runtime.h.cmake" 327 config-runtime.h.cmake"
370 ;; 328 ;;
371 kdebase-workspace) 329 kdebase-workspace)
372 KMEXTRACTONLY="${KMEXTRACTONLY} 330 KMEXTRACTONLY+="
373 config-unix.h.cmake 331 config-unix.h.cmake
374 ConfigureChecks.cmake 332 ConfigureChecks.cmake
375 config-workspace.h.cmake 333 config-workspace.h.cmake
376 config-X11.h.cmake 334 config-X11.h.cmake
377 startkde.cmake 335 startkde.cmake
378 KDE4WorkspaceConfig.cmake.in" 336 KDE4WorkspaceConfig.cmake.in"
379 ;; 337 ;;
380 kdegames) 338 kdegames)
381 if [[ ${PN} != libkdegames ]]; then 339 if [[ ${PN} != libkdegames ]]; then
382 KMEXTRACTONLY="${KMEXTRACTONLY} 340 KMEXTRACTONLY+="
383 libkdegames" 341 libkdegames/"
384 fi 342 fi
385 ;; 343 ;;
386 kdepim) 344 kdepim)
387 if [[ ${PN} != libkdepim ]]; then 345 if [[ ${PN} != libkdepim ]]; then
388 KMEXTRACTONLY="${KMEXTRACTONLY} 346 KMEXTRACTONLY+="
389 libkdepim" 347 libkdepim/"
390 fi 348 fi
391 KMEXTRACTONLY="${KMEXTRACTONLY} 349 case ${SLOT} in
350 4.3|4.4|live)
351 KMEXTRACTONLY+="
352 kdepim-version.h
353 config-enterprise.h.cmake"
354 ;;
355 esac
356 KMEXTRACTONLY+="
392 kleopatra/ConfigureChecks.cmake" 357 kleopatra/ConfigureChecks.cmake"
393 if has kontact ${IUSE//+} && use kontact; then 358 if has kontact ${IUSE//+} && use kontact; then
359 KMEXTRA+="
394 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 360 kontact/plugins/${PLUGINNAME:-${PN}}/"
395 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 361 KMEXTRACTONLY+="
362 kontactinterfaces/"
396 fi 363 fi
397 ;; 364 ;;
365 kdeutils)
366 case ${SLOT} in
367 4.3|4.4|live)
368 KMEXTRACTONLY+="
369 kdeutils-version.h"
370 ;;
371 esac
372 ;;
398 koffice) 373 koffice)
399 KMEXTRACTONLY="${KMEXTRACTONLY} 374 KMEXTRACTONLY+="
400 config-endian.h.cmake 375 config-endian.h.cmake
401 filters/config-filters.h.cmake 376 filters/config-filters.h.cmake
402 config-openctl.h.cmake
403 config-openexr.h.cmake 377 config-openexr.h.cmake
404 config-opengl.h.cmake 378 config-opengl.h.cmake
405 config-prefix.h.cmake" 379 config-prefix.h.cmake
380 "
381 case ${PV} in
382 2.0.*)
383 KMEXTRACTONLY+="
384 config-openctl.h.cmake"
385 ;;
386 esac
406 ;; 387 ;;
407 esac 388 esac
408 # Don't install cmake modules for split ebuilds, to avoid collisions. 389 # Don't install cmake modules for split ebuilds, to avoid collisions.
409 case ${KMNAME} in 390 case ${KMNAME} in
391 kdepim)
392 # No need for unpack since 4.2.86
393 # Remove when 4.2 is wiped out from the tree
394 case ${PV} in
395 4.1*|4.2.0|4.2.1|4.2.2|4.2.3|4.2.4|4.2.85)
396 KMCOMPILEONLY+="
397 cmake/modules/"
398 ;;
399 *) ;;
400 esac
401 ;;
410 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 402 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics)
411 case ${PN} in 403 case ${PN} in
412 libkdegames|libkdeedu|marble|libkworkspace) 404 libkdegames|libkdeedu|libkworkspace)
413 KMEXTRA="${KMEXTRA} 405 KMEXTRA+="
414 cmake/modules/" 406 cmake/modules/"
415 ;; 407 ;;
416 *) 408 *)
417 KMCOMPILEONLY="${KMCOMPILEONLY} 409 KMCOMPILEONLY+="
418 cmake/modules/" 410 cmake/modules/"
419 ;; 411 ;;
420 esac 412 esac
421 ;; 413 ;;
422 esac 414 esac
427__list_needed_subdirectories() { 419__list_needed_subdirectories() {
428 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist 420 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
429 421
430 # We expand KMEXTRA by adding CMakeLists.txt files 422 # We expand KMEXTRA by adding CMakeLists.txt files
431 kmextra="${KMEXTRA}" 423 kmextra="${KMEXTRA}"
432 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}" 424 [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}"
433 for i in ${kmextra}; do 425 for i in ${kmextra}; do
434 kmextra_expanded="${kmextra_expanded} ${i}" 426 kmextra_expanded+=" ${i}"
435 j=$(dirname ${i}) 427 j=$(dirname ${i})
436 while [[ ${j} != "." ]]; do 428 while [[ ${j} != "." ]]; do
437 kmextra_expanded="${kmextra_expanded} ${j}/CMakeLists.txt"; 429 kmextra_expanded+=" ${j}/CMakeLists.txt";
438 j=$(dirname ${j}) 430 j=$(dirname ${j})
439 done 431 done
440 done 432 done
441 433
442 # Expand KMMODULE 434 # Expand KMMODULE
443 if [[ -n ${KMMODULE} ]]; then 435 if [[ -n ${KMMODULE} ]]; then
444 kmmodule_expanded="${KMMODULE}" 436 kmmodule_expanded="${KMMODULE}"
445 j=$(dirname ${KMMODULE}) 437 j=$(dirname ${KMMODULE})
446 while [[ ${j} != "." ]]; do 438 while [[ ${j} != "." ]]; do
447 kmmodule_expanded="${kmmodule_expanded} ${j}/CMakeLists.txt"; 439 kmmodule_expanded+=" ${j}/CMakeLists.txt";
448 j=$(dirname ${j}) 440 j=$(dirname ${j})
449 done 441 done
450 fi 442 fi
451 443
452 # Expand KMCOMPILEONLY 444 # Expand KMCOMPILEONLY
453 for i in ${KMCOMPILEONLY}; do 445 for i in ${KMCOMPILEONLY}; do
454 kmcompileonly_expanded="${kmcompileonly_expanded} ${i}" 446 kmcompileonly_expanded+=" ${i}"
455 j=$(dirname ${i}) 447 j=$(dirname ${i})
456 while [[ ${j} != "." ]]; do 448 while [[ ${j} != "." ]]; do
457 kmcompileonly_expanded="${kmcompileonly_expanded} ${j}/CMakeLists.txt"; 449 kmcompileonly_expanded+=" ${j}/CMakeLists.txt";
458 j=$(dirname ${j}) 450 j=$(dirname ${j})
459 done 451 done
460 done 452 done
461 453
462 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}" 454 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}"
466 # Create final list of stuff to extract 458 # Create final list of stuff to extract
467 # We append topdir only when specified (usually for tarballs) 459 # We append topdir only when specified (usually for tarballs)
468 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ 460 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
469 ${KMEXTRACTONLY} 461 ${KMEXTRACTONLY}
470 do 462 do
471 extractlist="${extractlist} ${topdir}${moduleprefix}${i}" 463 extractlist+=" ${topdir}${moduleprefix}${i}"
472 done 464 done
473 465
474 echo ${extractlist} 466 echo ${extractlist}
475} 467}
476 468
578 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \ 570 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \
579 die "${LINENO}: sed died in the kdebase-startkde collision prevention section" 571 die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
580 fi 572 fi
581 # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82 573 # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82
582 if [[ ${PN} != libkworkspace ]]; then 574 if [[ ${PN} != libkworkspace ]]; then
575 sed -i \
583 sed -i -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ 576 -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
584 CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip EXPORT section" 577 CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section"
585 fi 578 fi
586 ;; 579 ;;
587 kdebase-runtime) 580 kdebase-runtime)
588 # COLLISION PROTECT section 581 # COLLISION PROTECT section
589 # Only install the kde4 script as part of kde-base/kdebase-data 582 # Only install the kde4 script as part of kde-base/kdebase-data
599 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed" 592 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
600 _change_cmakelists_parent_dirs kmail 593 _change_cmakelists_parent_dirs kmail
601 ;; 594 ;;
602 esac 595 esac
603 ;; 596 ;;
597 kdewebdev)
598 # Disable hardcoded kdepimlibs check
599 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
600 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \
601 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \
602 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost)/' \
603 -i CMakeLists.txt || die "failed to disable hardcoded checks"
604 ;;
604 koffice) 605 koffice)
605 # prevent collisions 606 # prevent collisions
606 if [[ ${PN} != koffice-data ]]; then 607 if [[ ${PN} != koffice-data ]]; then
607 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 608 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
608 "${S}"/cmake/modules/CMakeLists.txt || \ 609 "${S}"/cmake/modules/CMakeLists.txt || \
609 die "${LINENO}: sed died in collision prevention section" 610 die "${LINENO}: sed died in collision prevention section"
611 case ${PV} in
612 2.0.*)
610 sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \ 613 sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \
611 "${S}"/CMakeLists.txt || \ 614 "${S}"/CMakeLists.txt || \
612 die "${LINENO}: sed died in collision prevention section" 615 die "${LINENO}: sed died in collision prevention section"
616 ;;
617 *)
618 sed -i -e '/install(.\+config-openexr\.h.\+)/d' \
619 "${S}"//CMakeLists.txt || \
620 die "${LINENO}: sed died in collision prevention section"
621 ;;
622 esac
613 fi 623 fi
614 esac 624 esac
615 625
616 popd > /dev/null 626 popd > /dev/null
617} 627}
621# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 631# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
622# ebuilds. 632# ebuilds.
623kde4-meta_src_configure() { 633kde4-meta_src_configure() {
624 debug-print-function ${FUNCNAME} "$@" 634 debug-print-function ${FUNCNAME} "$@"
625 635
636 # Set some cmake default values here (usually workarounds for automagic deps)
637 case ${KMNAME} in
638 kdewebdev)
639 mycmakeargs="
640 -DWITH_KdepimLibs=OFF
641 -DWITH_LibXml2=OFF
642 -DWITH_LibXslt=OFF
643 -DWITH_Boost=OFF
644 -DWITH_LibTidy=OFF
645 ${mycmakeargs}"
646 ;;
647 esac
648
626 kde4-base_src_configure 649 kde4-base_src_configure
627} 650}
628 651
629# @FUNCTION: kde4-meta_src_compile 652# @FUNCTION: kde4-meta_src_compile
630# @DESCRIPTION: 653# @DESCRIPTION:
631# General function for compiling split KDE4 applications. 654# General function for compiling split KDE4 applications.
632# Overrides kde4-base_src_compile. 655# Overrides kde4-base_src_compile.
633kde4-meta_src_compile() { 656kde4-meta_src_compile() {
634 debug-print-function ${FUNCNAME} "$@" 657 debug-print-function ${FUNCNAME} "$@"
635 658
636 kde4-base_src_compile 659 kde4-base_src_compile "$@"
637} 660}
638 661
639# @FUNCTION: kde4-meta_src_test 662# @FUNCTION: kde4-meta_src_test
640# @DESCRIPTION: 663# @DESCRIPTION:
641# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 664# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
650# @DESCRIPTION: 673# @DESCRIPTION:
651# Function for installing KDE4 split applications. 674# Function for installing KDE4 split applications.
652kde4-meta_src_install() { 675kde4-meta_src_install() {
653 debug-print-function $FUNCNAME "$@" 676 debug-print-function $FUNCNAME "$@"
654 677
655 kde4-meta_src_make_doc 678 kde4-base_src_install
656 cmake-utils_src_install
657
658 if [[ -n ${KMSAVELIBS} ]]; then
659 install_library_dependencies
660 fi
661} 679}
662 680
663# @FUNCTION: kde4-meta_src_make_doc 681# @FUNCTION: kde4-meta_src_make_doc
664# @DESCRIPTION: 682# @DESCRIPTION:
665# This function searches in ${S}/${KMMODULE}, 683# This function searches in ${S}/${KMMODULE},
666# and tries to install "AUTHORS ChangeLog* README* NEWS todo" if these files exist. 684# and tries to install "AUTHORS ChangeLog* README* NEWS TODO" if these files exist.
667kde4-meta_src_make_doc() { 685kde4-meta_src_make_doc() {
668 debug-print-function ${FUNCNAME} "$@" 686 debug-print-function ${FUNCNAME} "$@"
669 687
670 local doc 688 local doc
671 for doc in AUTHORS ChangeLog* README* NEWS TODO; do 689 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
675 kde4-base_src_make_doc 693 kde4-base_src_make_doc
676} 694}
677 695
678# @FUNCTION: kde4-meta_pkg_postinst 696# @FUNCTION: kde4-meta_pkg_postinst
679# @DESCRIPTION: 697# @DESCRIPTION:
680# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 698# Display information about application handbook and invoke kbuildsycoca4.
681# ebuilds.
682kde4-meta_pkg_postinst() { 699kde4-meta_pkg_postinst() {
683 debug-print-function ${FUNCNAME} "$@" 700 debug-print-function ${FUNCNAME} "$@"
701
702 if has handbook ${IUSE//+} && ! use handbook; then
703 echo
704 einfo "Application handbook for ${PN} has not been installed."
705 einfo "To install handbook, reemerge =${CATEGORY}/${PF} with 'handbook' USE flag."
706 echo
707 fi
684 708
685 kde4-base_pkg_postinst 709 kde4-base_pkg_postinst
686} 710}
687 711
688# @FUNCTION: kde4-meta_pkg_postrm 712# @FUNCTION: kde4-meta_pkg_postrm

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20