/[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.130 Revision 1.144
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2014 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.130 2013/08/15 15:29:58 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.144 2014/12/04 10:32:10 mrueg 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
11# and KDE4 applications. 11# and KDE4 applications.
12# 12#
13# NOTE: KDE 4 ebuilds currently support EAPIs 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 15
16if [[ ${___ECLASS_ONCE_KDE4_BASE} != "recur -_+^+_- spank" ]] ; then 16if [[ -z ${_KDE4_BASE_ECLASS} ]]; then
17___ECLASS_ONCE_KDE4_BASE="recur -_+^+_- spank" 17_KDE4_BASE_ECLASS=1
18 18
19# @ECLASS-VARIABLE: KDE_SELINUX_MODULE 19# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
20# @DESCRIPTION: 20# @DESCRIPTION:
21# If set to "none", do nothing. 21# If set to "none", do nothing.
22# 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
32# For proper description see virtualx.eclass manpage. 32# For proper description see virtualx.eclass manpage.
33# Here we redefine default value to be manual, if your package needs virtualx 33# Here we redefine default value to be manual, if your package needs virtualx
34# for tests you should proceed with setting VIRTUALX_REQUIRED=test. 34# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
35: ${VIRTUALX_REQUIRED:=manual} 35: ${VIRTUALX_REQUIRED:=manual}
36 36
37inherit kde4-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils base virtualx versionator eutils multilib 37inherit kde4-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils virtualx versionator eutils multilib
38 38
39if [[ ${KDE_BUILD_TYPE} = live ]]; then 39if [[ ${KDE_BUILD_TYPE} = live ]]; then
40 case ${KDE_SCM} in 40 case ${KDE_SCM} in
41 svn) inherit subversion ;; 41 svn) inherit subversion ;;
42 git) inherit git-2 ;; 42 git) inherit git-r3 ;;
43 esac 43 esac
44fi 44fi
45 45
46# @ECLASS-VARIABLE: CMAKE_REQUIRED 46# @ECLASS-VARIABLE: CMAKE_REQUIRED
47# @DESCRIPTION: 47# @DESCRIPTION:
64KDE_MINIMAL="${KDE_MINIMAL:-4.4}" 64KDE_MINIMAL="${KDE_MINIMAL:-4.4}"
65 65
66# Set slot for KDEBASE known packages 66# Set slot for KDEBASE known packages
67case ${KDEBASE} in 67case ${KDEBASE} in
68 kde-base) 68 kde-base)
69 case ${EAPI} in
70 5)
71 SLOT=4/$(get_version_component_range 1-2)
72 ;;
73 *)
69 SLOT=4 74 SLOT=4
75 ;;
76 esac
70 KDE_MINIMAL="${PV}" 77 KDE_MINIMAL="${PV}"
71 ;; 78 ;;
72 kdevelop) 79 kdevelop)
73 if [[ ${KDE_BUILD_TYPE} = live ]]; then 80 if [[ ${KDE_BUILD_TYPE} = live ]]; then
74 # @ECLASS-VARIABLE: KDEVELOP_VERSION 81 # @ECLASS-VARIABLE: KDEVELOP_VERSION
75 # @DESCRIPTION: 82 # @DESCRIPTION:
76 # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages. 83 # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages.
77 # Applies to KDEBASE=kdevelop only. 84 # Applies to KDEBASE=kdevelop only.
78 KDEVELOP_VERSION="${KDEVELOP_VERSION:-9999}" 85 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.9999}"
79 # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION 86 # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION
80 # @DESCRIPTION: 87 # @DESCRIPTION:
81 # Specifies KDevplatform version. Default is 1.0.0 for tagged packages and 9999 for live packages. 88 # Specifies KDevplatform version. Default is 1.0.0 for tagged packages and 9999 for live packages.
82 # Applies to KDEBASE=kdevelop only. 89 # Applies to KDEBASE=kdevelop only.
83 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-9999}" 90 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-4.9999}"
84 else 91 else
85 case ${PN} in 92 case ${PN} in
86 kdevelop|quanta) 93 kdevelop)
87 KDEVELOP_VERSION=${PV} 94 KDEVELOP_VERSION=${PV}
88 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)" 95 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)"
89 ;; 96 ;;
90 kdevplatform|kdevelop-php*) 97 kdevplatform|kdevelop-php*|kdevelop-python)
91 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)" 98 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)"
92 KDEVPLATFORM_VERSION=${PV} 99 KDEVPLATFORM_VERSION=${PV}
93 ;; 100 ;;
94 *) 101 *)
95 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.0.0}" 102 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.0.0}"
177 184
178 # This code is to prevent portage from searching GENTOO_MIRRORS for 185 # This code is to prevent portage from searching GENTOO_MIRRORS for
179 # packages that will never be mirrored. (As they only will ever be in 186 # packages that will never be mirrored. (As they only will ever be in
180 # the overlay). 187 # the overlay).
181 case ${PV} in 188 case ${PV} in
182 *9999* | 4.?.[6-9]? | 4.??.[6-9]?) 189 *9999* | 4.?.[6-9]? | 4.??.[6-9]? | ??.?.[6-9]? | ??.??.[6-9]?)
183 RESTRICT+=" mirror" 190 RESTRICT+=" mirror"
184 ;; 191 ;;
185 esac 192 esac
186 ;; 193 ;;
187 kdevelop) 194 kdevelop)
191esac 198esac
192 199
193# @ECLASS-VARIABLE: QT_MINIMAL 200# @ECLASS-VARIABLE: QT_MINIMAL
194# @DESCRIPTION: 201# @DESCRIPTION:
195# Determine version of qt we enforce as minimal for the package. 202# Determine version of qt we enforce as minimal for the package.
196QT_MINIMAL="${QT_MINIMAL:-4.8.0}" 203QT_MINIMAL="${QT_MINIMAL:-4.8.5}"
197 204
198# Declarative dependencies 205# Declarative dependencies
199qtdeclarativedepend=" 206qtdeclarativedepend="
200 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4 207 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4
201" 208"
279kdecommondepend=" 286kdecommondepend="
280 dev-lang/perl 287 dev-lang/perl
281 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility] 288 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
282 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl] 289 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl]
283 >=dev-qt/qtdbus-${QT_MINIMAL}:4 290 >=dev-qt/qtdbus-${QT_MINIMAL}:4
284 || ( 291 >=dev-qt/designer-${QT_MINIMAL}:4[-phonon]
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(+)] 292 >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus(+)]
287 )
288 >=dev-qt/qtscript-${QT_MINIMAL}:4 293 >=dev-qt/qtscript-${QT_MINIMAL}:4
289 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support] 294 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
290 >=dev-qt/qtsvg-${QT_MINIMAL}:4 295 >=dev-qt/qtsvg-${QT_MINIMAL}:4
291 >=dev-qt/qttest-${QT_MINIMAL}:4 296 >=dev-qt/qttest-${QT_MINIMAL}:4
292 >=dev-qt/qtwebkit-${QT_MINIMAL}:4 297 >=dev-qt/qtwebkit-${QT_MINIMAL}:4
293 !aqua? (
294 x11-libs/libXext
295 x11-libs/libXt
296 x11-libs/libXxf86vm
297 x11-libs/libXcomposite
298 x11-libs/libxkbfile
299 )
300" 298"
301 299
302if [[ ${PN} != kdelibs ]]; then 300if [[ ${PN} != kdelibs ]]; then
303 kdecommondepend+=" $(add_kdebase_dep kdelibs)" 301 kdecommondepend+=" $(add_kdebase_dep kdelibs)"
304 if [[ ${KDEBASE} = kdevelop ]]; then 302 if [[ ${KDEBASE} = kdevelop ]]; then
309 # Applies to KDEBASE=kdevelop only. 307 # Applies to KDEBASE=kdevelop only.
310 KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}" 308 KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}"
311 case ${KDEVPLATFORM_REQUIRED} in 309 case ${KDEVPLATFORM_REQUIRED} in
312 always) 310 always)
313 kdecommondepend+=" 311 kdecommondepend+="
314 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} 312 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION}:4
315 " 313 "
316 ;; 314 ;;
317 *) ;; 315 *) ;;
318 esac 316 esac
319 fi 317 fi
329 ) 327 )
330" 328"
331 329
332kderdepend="" 330kderdepend=""
333 331
332if [[ ${CATEGORY} == kde-apps ]]; then
333 kderdepend+=" !kde-base/${PN}"
334fi
335
334# all packages needs oxygen icons for basic iconset 336# all packages needs oxygen icons for basic iconset
335if [[ ${PN} != oxygen-icons ]]; then 337if [[ ${PN} != oxygen-icons ]]; then
336 kderdepend+=" $(add_kdebase_dep oxygen-icons)" 338 kderdepend+=" || ( kde-apps/oxygen-icons $(add_kdebase_dep oxygen-icons) )"
337fi 339fi
338 340
341# add a dependency over kde-l10n
339if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then 342if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
340 for _lingua in ${KDE_LINGUAS}; do 343 for _lingua in ${KDE_LINGUAS}; do
341 # if our package has lignuas, pull in kde-l10n with selected lingua enabled, 344 # if our package has linguas, pull in kde-l10n with selected lingua enabled,
342 # but only for selected ones. 345 # but only for selected ones.
343 # this can't be done on one line because if user doesn't use any localisation 346 # 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. 347 # then he is probably not interested in kde-l10n at all.
345 kderdepend+=" 348 kderdepend+="
346 linguas_${_lingua}? ( $(add_kdebase_dep kde-l10n "linguas_${_lingua}(+)") ) 349 linguas_${_lingua}? ( $(add_kdebase_dep kde-l10n "linguas_${_lingua}(+)") )
438 # Unstable KDE SC releases 441 # Unstable KDE SC releases
439 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 442 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
440 4.[1-7].[12345]) 443 4.[1-7].[12345])
441 # Stable KDE SC with old .bz2 support 444 # Stable KDE SC with old .bz2 support
442 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 445 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
446 4.11.9)
447 # Part of 4.12 actually, sigh. Not stable for next release!
448 SRC_URI="mirror://kde/stable/4.12.5/src/${_kmname_pv}.tar.xz" ;;
449 4.11.11)
450 # Part of 4.13 actually, sigh. Not stable for next release!
451 SRC_URI="mirror://kde/stable/4.13.3/src/${_kmname_pv}.tar.xz" ;;
452 4.11.12)
453 # Part of 4.14 actually, sigh. Not stable for next release!
454 SRC_URI="mirror://kde/stable/4.14.1/src/${_kmname_pv}.tar.xz" ;;
455 4.11.13)
456 # Part of 4.14 actually, sigh. Not stable for next release!
457 SRC_URI="mirror://kde/stable/4.14.2/src/${_kmname_pv}.tar.xz" ;;
458 4.11.14)
459 # Part of 4.14 actually, sigh. Not stable for next release!
460 SRC_URI="mirror://kde/stable/4.14.3/src/${_kmname_pv}.tar.xz" ;;
461 ??.?.[6-9]? | ??.??.[4-9]?)
462 # Unstable KDE Applications releases
463 SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
443 *) 464 *)
465 if [[ ${CATEGORY} == kde-apps ]]; then
466 # Stable KDE Applications releases
467 SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
468 else
444 # Stable KDE SC releases 469 # Stable KDE SC releases
445 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 470 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz"
471 fi
472 ;;
446 esac 473 esac
447 ;; 474 ;;
448 kdevelop|kdevelop-php*|kdevplatform) 475 kdevelop|kdevelop-php*|kdevplatform)
449 case ${KDEVELOP_VERSION} in 476 case ${KDEVELOP_VERSION} in
450 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 477 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
461 case ${KDE_SCM} in 488 case ${KDE_SCM} in
462 svn) 489 svn)
463 # Determine branch URL based on live type 490 # Determine branch URL based on live type
464 local branch_prefix 491 local branch_prefix
465 case ${PV} in 492 case ${PV} in
466 9999*) 493 4.9999*)
467 # trunk 494 # trunk
468 branch_prefix="trunk/KDE" 495 branch_prefix="trunk/KDE"
469 ;; 496 ;;
470 *) 497 *)
471 # branch 498 # branch
548 else 575 else
549 _kmname=${PN} 576 _kmname=${PN}
550 fi 577 fi
551 578
552 # default branching 579 # default branching
553 [[ ${PV} != 9999* && ${KDEBASE} == kde-base ]] && \ 580 [[ ${PV} != 4.9999* && ${KDEBASE} == kde-base ]] && \
554 EGIT_BRANCH="KDE/$(get_kde_version)" 581 EGIT_BRANCH="KDE/$(get_kde_version)"
555 582
556 # default repo uri 583 # default repo uri
557 EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" 584 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" )
558 585
559 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}" 586 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}"
560 debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}" 587 debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}"
561 ;; 588 ;;
562 esac 589 esac
590 unset KDEHOME 617 unset KDEHOME
591 618
592 # Check if gcc compiler is fresh enough. 619 # Check if gcc compiler is fresh enough.
593 # In theory should be in pkg_pretend but we check it only for kdelibs there 620 # In theory should be in pkg_pretend but we check it only for kdelibs there
594 # and for others we do just quick scan in pkg_setup because pkg_pretend 621 # and for others we do just quick scan in pkg_setup because pkg_pretend
595 # executions consume quite some time. 622 # executions consume quite some time (ie. when merging 300 packages at once will cause 300 checks)
596 if [[ ${MERGE_TYPE} != binary ]]; then 623 if [[ ${MERGE_TYPE} != binary ]]; then
597 [[ $(gcc-major-version) -lt 4 ]] || \ 624 [[ $(gcc-major-version) -lt 4 ]] || \
598 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \ 625 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 6 ]] ) \
599 && die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)." 626 && die "Sorry, but gcc-4.6 and earlier wont work for some KDE packages."
600 fi 627 fi
601 628
602 KDEDIR=/usr 629 KDEDIR=/usr
603 : ${PREFIX:=/usr} 630 : ${PREFIX:=/usr}
604 EKDEDIR=${EPREFIX}/usr 631 EKDEDIR=${EPREFIX}/usr
620 case ${KDE_SCM} in 647 case ${KDE_SCM} in
621 svn) 648 svn)
622 subversion_src_unpack 649 subversion_src_unpack
623 ;; 650 ;;
624 git) 651 git)
625 git-2_src_unpack 652 git-r3_src_unpack
626 ;; 653 ;;
627 esac 654 esac
628 else 655 else
629 unpack ${A} 656 unpack ${A}
630 fi 657 fi
673 case ${KDE_SCM} in 700 case ${KDE_SCM} in
674 svn) subversion_src_prepare ;; 701 svn) subversion_src_prepare ;;
675 esac 702 esac
676 fi 703 fi
677 704
678 # Apply patches 705 # Apply patches, cmake-utils does the job already
679 base_src_prepare 706 cmake-utils_src_prepare
680 707
681 # Save library dependencies 708 # Save library dependencies
682 if [[ -n ${KMSAVELIBS} ]] ; then 709 if [[ -n ${KMSAVELIBS} ]] ; then
683 save_library_dependencies 710 save_library_dependencies
684 fi 711 fi
769 kded4 2>&1 > /dev/null & 796 kded4 2>&1 > /dev/null &
770 kded4_pid=$! 797 kded4_pid=$!
771 fi 798 fi
772 799
773 cmake-utils_src_test 800 cmake-utils_src_test
774 } 801 }
775 802
776 # When run as normal user during ebuild development with the ebuild command, the 803 # When run as normal user during ebuild development with the ebuild command, the
777 # kde tests tend to access the session DBUS. This however is not possible in a real 804 # kde tests tend to access the session DBUS. This however is not possible in a real
778 # emerge or on the tinderbox. 805 # emerge or on the tinderbox.
779 # > make sure it does not happen, so bad tests can be recognized and disabled 806 # > make sure it does not happen, so bad tests can be recognized and disabled

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

  ViewVC Help
Powered by ViewVC 1.1.20