| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 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.57 2011/10/06 14:13:29 alexxy Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.59 2011/12/18 00:00:45 dilfridge 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. |
| … | |
… | |
| 287 | kde4-meta_create_extractlists() { |
287 | kde4-meta_create_extractlists() { |
| 288 | debug-print-function ${FUNCNAME} "$@" |
288 | debug-print-function ${FUNCNAME} "$@" |
| 289 | |
289 | |
| 290 | # Add default handbook locations |
290 | # Add default handbook locations |
| 291 | # FIXME - legacy code - remove when 4.4.5 is gone or preferrably port 4.4.5. |
291 | # FIXME - legacy code - remove when 4.4.5 is gone or preferrably port 4.4.5. |
| 292 | if [[ $(get_kde_version) < 4.5 ]] && has handbook ${IUSE//+} && use handbook && [[ -z ${KMNOMODULE} ]]; then |
292 | if [[ $(get_kde_version) < 4.5 ]] && use_if_iuse handbook && [[ -z ${KMNOMODULE} ]]; then |
| 293 | # We use the basename of $KMMODULE because $KMMODULE can contain |
293 | # We use the basename of $KMMODULE because $KMMODULE can contain |
| 294 | # the path to the module subdirectory. |
294 | # the path to the module subdirectory. |
| 295 | KMEXTRA_NONFATAL+=" |
295 | KMEXTRA_NONFATAL+=" |
| 296 | doc/${KMMODULE##*/}" |
296 | doc/${KMMODULE##*/}" |
| 297 | fi |
297 | fi |
| … | |
… | |
| 344 | kdepim-version.h.cmake" |
344 | kdepim-version.h.cmake" |
| 345 | else |
345 | else |
| 346 | KMEXTRACTONLY+=" |
346 | KMEXTRACTONLY+=" |
| 347 | kdepim-version.h" |
347 | kdepim-version.h" |
| 348 | fi |
348 | fi |
| 349 | if has kontact ${IUSE//+} && use kontact; then |
349 | if use_if_iuse kontact; then |
| 350 | KMEXTRA+=" |
350 | KMEXTRA+=" |
| 351 | kontact/plugins/${PLUGINNAME:-${PN}}/" |
351 | kontact/plugins/${PLUGINNAME:-${PN}}/" |
| 352 | fi |
352 | fi |
| 353 | ;; |
353 | ;; |
| 354 | kdeutils) |
354 | kdeutils) |
| … | |
… | |
| 554 | if [[ ${PN} != kdebase-startkde && -f CMakeLists.txt ]]; then |
554 | if [[ ${PN} != kdebase-startkde && -f CMakeLists.txt ]]; then |
| 555 | # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0. |
555 | # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0. |
| 556 | sed -e '/startkde/s/^/#DONOTINSTALL /' \ |
556 | sed -e '/startkde/s/^/#DONOTINSTALL /' \ |
| 557 | -i CMakeLists.txt || die "${LINENO}: sed died in the kdebase-startkde collision prevention section" |
557 | -i CMakeLists.txt || die "${LINENO}: sed died in the kdebase-startkde collision prevention section" |
| 558 | fi |
558 | fi |
|
|
559 | # Remove workspace target prefix in order to get direct linking to workspace libs |
|
|
560 | sed -e '/set(KDE4WORKSPACE_TARGET_PREFIX/s/^/#OVERRIDE /' \ |
|
|
561 | -i CMakeLists.txt || die "${LINENO}: sed died in KDE4WORKSPACE_TARGET_PREFIX removal section" |
| 559 | # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82 |
562 | # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82 |
| 560 | if [[ ${PN} != libkworkspace ]]; then |
563 | if [[ ${PN} != libkworkspace ]]; then |
| 561 | sed -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ |
564 | sed -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ |
| 562 | -i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace strip config install and fix EXPORT section" |
565 | -i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace strip config install and fix EXPORT section" |
| 563 | fi |
566 | fi |
| … | |
… | |
| 582 | kdepim) |
585 | kdepim) |
| 583 | # Disable hardcoded checks |
586 | # Disable hardcoded checks |
| 584 | sed -r -e '/find_package\(KdepimLibs/s/REQUIRED//' \ |
587 | sed -r -e '/find_package\(KdepimLibs/s/REQUIRED//' \ |
| 585 | -e '/find_package\((KdepimLibs|Boost|QGpgme|Akonadi|ZLIB|Strigi|SharedDesktopOntologies|Soprano|Nepomuk)/{/macro_optional_/!s/find/macro_optional_&/}' \ |
588 | -e '/find_package\((KdepimLibs|Boost|QGpgme|Akonadi|ZLIB|Strigi|SharedDesktopOntologies|Soprano|Nepomuk)/{/macro_optional_/!s/find/macro_optional_&/}' \ |
| 586 | -e '/macro_log_feature\((Boost|QGPGME|Akonadi|ZLIB|STRIGI|SHAREDDESKTOPONTOLOGIES|Soprano|Nepomuk)_FOUND/s/ TRUE / FALSE /' \ |
589 | -e '/macro_log_feature\((Boost|QGPGME|Akonadi|ZLIB|STRIGI|SHAREDDESKTOPONTOLOGIES|Soprano|Nepomuk)_FOUND/s/ TRUE / FALSE /' \ |
| 587 | -e '/if[[:space:]]*([[:space:]]*BUILD_.*)/s/^/#OVERRIDE /' \ |
590 | -e 's/if[[:space:]]*([[:space:]]*BUILD_.*)[[:space:]]*/if(1) # &/' \ |
| 588 | -e '/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)/s/^/#OVERRIDE /' \ |
591 | -e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \ |
| 589 | -i CMakeLists.txt || die "failed to disable hardcoded checks" |
592 | -i CMakeLists.txt || die "failed to disable hardcoded checks" |
| 590 | # Disable broken or redundant build logic |
593 | # Disable broken or redundant build logic |
| 591 | if ( has kontact ${IUSE//+} && use kontact ) || [[ ${PN} = kontact ]]; then |
594 | if use_if_iuse kontact || [[ ${PN} = kontact ]]; then |
| 592 | sed -e '/if[[:space:]]*([[:space:]]*BUILD_.*)/s/^/#OVERRIDE /' \ |
595 | sed -e 's/if[[:space:]]*([[:space:]]*BUILD_.*)[[:space:]]*$/if(1) # &/' \ |
| 593 | -e '/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)/s/^/#OVERRIDE /' \ |
596 | -e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \ |
| 594 | -i kontact/plugins/CMakeLists.txt || die 'failed to override build logic' |
597 | -i kontact/plugins/CMakeLists.txt || die 'failed to override build logic' |
| 595 | fi |
598 | fi |
| 596 | if [[ $(get_kde_version) < 4.5 ]]; then |
599 | if [[ $(get_kde_version) < 4.5 ]]; then |
| 597 | case ${PN} in |
600 | case ${PN} in |
| 598 | kalarm|kmailcvt|kontact|korganizer|korn) |
601 | kalarm|kmailcvt|kontact|korganizer|korn) |