| 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.20 2009/05/28 09:47:52 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. |
| … | |
… | |
| 153 | |
153 | |
| 154 | # @ECLASS-VARIABLE: KMEXTRA |
154 | # @ECLASS-VARIABLE: KMEXTRA |
| 155 | # @DESCRIPTION: |
155 | # @DESCRIPTION: |
| 156 | # All subdirectories listed here will be extracted, compiled & installed. |
156 | # All subdirectories listed here will be extracted, compiled & installed. |
| 157 | # $KMMODULE is always added to $KMEXTRA. |
157 | # $KMMODULE is always added to $KMEXTRA. |
| 158 | # If the htmlhandbook USE-flag is set, and if this directory exists, |
158 | # If the doc USE-flag is set, and if this directory exists, |
| 159 | # then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be |
159 | # then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be |
| 160 | # handled in the ebuild. |
160 | # handled in the ebuild. |
| 161 | # If the documentation is in a different subdirectory, you should add it to KMEXTRA. |
161 | # If the documentation is in a different subdirectory, you should add it to KMEXTRA. |
| 162 | |
162 | |
| 163 | # @ECLASS-VARIABLE: KMCOMPILEONLY |
163 | # @ECLASS-VARIABLE: KMCOMPILEONLY |
| … | |
… | |
| 402 | config-prefix.h.cmake" |
402 | config-prefix.h.cmake" |
| 403 | ;; |
403 | ;; |
| 404 | esac |
404 | esac |
| 405 | # Don't install cmake modules for split ebuilds, to avoid collisions. |
405 | # Don't install cmake modules for split ebuilds, to avoid collisions. |
| 406 | case ${KMNAME} in |
406 | case ${KMNAME} in |
|
|
407 | kdepim) |
|
|
408 | # No need for unpack since 4.2.86 |
|
|
409 | # Remove when 4.2 is wiped out from the tree |
|
|
410 | case ${PV} in |
|
|
411 | 4.1*|4.2.0|4.2.1|4.2.2|4.2.3|4.2.4|4.2.85) |
|
|
412 | KMCOMPILEONLY="${KMCOMPILEONLY} |
|
|
413 | cmake/modules/" |
|
|
414 | ;; |
|
|
415 | *) ;; |
|
|
416 | esac |
|
|
417 | ;; |
| 407 | kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) |
418 | kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics) |
| 408 | case ${PN} in |
419 | case ${PN} in |
| 409 | libkdegames|libkdeedu|libkworkspace) |
420 | libkdegames|libkdeedu|libkworkspace) |
| 410 | KMEXTRA="${KMEXTRA} |
421 | KMEXTRA="${KMEXTRA} |
| 411 | cmake/modules/" |
422 | cmake/modules/" |
| 412 | ;; |
423 | ;; |
| … | |
… | |
| 575 | sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \ |
586 | sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \ |
| 576 | die "${LINENO}: sed died in the kdebase-startkde collision prevention section" |
587 | die "${LINENO}: sed died in the kdebase-startkde collision prevention section" |
| 577 | fi |
588 | fi |
| 578 | # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82 |
589 | # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82 |
| 579 | if [[ ${PN} != libkworkspace ]]; then |
590 | if [[ ${PN} != libkworkspace ]]; then |
|
|
591 | sed -i \ |
| 580 | sed -i -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ |
592 | -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" |
593 | CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section" |
| 582 | fi |
594 | fi |
| 583 | ;; |
595 | ;; |
| 584 | kdebase-runtime) |
596 | kdebase-runtime) |
| 585 | # COLLISION PROTECT section |
597 | # COLLISION PROTECT section |
| 586 | # Only install the kde4 script as part of kde-base/kdebase-data |
598 | # Only install the kde4 script as part of kde-base/kdebase-data |
| … | |
… | |
| 599 | esac |
611 | esac |
| 600 | ;; |
612 | ;; |
| 601 | kdewebdev) |
613 | kdewebdev) |
| 602 | # Disable hardcoded kdepimlibs check |
614 | # Disable hardcoded kdepimlibs check |
| 603 | sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \ |
615 | 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)/' \ |
616 | -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \ |
| 605 | -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt REQUIRED)/' \ |
617 | -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \ |
| 606 | -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost REQUIRED)/' \ |
618 | -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost)/' \ |
| 607 | -i CMakeLists.txt || die "failed to disable hardcoded checks" |
619 | -i CMakeLists.txt || die "failed to disable hardcoded checks" |
| 608 | ;; |
620 | ;; |
| 609 | koffice) |
621 | koffice) |
| 610 | # prevent collisions |
622 | # prevent collisions |
| 611 | if [[ ${PN} != koffice-data ]]; then |
623 | if [[ ${PN} != koffice-data ]]; then |