/[gentoo-x86]/eclass/kde4-base.eclass
Gentoo

Diff of /eclass/kde4-base.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.124 Revision 1.130
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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-base.eclass,v 1.124 2013/03/03 00:22:56 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.130 2013/08/15 15:29:58 kensington Exp $
4 4
5# @ECLASS: kde4-base.eclass 5# @ECLASS: kde4-base.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: This eclass provides functions for kde 4.X ebuilds 8# @BLURB: This eclass provides functions for kde 4.X ebuilds
9# @DESCRIPTION: 9# @DESCRIPTION:
10# The kde4-base.eclass provides support for building KDE4 based ebuilds 10# The kde4-base.eclass provides support for building KDE4 based ebuilds
11# and KDE4 applications. 11# and KDE4 applications.
12# 12#
13# NOTE: KDE 4 ebuilds currently support EAPIs 3, 4, and 5. This will be 13# NOTE: KDE 4 ebuilds currently support EAPIs 4 and 5. This will be
14# reviewed over time as new EAPI versions are approved. 14# reviewed over time as new EAPI versions are approved.
15
16if [[ ${___ECLASS_ONCE_KDE4_BASE} != "recur -_+^+_- spank" ]] ; then
17___ECLASS_ONCE_KDE4_BASE="recur -_+^+_- spank"
15 18
16# @ECLASS-VARIABLE: KDE_SELINUX_MODULE 19# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
17# @DESCRIPTION: 20# @DESCRIPTION:
18# If set to "none", do nothing. 21# If set to "none", do nothing.
19# For any other value, add selinux to IUSE, and depending on that useflag 22# For any other value, add selinux to IUSE, and depending on that useflag
174 177
175 # This code is to prevent portage from searching GENTOO_MIRRORS for 178 # This code is to prevent portage from searching GENTOO_MIRRORS for
176 # packages that will never be mirrored. (As they only will ever be in 179 # packages that will never be mirrored. (As they only will ever be in
177 # the overlay). 180 # the overlay).
178 case ${PV} in 181 case ${PV} in
179 *9999* | 4.?.[6-9]?) 182 *9999* | 4.?.[6-9]? | 4.??.[6-9]?)
180 RESTRICT+=" mirror" 183 RESTRICT+=" mirror"
181 ;; 184 ;;
182 esac 185 esac
183 ;; 186 ;;
184 kdevelop) 187 kdevelop)
188esac 191esac
189 192
190# @ECLASS-VARIABLE: QT_MINIMAL 193# @ECLASS-VARIABLE: QT_MINIMAL
191# @DESCRIPTION: 194# @DESCRIPTION:
192# Determine version of qt we enforce as minimal for the package. 195# Determine version of qt we enforce as minimal for the package.
193if version_is_at_least 4.8.50 "${KDE_MINIMAL}"; then
194 # Upstream has added an *undeclared* dependency on Qt 4.8...
195 QT_MINIMAL="${QT_MINIMAL:-4.8.0}" 196QT_MINIMAL="${QT_MINIMAL:-4.8.0}"
196else
197 QT_MINIMAL="${QT_MINIMAL:-4.7.4}"
198fi
199 197
200# Declarative dependencies 198# Declarative dependencies
201qtdeclarativedepend=" 199qtdeclarativedepend="
202 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4 200 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4
203" 201"
281kdecommondepend=" 279kdecommondepend="
282 dev-lang/perl 280 dev-lang/perl
283 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility] 281 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
284 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl] 282 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl]
285 >=dev-qt/qtdbus-${QT_MINIMAL}:4 283 >=dev-qt/qtdbus-${QT_MINIMAL}:4
286 >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus] 284 || (
285 ( >=dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)] dev-qt/designer:4[-phonon] )
286 <dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)]
287 )
287 >=dev-qt/qtscript-${QT_MINIMAL}:4 288 >=dev-qt/qtscript-${QT_MINIMAL}:4
288 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support] 289 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
289 >=dev-qt/qtsvg-${QT_MINIMAL}:4 290 >=dev-qt/qtsvg-${QT_MINIMAL}:4
290 >=dev-qt/qttest-${QT_MINIMAL}:4 291 >=dev-qt/qttest-${QT_MINIMAL}:4
291 >=dev-qt/qtwebkit-${QT_MINIMAL}:4 292 >=dev-qt/qtwebkit-${QT_MINIMAL}:4
333# all packages needs oxygen icons for basic iconset 334# all packages needs oxygen icons for basic iconset
334if [[ ${PN} != oxygen-icons ]]; then 335if [[ ${PN} != oxygen-icons ]]; then
335 kderdepend+=" $(add_kdebase_dep oxygen-icons)" 336 kderdepend+=" $(add_kdebase_dep oxygen-icons)"
336fi 337fi
337 338
338# add a dependency over kde-l10n if EAPI4 or better is around
339if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} && ${EAPI:-0} != 3 ]]; then 339if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
340 for _lingua in ${KDE_LINGUAS}; do 340 for _lingua in ${KDE_LINGUAS}; do
341 # if our package has lignuas, pull in kde-l10n with selected lingua enabled, 341 # if our package has lignuas, pull in kde-l10n with selected lingua enabled,
342 # but only for selected ones. 342 # but only for selected ones.
343 # this can't be done on one line because if user doesn't use any localisation 343 # this can't be done on one line because if user doesn't use any localisation
344 # then he is probably not interested in kde-l10n at all. 344 # then he is probably not interested in kde-l10n at all.
420 # we calculate URI only for known KDEBASE modules 420 # we calculate URI only for known KDEBASE modules
421 [[ -n ${KDEBASE} ]] || return 421 [[ -n ${KDEBASE} ]] || return
422 422
423 # calculate tarball module name 423 # calculate tarball module name
424 if [[ -n ${KMNAME} ]]; then 424 if [[ -n ${KMNAME} ]]; then
425 # fixup kdebase-apps name
426 case ${KMNAME} in
427 kdebase-apps)
428 _kmname="kdebase" ;;
429 *)
430 _kmname="${KMNAME}" ;; 425 _kmname="${KMNAME}"
431 esac
432 else 426 else
433 _kmname=${PN} 427 _kmname=${PN}
434 fi 428 fi
435 _kmname_pv="${_kmname}-${PV}" 429 _kmname_pv="${_kmname}-${PV}"
436 case ${KDEBASE} in 430 case ${KDEBASE} in
597 591
598 # Check if gcc compiler is fresh enough. 592 # Check if gcc compiler is fresh enough.
599 # In theory should be in pkg_pretend but we check it only for kdelibs there 593 # In theory should be in pkg_pretend but we check it only for kdelibs there
600 # and for others we do just quick scan in pkg_setup because pkg_pretend 594 # and for others we do just quick scan in pkg_setup because pkg_pretend
601 # executions consume quite some time. 595 # executions consume quite some time.
602 # We can only do this for EAPI 4 or later because the MERGE_TYPE variable
603 # is otherwise undefined.
604 if [[ ${EAPI:-0} != 3 ]]; then
605 if [[ ${MERGE_TYPE} != binary ]]; then 596 if [[ ${MERGE_TYPE} != binary ]]; then
606 [[ $(gcc-major-version) -lt 4 ]] || \ 597 [[ $(gcc-major-version) -lt 4 ]] || \
607 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \ 598 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
608 && die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)." 599 && die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)."
609 fi
610 fi 600 fi
611 601
612 KDEDIR=/usr 602 KDEDIR=/usr
613 : ${PREFIX:=/usr} 603 : ${PREFIX:=/usr}
614 EKDEDIR=${EPREFIX}/usr 604 EKDEDIR=${EPREFIX}/usr
627 debug-print-function ${FUNCNAME} "$@" 617 debug-print-function ${FUNCNAME} "$@"
628 618
629 if [[ ${KDE_BUILD_TYPE} = live ]]; then 619 if [[ ${KDE_BUILD_TYPE} = live ]]; then
630 case ${KDE_SCM} in 620 case ${KDE_SCM} in
631 svn) 621 svn)
632 migrate_store_dir
633 subversion_src_unpack 622 subversion_src_unpack
634 ;; 623 ;;
635 git) 624 git)
636 git-2_src_unpack 625 git-2_src_unpack
637 ;; 626 ;;
841 done 830 done
842 fi 831 fi
843 832
844 cmake-utils_src_install 833 cmake-utils_src_install
845 834
846 # In EAPI 4+, we don't want ${PREFIX}/share/doc/HTML to be compressed, 835 # We don't want ${PREFIX}/share/doc/HTML to be compressed,
847 # because then khelpcenter can't find the docs 836 # because then khelpcenter can't find the docs
848 [[ ${EAPI:-0} != 3 && -d ${ED}/${PREFIX}/share/doc/HTML ]] && 837 [[ -d ${ED}/${PREFIX}/share/doc/HTML ]] &&
849 docompress -x ${PREFIX}/share/doc/HTML 838 docompress -x ${PREFIX}/share/doc/HTML
850} 839}
851 840
852# @FUNCTION: kde4-base_pkg_preinst 841# @FUNCTION: kde4-base_pkg_preinst
853# @DESCRIPTION: 842# @DESCRIPTION:
904 gnome2_icon_cache_update 893 gnome2_icon_cache_update
905 fdo-mime_desktop_database_update 894 fdo-mime_desktop_database_update
906 fdo-mime_mime_database_update 895 fdo-mime_mime_database_update
907 buildsycoca 896 buildsycoca
908} 897}
898
899fi

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.130

  ViewVC Help
Powered by ViewVC 1.1.20