/[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.33 Revision 1.37
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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.33 2010/02/02 14:20:16 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.37 2010/05/17 01:16:39 reavertm 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.
19[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild" 19[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
20 20
21# Add dependencies that all packages in a certain module share. 21# Add dependencies that all packages in a certain module share.
22case ${KMNAME} in 22case ${KMNAME} in
23 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics) 23 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
24 COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4" 24 COMMONDEPEND+=" >=media-libs/qimageblitz-0.0.4"
25 ;; 25 ;;
26 kdepim|kdepim-runtime) 26 kdepim|kdepim-runtime)
27 ! slot_is_at_least 4.4 ${SLOT} && COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)" 27 ! slot_is_at_least 4.4 ${SLOT} && COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)"
28 case ${PN} in 28 case ${PN} in
29 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) 29 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
338 KMEXTRACTONLY+=" 338 KMEXTRACTONLY+="
339 config-enterprise.h.cmake 339 config-enterprise.h.cmake
340 kleopatra/ConfigureChecks.cmake" 340 kleopatra/ConfigureChecks.cmake"
341 if slot_is_at_least 4.5 ${SLOT}; then 341 if slot_is_at_least 4.5 ${SLOT}; then
342 KMEXTRACTONLY+=" 342 KMEXTRACTONLY+="
343 CTestCustom.cmake
343 kdepim-version.h.cmake" 344 kdepim-version.h.cmake"
344 else 345 else
345 KMEXTRACTONLY+=" 346 KMEXTRACTONLY+="
346 kdepim-version.h" 347 kdepim-version.h"
347 fi 348 fi
571 kdepim) 572 kdepim)
572 # Disable hardcoded checks 573 # Disable hardcoded checks
573 sed -r -e '/find_package\(KdepimLibs/s/REQUIRED//' \ 574 sed -r -e '/find_package\(KdepimLibs/s/REQUIRED//' \
574 -e '/find_package\((KdepimLibs|Boost|QGpgme|Akonadi|ZLIB|Strigi|SharedDesktopOntologies|Soprano|Nepomuk)/{/macro_optional_/!s/find/macro_optional_&/}' \ 575 -e '/find_package\((KdepimLibs|Boost|QGpgme|Akonadi|ZLIB|Strigi|SharedDesktopOntologies|Soprano|Nepomuk)/{/macro_optional_/!s/find/macro_optional_&/}' \
575 -e '/macro_log_feature\((Boost|QGPGME|Akonadi|ZLIB|STRIGI|SHAREDDESKTOPONTOLOGIES|Soprano|Nepomuk)_FOUND/s/ TRUE / FALSE /' \ 576 -e '/macro_log_feature\((Boost|QGPGME|Akonadi|ZLIB|STRIGI|SHAREDDESKTOPONTOLOGIES|Soprano|Nepomuk)_FOUND/s/ TRUE / FALSE /' \
577 -e '/if[[:space:]]*([[:space:]]*BUILD_.*)/s/^/#OVERRIDE /' \
578 -e '/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)/s/^/#OVERRIDE /' \
576 -i CMakeLists.txt || die "failed to disable hardcoded checks" 579 -i CMakeLists.txt || die "failed to disable hardcoded checks"
580 # Disable broken or redundant build logic
581 if ( has kontact ${IUSE//+} && use kontact ) || [[ ${PN} = kontact ]]; then
582 sed -e '/if[[:space:]]*([[:space:]]*BUILD_.*)/s/^/#OVERRIDE /' \
583 -e '/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)/s/^/#OVERRIDE /' \
584 -i kontact/plugins/CMakeLists.txt || die 'failed to override build logic'
585 fi
577 if ! slot_is_at_least 4.5 ${SLOT}; then 586 if ! slot_is_at_least 4.5 ${SLOT}; then
578 case ${PN} in 587 case ${PN} in
579 kalarm|kmailcvt|kontact|korganizer|korn) 588 kalarm|kmailcvt|kontact|korganizer|korn)
580 sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \ 589 sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
581 -e '/add_custom_target(kmail_xml /,/)/p' \ 590 -e '/add_custom_target(kmail_xml /,/)/p' \
606 2.0.[1-9]) 615 2.0.[1-9])
607 sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \ 616 sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \
608 "${S}"/CMakeLists.txt || \ 617 "${S}"/CMakeLists.txt || \
609 die "${LINENO}: sed died in collision prevention section" 618 die "${LINENO}: sed died in collision prevention section"
610 ;; 619 ;;
620 *) ;;
621 esac
622 # koffice 2.1.[8-9][0-9] and 9999
623 case ${PV} in
624 2.1.8[0-9]|2.1.9[0-9]|9999)
625 sed -e '/^option(BUILD/s/ON/OFF/' \
626 -e '/^if(NOT BUILD_kchart/,/^endif(NOT BUILD_kchart/d' \
627 -e '/^if(BUILD_koreport/,/^endif(BUILD_koreport/d' \
628 -e 's/set(SHOULD_BUILD_F_OFFICE TRUE)/set(SHOULD_BUILD_F_OFFICE FALSE)/' \
629 -i "${S}"/CMakeLists.txt || die "sed died while fixing cmakelists"
630 if [[ ${PN} != koffice-data ]] && [[ ${PV} == 9999 ]]; then
631 sed -e '/config-opengl.h/d' \
632 -i "${S}"/CMakeLists.txt || die "sed died while fixing cmakelists"
633
634 fi
635 ;;
611 *) ;; 636 *) ;;
612 esac 637 esac
613 esac 638 esac
614 639
615 popd > /dev/null 640 popd > /dev/null
637 -DWITH_Boost=OFF 662 -DWITH_Boost=OFF
638 -DWITH_LibTidy=OFF 663 -DWITH_LibTidy=OFF
639 "${mycmakeargs[@]}" 664 "${mycmakeargs[@]}"
640 ) 665 )
641 ;; 666 ;;
667 koffice)
668 case ${PV} in
669 2.1.8[0-9]|2.1.9[0-9]|9999)
670 if [[ ${PN} != "kchart" ]]; then
671 mycmakeargs=(
672 -DBUILD_koreport=OFF
673 "${mycmakeargs[@]}"
674 )
675 fi
676 ;;
677 esac
678 ;;
642 esac 679 esac
643 680
644 kde4-base_src_configure 681 kde4-base_src_configure
645} 682}
646 683
672# @DESCRIPTION: 709# @DESCRIPTION:
673# Function for installing KDE4 split applications. 710# Function for installing KDE4 split applications.
674kde4-meta_src_install() { 711kde4-meta_src_install() {
675 debug-print-function $FUNCNAME "$@" 712 debug-print-function $FUNCNAME "$@"
676 713
714 # Search ${S}/${KMMODULE} and install common documentation files found
715 local doc
716 for doc in "${S}/${KMMODULE}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
717 [[ -s "${doc}" ]] && dodoc "${doc}"
718 done
719
677 kde4-base_src_install 720 kde4-base_src_install
678}
679
680# @FUNCTION: kde4-meta_src_make_doc
681# @DESCRIPTION:
682# This function searches in ${S}/${KMMODULE},
683# and tries to install "AUTHORS ChangeLog* README* NEWS TODO" if these files exist.
684kde4-meta_src_make_doc() {
685 debug-print-function ${FUNCNAME} "$@"
686
687 local doc
688 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
689 [[ -s ${KMMODULE}/${doc} ]] && newdoc "${KMMODULE}/${doc}" "${doc}.${KMMODULE##*/}"
690 done
691
692 kde4-base_src_make_doc
693} 721}
694 722
695# @FUNCTION: kde4-meta_pkg_postinst 723# @FUNCTION: kde4-meta_pkg_postinst
696# @DESCRIPTION: 724# @DESCRIPTION:
697# Invoke kbuildsycoca4. 725# Invoke kbuildsycoca4.

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20