/[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.15 Revision 1.25
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.15 2009/03/12 17:53:05 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.25 2009/08/20 09:18:01 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.
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|kdebase-workspace|kdebase-runtime|kdegraphic) 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
76
77DEPEND+=" ${COMMONDEPEND}"
78RDEPEND+=" ${COMMONDEPEND}"
79unset COMMONDEPEND
130 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 ${BUILD_TYPE} 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 ;;
143 *) ;;
144esac 94esac
145 95
146# @ECLASS-VARIABLE: KMNAME 96# @ECLASS-VARIABLE: KMNAME
147# @DESCRIPTION: 97# @DESCRIPTION:
148# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it 98# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it
170 120
171# @ECLASS-VARIABLE: KMEXTRA 121# @ECLASS-VARIABLE: KMEXTRA
172# @DESCRIPTION: 122# @DESCRIPTION:
173# All subdirectories listed here will be extracted, compiled & installed. 123# All subdirectories listed here will be extracted, compiled & installed.
174# $KMMODULE is always added to $KMEXTRA. 124# $KMMODULE is always added to $KMEXTRA.
175# 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,
176# 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
177# handled in the ebuild. 127# handled in the ebuild.
178# 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.
179 129
180# @ECLASS-VARIABLE: KMCOMPILEONLY 130# @ECLASS-VARIABLE: KMCOMPILEONLY
265 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 215 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
266 fi 216 fi
267 else 217 else
268 local abort tarball tarfile f extractlist moduleprefix postfix 218 local abort tarball tarfile f extractlist moduleprefix postfix
269 case ${PV} in 219 case ${PV} in
270 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*)
271 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma 226 KMTARPARAMS+=" --lzma" # lzma
272 postfix="lzma" 227 postfix="lzma"
273 ;; 228 ;;
274 *) 229 *)
275 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2 230 KMTARPARAMS+=" --bzip2" # bz2
276 postfix="bz2" 231 postfix="bz2"
277 ;; 232 ;;
278 esac 233 esac
279 case ${KMNAME} in 234 case ${KMNAME} in
280 kdebase-apps) 235 kdebase-apps)
281 # kdebase/apps -> kdebasa-apps 236 # kdebase/apps -> kdebase-apps
282 tarball="kdebase-${PV}.tar.${postfix}" 237 tarball="kdebase-${PV}.tar.${postfix}"
283 # Go one level deeper for kdebase-apps in tarballs 238 # Go one level deeper for kdebase-apps in tarballs
284 moduleprefix=apps/ 239 moduleprefix=apps/
285 KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||" 240 KMTARPARAMS+=" --transform=s|apps/||"
286 ;; 241 ;;
287 *) 242 *)
288 # Create tarball name from module name (this is the default) 243 # Create tarball name from module name (this is the default)
289 tarball="${KMNAME}-${PV}.tar.${postfix}" 244 tarball="${KMNAME}-${PV}.tar.${postfix}"
290 ;; 245 ;;
291 esac 246 esac
292 247
293 # Full patch to source tarball 248 # Full path to source tarball
294 tarfile="${DISTDIR}/${tarball}" 249 tarfile="${DISTDIR}/${tarball}"
295 250
296 # 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
297 # and in __list_needed_subdirectories 252 # and in __list_needed_subdirectories
298 topdir="${tarball%.tar.*}/" 253 topdir="${tarball%.tar.*}/"
302 kde4-meta_create_extractlists 257 kde4-meta_create_extractlists
303 258
304 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ 259 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
305 AUTHORS COPYING INSTALL README NEWS ChangeLog 260 AUTHORS COPYING INSTALL README NEWS ChangeLog
306 do 261 do
307 extractlist="${extractlist} ${topdir}${moduleprefix}${f}" 262 extractlist+=" ${topdir}${moduleprefix}${f}"
308 done 263 done
309 extractlist="${extractlist} $(__list_needed_subdirectories)" 264 extractlist+=" $(__list_needed_subdirectories)"
310 265
311 pushd "${WORKDIR}" > /dev/null 266 pushd "${WORKDIR}" > /dev/null
312 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 267 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
313 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null 268 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null
314 269
343# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 298# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
344# KMEXTRACTONLY and KMTARPARAMS. 299# KMEXTRACTONLY and KMTARPARAMS.
345kde4-meta_create_extractlists() { 300kde4-meta_create_extractlists() {
346 debug-print-function ${FUNCNAME} "$@" 301 debug-print-function ${FUNCNAME} "$@"
347 302
303 # TODO change to KMEXTRA for more strict check
348 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 304 if has handbook ${IUSE//+} && use handbook && [[ -n ${KMMODULE} ]]; then
349 # We use the basename of $KMMODULE because $KMMODULE can contain 305 # We use the basename of $KMMODULE because $KMMODULE can contain
350 # the path to the module subdirectory. 306 # the path to the module subdirectory.
351 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 307 KMEXTRA_NONFATAL+="
308 doc/${KMMODULE##*/}"
352 fi 309 fi
353 310
354 # Add some CMake-files to KMEXTRACTONLY. 311 # Add some CMake-files to KMEXTRACTONLY.
355 # Note that this actually doesn't include KMEXTRA handling. 312 # Note that this actually doesn't include KMEXTRA handling.
356 # 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
357 case ${KMNAME} in 314 case ${KMNAME} in
358 kdebase) 315 kdebase)
359 KMEXTRACTONLY="${KMEXTRACTONLY} 316 KMEXTRACTONLY+="
360 apps/config-apps.h.cmake 317 apps/config-apps.h.cmake
361 apps/ConfigureChecks.cmake" 318 apps/ConfigureChecks.cmake"
362 ;; 319 ;;
363 kdebase-apps) 320 kdebase-apps)
364 KMEXTRACTONLY="${KMEXTRACTONLY} 321 KMEXTRACTONLY+="
365 config-apps.h.cmake 322 config-apps.h.cmake
366 ConfigureChecks.cmake" 323 ConfigureChecks.cmake"
367 ;; 324 ;;
368 kdebase-runtime) 325 kdebase-runtime)
369 KMEXTRACTONLY="${KMEXTRACTONLY} 326 KMEXTRACTONLY+="
370 config-runtime.h.cmake" 327 config-runtime.h.cmake"
371 ;; 328 ;;
372 kdebase-workspace) 329 kdebase-workspace)
373 KMEXTRACTONLY="${KMEXTRACTONLY} 330 KMEXTRACTONLY+="
374 config-unix.h.cmake 331 config-unix.h.cmake
375 ConfigureChecks.cmake 332 ConfigureChecks.cmake
376 config-workspace.h.cmake 333 config-workspace.h.cmake
377 config-X11.h.cmake 334 config-X11.h.cmake
378 startkde.cmake 335 startkde.cmake
379 KDE4WorkspaceConfig.cmake.in" 336 KDE4WorkspaceConfig.cmake.in"
380 ;; 337 ;;
381 kdegames) 338 kdegames)
382 if [[ ${PN} != libkdegames ]]; then 339 if [[ ${PN} != libkdegames ]]; then
383 KMEXTRACTONLY="${KMEXTRACTONLY} 340 KMEXTRACTONLY+="
384 libkdegames" 341 libkdegames/"
385 fi 342 fi
386 ;; 343 ;;
387 kdepim) 344 kdepim)
388 if [[ ${PN} != libkdepim ]]; then 345 if [[ ${PN} != libkdepim ]]; then
389 KMEXTRACTONLY="${KMEXTRACTONLY} 346 KMEXTRACTONLY+="
390 libkdepim" 347 libkdepim/"
391 fi 348 fi
392 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+="
393 kleopatra/ConfigureChecks.cmake" 357 kleopatra/ConfigureChecks.cmake"
394 if has kontact ${IUSE//+} && use kontact; then 358 if has kontact ${IUSE//+} && use kontact; then
359 KMEXTRA+="
395 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 360 kontact/plugins/${PLUGINNAME:-${PN}}/"
396 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 361 KMEXTRACTONLY+="
362 kontactinterfaces/"
397 fi 363 fi
398 ;; 364 ;;
365 kdeutils)
366 case ${SLOT} in
367 4.3|4.4|live)
368 KMEXTRACTONLY+="
369 kdeutils-version.h"
370 ;;
371 esac
372 ;;
399 koffice) 373 koffice)
400 KMEXTRACTONLY="${KMEXTRACTONLY} 374 KMEXTRACTONLY+="
401 config-endian.h.cmake 375 config-endian.h.cmake
402 filters/config-filters.h.cmake 376 filters/config-filters.h.cmake
403 config-openctl.h.cmake
404 config-openexr.h.cmake 377 config-openexr.h.cmake
405 config-opengl.h.cmake 378 config-opengl.h.cmake
406 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
407 ;; 387 ;;
408 esac 388 esac
409 # Don't install cmake modules for split ebuilds, to avoid collisions. 389 # Don't install cmake modules for split ebuilds, to avoid collisions.
410 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 ;;
411 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 402 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics)
412 case ${PN} in 403 case ${PN} in
413 libkdegames|libkdeedu|marble|libkworkspace) 404 libkdegames|libkdeedu|libkworkspace)
414 KMEXTRA="${KMEXTRA} 405 KMEXTRA+="
415 cmake/modules/" 406 cmake/modules/"
416 ;; 407 ;;
417 *) 408 *)
418 KMCOMPILEONLY="${KMCOMPILEONLY} 409 KMCOMPILEONLY+="
419 cmake/modules/" 410 cmake/modules/"
420 ;; 411 ;;
421 esac 412 esac
422 ;; 413 ;;
423 esac 414 esac
428__list_needed_subdirectories() { 419__list_needed_subdirectories() {
429 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist 420 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
430 421
431 # We expand KMEXTRA by adding CMakeLists.txt files 422 # We expand KMEXTRA by adding CMakeLists.txt files
432 kmextra="${KMEXTRA}" 423 kmextra="${KMEXTRA}"
433 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}" 424 [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}"
434 for i in ${kmextra}; do 425 for i in ${kmextra}; do
435 kmextra_expanded="${kmextra_expanded} ${i}" 426 kmextra_expanded+=" ${i}"
436 j=$(dirname ${i}) 427 j=$(dirname ${i})
437 while [[ ${j} != "." ]]; do 428 while [[ ${j} != "." ]]; do
438 kmextra_expanded="${kmextra_expanded} ${j}/CMakeLists.txt"; 429 kmextra_expanded+=" ${j}/CMakeLists.txt";
439 j=$(dirname ${j}) 430 j=$(dirname ${j})
440 done 431 done
441 done 432 done
442 433
443 # Expand KMMODULE 434 # Expand KMMODULE
444 if [[ -n ${KMMODULE} ]]; then 435 if [[ -n ${KMMODULE} ]]; then
445 kmmodule_expanded="${KMMODULE}" 436 kmmodule_expanded="${KMMODULE}"
446 j=$(dirname ${KMMODULE}) 437 j=$(dirname ${KMMODULE})
447 while [[ ${j} != "." ]]; do 438 while [[ ${j} != "." ]]; do
448 kmmodule_expanded="${kmmodule_expanded} ${j}/CMakeLists.txt"; 439 kmmodule_expanded+=" ${j}/CMakeLists.txt";
449 j=$(dirname ${j}) 440 j=$(dirname ${j})
450 done 441 done
451 fi 442 fi
452 443
453 # Expand KMCOMPILEONLY 444 # Expand KMCOMPILEONLY
454 for i in ${KMCOMPILEONLY}; do 445 for i in ${KMCOMPILEONLY}; do
455 kmcompileonly_expanded="${kmcompileonly_expanded} ${i}" 446 kmcompileonly_expanded+=" ${i}"
456 j=$(dirname ${i}) 447 j=$(dirname ${i})
457 while [[ ${j} != "." ]]; do 448 while [[ ${j} != "." ]]; do
458 kmcompileonly_expanded="${kmcompileonly_expanded} ${j}/CMakeLists.txt"; 449 kmcompileonly_expanded+=" ${j}/CMakeLists.txt";
459 j=$(dirname ${j}) 450 j=$(dirname ${j})
460 done 451 done
461 done 452 done
462 453
463 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}" 454 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}"
467 # Create final list of stuff to extract 458 # Create final list of stuff to extract
468 # We append topdir only when specified (usually for tarballs) 459 # We append topdir only when specified (usually for tarballs)
469 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ 460 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
470 ${KMEXTRACTONLY} 461 ${KMEXTRACTONLY}
471 do 462 do
472 extractlist="${extractlist} ${topdir}${moduleprefix}${i}" 463 extractlist+=" ${topdir}${moduleprefix}${i}"
473 done 464 done
474 465
475 echo ${extractlist} 466 echo ${extractlist}
476} 467}
477 468
579 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \ 570 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \
580 die "${LINENO}: sed died in the kdebase-startkde collision prevention section" 571 die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
581 fi 572 fi
582 # 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
583 if [[ ${PN} != libkworkspace ]]; then 574 if [[ ${PN} != libkworkspace ]]; then
575 sed -i \
584 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' \
585 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"
586 fi 578 fi
587 ;; 579 ;;
588 kdebase-runtime) 580 kdebase-runtime)
589 # COLLISION PROTECT section 581 # COLLISION PROTECT section
590 # 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
600 -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"
601 _change_cmakelists_parent_dirs kmail 593 _change_cmakelists_parent_dirs kmail
602 ;; 594 ;;
603 esac 595 esac
604 ;; 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 ;;
605 koffice) 605 koffice)
606 # prevent collisions 606 # prevent collisions
607 if [[ ${PN} != koffice-data ]]; then 607 if [[ ${PN} != koffice-data ]]; then
608 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 608 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
609 "${S}"/cmake/modules/CMakeLists.txt || \ 609 "${S}"/cmake/modules/CMakeLists.txt || \
610 die "${LINENO}: sed died in collision prevention section" 610 die "${LINENO}: sed died in collision prevention section"
611 case ${PV} in
612 2.0.*)
611 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}' \
612 "${S}"/CMakeLists.txt || \ 614 "${S}"/CMakeLists.txt || \
613 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
614 fi 623 fi
615 esac 624 esac
616 625
617 popd > /dev/null 626 popd > /dev/null
618} 627}
622# 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
623# ebuilds. 632# ebuilds.
624kde4-meta_src_configure() { 633kde4-meta_src_configure() {
625 debug-print-function ${FUNCNAME} "$@" 634 debug-print-function ${FUNCNAME} "$@"
626 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
627 kde4-base_src_configure 649 kde4-base_src_configure
628} 650}
629 651
630# @FUNCTION: kde4-meta_src_compile 652# @FUNCTION: kde4-meta_src_compile
631# @DESCRIPTION: 653# @DESCRIPTION:
632# General function for compiling split KDE4 applications. 654# General function for compiling split KDE4 applications.
633# Overrides kde4-base_src_compile. 655# Overrides kde4-base_src_compile.
634kde4-meta_src_compile() { 656kde4-meta_src_compile() {
635 debug-print-function ${FUNCNAME} "$@" 657 debug-print-function ${FUNCNAME} "$@"
636 658
637 kde4-base_src_compile 659 kde4-base_src_compile "$@"
638} 660}
639 661
640# @FUNCTION: kde4-meta_src_test 662# @FUNCTION: kde4-meta_src_test
641# @DESCRIPTION: 663# @DESCRIPTION:
642# 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
651# @DESCRIPTION: 673# @DESCRIPTION:
652# Function for installing KDE4 split applications. 674# Function for installing KDE4 split applications.
653kde4-meta_src_install() { 675kde4-meta_src_install() {
654 debug-print-function $FUNCNAME "$@" 676 debug-print-function $FUNCNAME "$@"
655 677
656 kde4-meta_src_make_doc 678 kde4-base_src_install
657 cmake-utils_src_install
658
659 if [[ -n ${KMSAVELIBS} ]]; then
660 install_library_dependencies
661 fi
662} 679}
663 680
664# @FUNCTION: kde4-meta_src_make_doc 681# @FUNCTION: kde4-meta_src_make_doc
665# @DESCRIPTION: 682# @DESCRIPTION:
666# This function searches in ${S}/${KMMODULE}, 683# This function searches in ${S}/${KMMODULE},
667# 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.
668kde4-meta_src_make_doc() { 685kde4-meta_src_make_doc() {
669 debug-print-function ${FUNCNAME} "$@" 686 debug-print-function ${FUNCNAME} "$@"
670 687
671 local doc 688 local doc
672 for doc in AUTHORS ChangeLog* README* NEWS TODO; do 689 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
676 kde4-base_src_make_doc 693 kde4-base_src_make_doc
677} 694}
678 695
679# @FUNCTION: kde4-meta_pkg_postinst 696# @FUNCTION: kde4-meta_pkg_postinst
680# @DESCRIPTION: 697# @DESCRIPTION:
681# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 698# Display information about application handbook and invoke kbuildsycoca4.
682# ebuilds.
683kde4-meta_pkg_postinst() { 699kde4-meta_pkg_postinst() {
684 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
685 708
686 kde4-base_pkg_postinst 709 kde4-base_pkg_postinst
687} 710}
688 711
689# @FUNCTION: kde4-meta_pkg_postrm 712# @FUNCTION: kde4-meta_pkg_postrm

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20