/[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.19 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.19 2009/05/14 16:46:53 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
24 kde-base)
25 HOMEPAGE="http://www.kde.org/"
26 LICENSE="GPL-2"
27 ;;
28 koffice)
29 HOMEPAGE="http://www.koffice.org/"
30 LICENSE="GPL-2"
31 ;;
32esac
33
34# Add khelpcenter dependency when installing 23# Add khelpcenter dependency when installing handbooks
35if [[ ${PN} != khelpcenter ]] && has doc ${IUSE//+} && use doc; then 24if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then
36 RDEPEND="${RDEPEND}
37 >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=] 25 RDEPEND+=" handbook? ( >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=] )"
38 "
39fi 26fi
40 27
41# Add dependencies that all packages in a certain module share. 28# Add dependencies that all packages in a certain module share.
42case ${KMNAME} in 29case ${KMNAME} in
43 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphic) 30 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
44 DEPEND="${DEPEND}
45 >=kde-base/qimageblitz-0.0.4 31 COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4"
46 "
47 RDEPEND="${RDEPEND}
48 >=kde-base/qimageblitz-0.0.4
49 "
50 ;; 32 ;;
51 kdenetwork) 33 kdenetwork)
52 DEPEND="${DEPEND}
53 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] 34 COMMONDEPEND+=" >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]"
54 "
55 RDEPEND="${RDEPEND}
56 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
57 "
58 ;; 35 ;;
59 kdepim) 36 kdepim|kdepim-runtime)
60 DEPEND="${DEPEND} 37 COMMONDEPEND+="
61 dev-libs/boost
62 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
63 "
64 RDEPEND="${RDEPEND}
65 dev-libs/boost 38 dev-libs/boost
66 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] 39 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
67 " 40 "
68 case ${PN} in 41 case ${PN} in
69 akregator|kaddressbook|kjots|kmail|kmobiletools|knode|knotes|korganizer|ktimetracker) 42 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
70 IUSE="+kontact" 43 IUSE+=" +kontact"
71 RDEPEND="${RDEPEND}
72 kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] ) 44 RDEPEND+=" kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )"
73 "
74 ;; 45 ;;
75 esac 46 esac
76 ;; 47 ;;
77 kdegames) 48 kdegames)
78 if [[ ${PN} != libkdegames ]]; then 49 if [[ ${PN} != libkdegames ]]; then
79 DEPEND="${DEPEND}
80 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] 50 COMMONDEPEND+=" >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] "
81 "
82 RDEPEND="${RDEPEND}
83 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]
84 "
85 fi 51 fi
86 ;; 52 ;;
87 koffice) 53 koffice)
88 [[ ${PN} != koffice-data ]] && IUSE="debug" 54 [[ ${PN} != koffice-data ]] && IUSE+=" debug"
89 RDEPEND="${RDEPEND} 55 RDEPEND+="
90 !app-office/${PN}:0 56 !app-office/${PN}:0
91 !app-office/koffice:0 57 !app-office/koffice:0
92 !app-office/koffice-meta:0 58 !app-office/koffice-meta:0
93 " 59 "
60 if has openexr ${IUSE//+}; then
61 COMMONDEPEND+=" media-gfx/imagemagick[openexr?]"
62 else
63 COMMONDEPEND+=" media-gfx/imagemagick"
64 fi
65
94 COMMON_DEPEND=" 66 COMMONDEPEND+="
95 dev-cpp/eigen:2 67 dev-cpp/eigen:2
96 media-gfx/imagemagick[openexr?]
97 media-libs/fontconfig 68 media-libs/fontconfig
98 media-libs/freetype:2 69 media-libs/freetype:2
99 " 70 "
100 DEPEND="${DEPEND} ${COMMON_DEPEND}"
101 RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
102 unset COMMON_DEPEND
103 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then 71 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
104 DEPEND="${DEPEND}
105 >=app-office/koffice-libs-${PV}:${SLOT} 72 COMMONDEPEND+=" >=app-office/koffice-libs-${PV}:${SLOT}"
106 "
107 RDEPEND="${RDEPEND}
108 >=app-office/koffice-libs-${PV}:${SLOT}
109 "
110 fi 73 fi
111 ;; 74 ;;
112esac 75esac
76
77DEPEND+=" ${COMMONDEPEND}"
78RDEPEND+=" ${COMMONDEPEND}"
79unset COMMONDEPEND
113 80
114debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies" 81debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
115debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies" 82debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
116 83
117# 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)
153 120
154# @ECLASS-VARIABLE: KMEXTRA 121# @ECLASS-VARIABLE: KMEXTRA
155# @DESCRIPTION: 122# @DESCRIPTION:
156# All subdirectories listed here will be extracted, compiled & installed. 123# All subdirectories listed here will be extracted, compiled & installed.
157# $KMMODULE is always added to $KMEXTRA. 124# $KMMODULE is always added to $KMEXTRA.
158# 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,
159# 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
160# handled in the ebuild. 127# handled in the ebuild.
161# 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.
162 129
163# @ECLASS-VARIABLE: KMCOMPILEONLY 130# @ECLASS-VARIABLE: KMCOMPILEONLY
248 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 215 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
249 fi 216 fi
250 else 217 else
251 local abort tarball tarfile f extractlist moduleprefix postfix 218 local abort tarball tarfile f extractlist moduleprefix postfix
252 case ${PV} in 219 case ${PV} in
253 4.2.85) 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)
254 # block for normally packed upstream unstable snapshots 221 # block for normally packed upstream unstable snapshots
255 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2 222 KMTARPARAMS+=" --bzip2" # bz2
256 postfix="bz2" 223 postfix="bz2"
257 ;; 224 ;;
258 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 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*)
259 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma 226 KMTARPARAMS+=" --lzma" # lzma
260 postfix="lzma" 227 postfix="lzma"
261 ;; 228 ;;
262 *) 229 *)
263 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2 230 KMTARPARAMS+=" --bzip2" # bz2
264 postfix="bz2" 231 postfix="bz2"
265 ;; 232 ;;
266 esac 233 esac
267 case ${KMNAME} in 234 case ${KMNAME} in
268 kdebase-apps) 235 kdebase-apps)
269 # kdebase/apps -> kdebasa-apps 236 # kdebase/apps -> kdebase-apps
270 tarball="kdebase-${PV}.tar.${postfix}" 237 tarball="kdebase-${PV}.tar.${postfix}"
271 # Go one level deeper for kdebase-apps in tarballs 238 # Go one level deeper for kdebase-apps in tarballs
272 moduleprefix=apps/ 239 moduleprefix=apps/
273 KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||" 240 KMTARPARAMS+=" --transform=s|apps/||"
274 ;; 241 ;;
275 *) 242 *)
276 # Create tarball name from module name (this is the default) 243 # Create tarball name from module name (this is the default)
277 tarball="${KMNAME}-${PV}.tar.${postfix}" 244 tarball="${KMNAME}-${PV}.tar.${postfix}"
278 ;; 245 ;;
279 esac 246 esac
280 247
281 # Full patch to source tarball 248 # Full path to source tarball
282 tarfile="${DISTDIR}/${tarball}" 249 tarfile="${DISTDIR}/${tarball}"
283 250
284 # 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
285 # and in __list_needed_subdirectories 252 # and in __list_needed_subdirectories
286 topdir="${tarball%.tar.*}/" 253 topdir="${tarball%.tar.*}/"
290 kde4-meta_create_extractlists 257 kde4-meta_create_extractlists
291 258
292 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ 259 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
293 AUTHORS COPYING INSTALL README NEWS ChangeLog 260 AUTHORS COPYING INSTALL README NEWS ChangeLog
294 do 261 do
295 extractlist="${extractlist} ${topdir}${moduleprefix}${f}" 262 extractlist+=" ${topdir}${moduleprefix}${f}"
296 done 263 done
297 extractlist="${extractlist} $(__list_needed_subdirectories)" 264 extractlist+=" $(__list_needed_subdirectories)"
298 265
299 pushd "${WORKDIR}" > /dev/null 266 pushd "${WORKDIR}" > /dev/null
300 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 267 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
301 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null 268 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null
302 269
332# KMEXTRACTONLY and KMTARPARAMS. 299# KMEXTRACTONLY and KMTARPARAMS.
333kde4-meta_create_extractlists() { 300kde4-meta_create_extractlists() {
334 debug-print-function ${FUNCNAME} "$@" 301 debug-print-function ${FUNCNAME} "$@"
335 302
336 # TODO change to KMEXTRA for more strict check 303 # TODO change to KMEXTRA for more strict check
337 if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then 304 if has handbook ${IUSE//+} && use handbook && [[ -n ${KMMODULE} ]]; then
338 # We use the basename of $KMMODULE because $KMMODULE can contain 305 # We use the basename of $KMMODULE because $KMMODULE can contain
339 # the path to the module subdirectory. 306 # the path to the module subdirectory.
340 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 307 KMEXTRA_NONFATAL+="
308 doc/${KMMODULE##*/}"
341 fi 309 fi
342 310
343 # Add some CMake-files to KMEXTRACTONLY. 311 # Add some CMake-files to KMEXTRACTONLY.
344 # Note that this actually doesn't include KMEXTRA handling. 312 # Note that this actually doesn't include KMEXTRA handling.
345 # 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
346 case ${KMNAME} in 314 case ${KMNAME} in
347 kdebase) 315 kdebase)
348 KMEXTRACTONLY="${KMEXTRACTONLY} 316 KMEXTRACTONLY+="
349 apps/config-apps.h.cmake 317 apps/config-apps.h.cmake
350 apps/ConfigureChecks.cmake" 318 apps/ConfigureChecks.cmake"
351 ;; 319 ;;
352 kdebase-apps) 320 kdebase-apps)
353 KMEXTRACTONLY="${KMEXTRACTONLY} 321 KMEXTRACTONLY+="
354 config-apps.h.cmake 322 config-apps.h.cmake
355 ConfigureChecks.cmake" 323 ConfigureChecks.cmake"
356 ;; 324 ;;
357 kdebase-runtime) 325 kdebase-runtime)
358 KMEXTRACTONLY="${KMEXTRACTONLY} 326 KMEXTRACTONLY+="
359 config-runtime.h.cmake" 327 config-runtime.h.cmake"
360 ;; 328 ;;
361 kdebase-workspace) 329 kdebase-workspace)
362 KMEXTRACTONLY="${KMEXTRACTONLY} 330 KMEXTRACTONLY+="
363 config-unix.h.cmake 331 config-unix.h.cmake
364 ConfigureChecks.cmake 332 ConfigureChecks.cmake
365 config-workspace.h.cmake 333 config-workspace.h.cmake
366 config-X11.h.cmake 334 config-X11.h.cmake
367 startkde.cmake 335 startkde.cmake
368 KDE4WorkspaceConfig.cmake.in" 336 KDE4WorkspaceConfig.cmake.in"
369 ;; 337 ;;
370 kdegames) 338 kdegames)
371 if [[ ${PN} != libkdegames ]]; then 339 if [[ ${PN} != libkdegames ]]; then
372 KMEXTRACTONLY="${KMEXTRACTONLY} 340 KMEXTRACTONLY+="
373 libkdegames" 341 libkdegames/"
374 fi 342 fi
375 ;; 343 ;;
376 kdepim) 344 kdepim)
377 if [[ ${PN} != libkdepim ]]; then 345 if [[ ${PN} != libkdepim ]]; then
378 KMEXTRACTONLY="${KMEXTRACTONLY} 346 KMEXTRACTONLY+="
379 libkdepim" 347 libkdepim/"
380 fi 348 fi
381 case ${SLOT} in 349 case ${SLOT} in
382 4.3|live) 350 4.3|4.4|live)
383 KMEXTRACTONLY="${KMEXTRACTONLY} 351 KMEXTRACTONLY+="
384 kdepim-version.h 352 kdepim-version.h
385 config-enterprise.h.cmake" 353 config-enterprise.h.cmake"
386 ;; 354 ;;
387 esac 355 esac
388 KMEXTRACTONLY="${KMEXTRACTONLY} 356 KMEXTRACTONLY+="
389 kleopatra/ConfigureChecks.cmake" 357 kleopatra/ConfigureChecks.cmake"
390 if has kontact ${IUSE//+} && use kontact; then 358 if has kontact ${IUSE//+} && use kontact; then
359 KMEXTRA+="
391 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 360 kontact/plugins/${PLUGINNAME:-${PN}}/"
392 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 361 KMEXTRACTONLY+="
362 kontactinterfaces/"
393 fi 363 fi
394 ;; 364 ;;
365 kdeutils)
366 case ${SLOT} in
367 4.3|4.4|live)
368 KMEXTRACTONLY+="
369 kdeutils-version.h"
370 ;;
371 esac
372 ;;
395 koffice) 373 koffice)
396 KMEXTRACTONLY="${KMEXTRACTONLY} 374 KMEXTRACTONLY+="
397 config-endian.h.cmake 375 config-endian.h.cmake
398 filters/config-filters.h.cmake 376 filters/config-filters.h.cmake
399 config-openctl.h.cmake
400 config-openexr.h.cmake 377 config-openexr.h.cmake
401 config-opengl.h.cmake 378 config-opengl.h.cmake
402 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
403 ;; 387 ;;
404 esac 388 esac
405 # Don't install cmake modules for split ebuilds, to avoid collisions. 389 # Don't install cmake modules for split ebuilds, to avoid collisions.
406 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 ;;
407 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 402 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics)
408 case ${PN} in 403 case ${PN} in
409 libkdegames|libkdeedu|libkworkspace) 404 libkdegames|libkdeedu|libkworkspace)
410 KMEXTRA="${KMEXTRA} 405 KMEXTRA+="
411 cmake/modules/" 406 cmake/modules/"
412 ;; 407 ;;
413 *) 408 *)
414 KMCOMPILEONLY="${KMCOMPILEONLY} 409 KMCOMPILEONLY+="
415 cmake/modules/" 410 cmake/modules/"
416 ;; 411 ;;
417 esac 412 esac
418 ;; 413 ;;
419 esac 414 esac
424__list_needed_subdirectories() { 419__list_needed_subdirectories() {
425 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist 420 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
426 421
427 # We expand KMEXTRA by adding CMakeLists.txt files 422 # We expand KMEXTRA by adding CMakeLists.txt files
428 kmextra="${KMEXTRA}" 423 kmextra="${KMEXTRA}"
429 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}" 424 [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}"
430 for i in ${kmextra}; do 425 for i in ${kmextra}; do
431 kmextra_expanded="${kmextra_expanded} ${i}" 426 kmextra_expanded+=" ${i}"
432 j=$(dirname ${i}) 427 j=$(dirname ${i})
433 while [[ ${j} != "." ]]; do 428 while [[ ${j} != "." ]]; do
434 kmextra_expanded="${kmextra_expanded} ${j}/CMakeLists.txt"; 429 kmextra_expanded+=" ${j}/CMakeLists.txt";
435 j=$(dirname ${j}) 430 j=$(dirname ${j})
436 done 431 done
437 done 432 done
438 433
439 # Expand KMMODULE 434 # Expand KMMODULE
440 if [[ -n ${KMMODULE} ]]; then 435 if [[ -n ${KMMODULE} ]]; then
441 kmmodule_expanded="${KMMODULE}" 436 kmmodule_expanded="${KMMODULE}"
442 j=$(dirname ${KMMODULE}) 437 j=$(dirname ${KMMODULE})
443 while [[ ${j} != "." ]]; do 438 while [[ ${j} != "." ]]; do
444 kmmodule_expanded="${kmmodule_expanded} ${j}/CMakeLists.txt"; 439 kmmodule_expanded+=" ${j}/CMakeLists.txt";
445 j=$(dirname ${j}) 440 j=$(dirname ${j})
446 done 441 done
447 fi 442 fi
448 443
449 # Expand KMCOMPILEONLY 444 # Expand KMCOMPILEONLY
450 for i in ${KMCOMPILEONLY}; do 445 for i in ${KMCOMPILEONLY}; do
451 kmcompileonly_expanded="${kmcompileonly_expanded} ${i}" 446 kmcompileonly_expanded+=" ${i}"
452 j=$(dirname ${i}) 447 j=$(dirname ${i})
453 while [[ ${j} != "." ]]; do 448 while [[ ${j} != "." ]]; do
454 kmcompileonly_expanded="${kmcompileonly_expanded} ${j}/CMakeLists.txt"; 449 kmcompileonly_expanded+=" ${j}/CMakeLists.txt";
455 j=$(dirname ${j}) 450 j=$(dirname ${j})
456 done 451 done
457 done 452 done
458 453
459 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}" 454 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}"
463 # Create final list of stuff to extract 458 # Create final list of stuff to extract
464 # We append topdir only when specified (usually for tarballs) 459 # We append topdir only when specified (usually for tarballs)
465 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ 460 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
466 ${KMEXTRACTONLY} 461 ${KMEXTRACTONLY}
467 do 462 do
468 extractlist="${extractlist} ${topdir}${moduleprefix}${i}" 463 extractlist+=" ${topdir}${moduleprefix}${i}"
469 done 464 done
470 465
471 echo ${extractlist} 466 echo ${extractlist}
472} 467}
473 468
575 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \ 570 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \
576 die "${LINENO}: sed died in the kdebase-startkde collision prevention section" 571 die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
577 fi 572 fi
578 # 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
579 if [[ ${PN} != libkworkspace ]]; then 574 if [[ ${PN} != libkworkspace ]]; then
575 sed -i \
580 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' \
581 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"
582 fi 578 fi
583 ;; 579 ;;
584 kdebase-runtime) 580 kdebase-runtime)
585 # COLLISION PROTECT section 581 # COLLISION PROTECT section
586 # 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 esac 595 esac
600 ;; 596 ;;
601 kdewebdev) 597 kdewebdev)
602 # Disable hardcoded kdepimlibs check 598 # Disable hardcoded kdepimlibs check
603 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \ 599 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
604 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2 REQUIRED)/' \ 600 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \
605 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt REQUIRED)/' \ 601 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \
606 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost REQUIRED)/' \ 602 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost)/' \
607 -i CMakeLists.txt || die "failed to disable hardcoded checks" 603 -i CMakeLists.txt || die "failed to disable hardcoded checks"
608 ;; 604 ;;
609 koffice) 605 koffice)
610 # prevent collisions 606 # prevent collisions
611 if [[ ${PN} != koffice-data ]]; then 607 if [[ ${PN} != koffice-data ]]; then
612 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 608 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
613 "${S}"/cmake/modules/CMakeLists.txt || \ 609 "${S}"/cmake/modules/CMakeLists.txt || \
614 die "${LINENO}: sed died in collision prevention section" 610 die "${LINENO}: sed died in collision prevention section"
611 case ${PV} in
612 2.0.*)
615 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}' \
616 "${S}"/CMakeLists.txt || \ 614 "${S}"/CMakeLists.txt || \
617 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
618 fi 623 fi
619 esac 624 esac
620 625
621 popd > /dev/null 626 popd > /dev/null
622} 627}
649# General function for compiling split KDE4 applications. 654# General function for compiling split KDE4 applications.
650# Overrides kde4-base_src_compile. 655# Overrides kde4-base_src_compile.
651kde4-meta_src_compile() { 656kde4-meta_src_compile() {
652 debug-print-function ${FUNCNAME} "$@" 657 debug-print-function ${FUNCNAME} "$@"
653 658
654 kde4-base_src_compile 659 kde4-base_src_compile "$@"
655} 660}
656 661
657# @FUNCTION: kde4-meta_src_test 662# @FUNCTION: kde4-meta_src_test
658# @DESCRIPTION: 663# @DESCRIPTION:
659# 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
674} 679}
675 680
676# @FUNCTION: kde4-meta_src_make_doc 681# @FUNCTION: kde4-meta_src_make_doc
677# @DESCRIPTION: 682# @DESCRIPTION:
678# This function searches in ${S}/${KMMODULE}, 683# This function searches in ${S}/${KMMODULE},
679# 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.
680kde4-meta_src_make_doc() { 685kde4-meta_src_make_doc() {
681 debug-print-function ${FUNCNAME} "$@" 686 debug-print-function ${FUNCNAME} "$@"
682 687
683 local doc 688 local doc
684 for doc in AUTHORS ChangeLog* README* NEWS TODO; do 689 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
692# @DESCRIPTION: 697# @DESCRIPTION:
693# Display information about application handbook and invoke kbuildsycoca4. 698# Display information about application handbook and invoke kbuildsycoca4.
694kde4-meta_pkg_postinst() { 699kde4-meta_pkg_postinst() {
695 debug-print-function ${FUNCNAME} "$@" 700 debug-print-function ${FUNCNAME} "$@"
696 701
697 if has doc ${IUSE//+} && ! use doc; then 702 if has handbook ${IUSE//+} && ! use handbook; then
698 echo 703 echo
699 einfo "Application handbook for ${PN} has not been installed." 704 einfo "Application handbook for ${PN} has not been installed."
700 einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'doc' USE flag." 705 einfo "To install handbook, reemerge =${CATEGORY}/${PF} with 'handbook' USE flag."
701 echo 706 echo
702 fi 707 fi
703 708
704 kde4-base_pkg_postinst 709 kde4-base_pkg_postinst
705} 710}

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

  ViewVC Help
Powered by ViewVC 1.1.20