/[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.136 Revision 1.148
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2015 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.136 2014/06/14 18:33:59 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.148 2015/03/21 18:22:22 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
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
184 184
185 # This code is to prevent portage from searching GENTOO_MIRRORS for 185 # This code is to prevent portage from searching GENTOO_MIRRORS for
186 # 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
187 # the overlay). 187 # the overlay).
188 case ${PV} in 188 case ${PV} in
189 *9999* | 4.?.[6-9]? | 4.??.[6-9]?) 189 *9999* | 4.?.[6-9]? | 4.??.[6-9]? | ??.?.[6-9]? | ??.??.[6-9]?)
190 RESTRICT+=" mirror" 190 RESTRICT+=" mirror"
191 ;; 191 ;;
192 esac 192 esac
193 ;; 193 ;;
194 kdevelop) 194 kdevelop)
327 ) 327 )
328" 328"
329 329
330kderdepend="" 330kderdepend=""
331 331
332if [[ ${CATEGORY} == kde-apps ]]; then
333 kderdepend+=" !kde-base/${PN}"
334fi
335
332# all packages needs oxygen icons for basic iconset 336# all packages needs oxygen icons for basic iconset
333if [[ ${PN} != oxygen-icons ]]; then 337if [[ ${PN} != oxygen-icons ]]; then
334 kderdepend+=" $(add_kdebase_dep oxygen-icons)" 338 kderdepend+=" || ( kde-apps/oxygen-icons $(add_kdebase_dep oxygen-icons '' 4.14.3) )"
335fi 339fi
336 340
337# add a dependency over kde-l10n 341# add a dependency over kde-l10n
338if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then 342if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
339 for _lingua in ${KDE_LINGUAS}; do 343 for _lingua in ${KDE_LINGUAS}; do
340 # 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,
341 # but only for selected ones. 345 # but only for selected ones.
342 # 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
343 # then he is probably not interested in kde-l10n at all. 347 # then he is probably not interested in kde-l10n at all.
344 kderdepend+=" 348 kderdepend+="
345 linguas_${_lingua}? ( $(add_kdebase_dep kde-l10n "linguas_${_lingua}(+)") ) 349 linguas_${_lingua}? ( || ( kde-apps/kde-l10n[linguas_${_lingua}(+)] $(add_kdebase_dep kde-l10n "linguas_${_lingua}(+)") ) )
346 " 350 "
347 done 351 done
348 unset _lingua 352 unset _lingua
349fi 353fi
350 354
434 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree 438 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree
435 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;; 439 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;;
436 4.?.[6-9]? | 4.??.[6-9]?) 440 4.?.[6-9]? | 4.??.[6-9]?)
437 # Unstable KDE SC releases 441 # Unstable KDE SC releases
438 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 442 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
439 4.[1-7].[12345])
440 # Stable KDE SC with old .bz2 support
441 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
442 4.11.7) 443 4.11.14)
443 # Part of 4.12 actually, sigh. Not stable for next release! 444 # Part of 4.14 actually, sigh. Not stable for next release!
444 SRC_URI="mirror://kde/stable/4.12.3/src/${_kmname_pv}.tar.xz" ;; 445 SRC_URI="mirror://kde/stable/4.14.3/src/${_kmname_pv}.tar.xz" ;;
445 4.11.8) 446 4.11.17)
446 # Part of 4.12 actually, sigh. Not stable for next release! 447 # Part of 14.12.3 actually, sigh. Not stable for next release!
447 SRC_URI="mirror://kde/stable/4.12.4/src/${_kmname_pv}.tar.xz" ;; 448 SRC_URI="mirror://kde/stable/applications/14.12.3/src/${_kmname_pv}.tar.xz" ;;
448 4.11.9) 449 4.14.6)
449 # Part of 4.12 actually, sigh. Not stable for next release! 450 # Part of 14.12.3 actually, sigh. Not stable for next release!
450 SRC_URI="mirror://kde/stable/4.12.5/src/${_kmname_pv}.tar.xz" ;; 451 SRC_URI="mirror://kde/stable/applications/14.12.3/src/${_kmname_pv}.tar.xz" ;;
451 4.11.10) 452 ??.?.[6-9]? | ??.??.[4-9]?)
452 # Part of 4.13 actually, sigh. Not stable for next release! 453 # Unstable KDE Applications releases
453 SRC_URI="mirror://kde/stable/4.13.2/src/${_kmname_pv}.tar.xz" ;; 454 SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
454 *) 455 *)
456 if [[ ${CATEGORY} == kde-apps ]]; then
457 # Stable KDE Applications releases
458 SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
459 else
455 # Stable KDE SC releases 460 # Stable KDE SC releases
456 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 461 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz"
462 fi
463 ;;
457 esac 464 esac
458 ;; 465 ;;
459 kdevelop|kdevelop-php*|kdevplatform) 466 kdevelop|kdevelop-php*|kdevplatform)
460 case ${KDEVELOP_VERSION} in 467 case ${KDEVELOP_VERSION} in
461 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 468 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.xz" ;;
462 *) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 469 *) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.xz" ;;
463 esac 470 esac
464 ;; 471 ;;
465 esac 472 esac
466} 473}
467 474
472 case ${KDE_SCM} in 479 case ${KDE_SCM} in
473 svn) 480 svn)
474 # Determine branch URL based on live type 481 # Determine branch URL based on live type
475 local branch_prefix 482 local branch_prefix
476 case ${PV} in 483 case ${PV} in
477 4.9999*) 484 9999*)
478 # trunk 485 # trunk
479 branch_prefix="trunk/KDE" 486 branch_prefix="trunk/KDE"
480 ;; 487 ;;
481 *) 488 *)
482 # branch 489 # branch
559 else 566 else
560 _kmname=${PN} 567 _kmname=${PN}
561 fi 568 fi
562 569
563 # default branching 570 # default branching
564 [[ ${PV} != 4.9999* && ${KDEBASE} == kde-base ]] && \ 571 [[ ${PV} != 4.9999* && ${PV} != 9999 && ${KDEBASE} == kde-base ]] && \
565 EGIT_BRANCH="KDE/$(get_kde_version)" 572 EGIT_BRANCH="KDE/$(get_kde_version)"
566 573
567 # default repo uri 574 # default repo uri
568 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" ) 575 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" )
569 576
601 unset KDEHOME 608 unset KDEHOME
602 609
603 # Check if gcc compiler is fresh enough. 610 # Check if gcc compiler is fresh enough.
604 # In theory should be in pkg_pretend but we check it only for kdelibs there 611 # In theory should be in pkg_pretend but we check it only for kdelibs there
605 # and for others we do just quick scan in pkg_setup because pkg_pretend 612 # and for others we do just quick scan in pkg_setup because pkg_pretend
606 # executions consume quite some time. 613 # executions consume quite some time (ie. when merging 300 packages at once will cause 300 checks)
607 if [[ ${MERGE_TYPE} != binary ]]; then 614 if [[ ${MERGE_TYPE} != binary ]]; then
608 [[ $(gcc-major-version) -lt 4 ]] || \ 615 [[ $(gcc-major-version) -lt 4 ]] || \
609 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \ 616 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 6 ]] ) \
610 && die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)." 617 && die "Sorry, but gcc-4.6 and earlier wont work for some KDE packages."
611 fi 618 fi
612 619
613 KDEDIR=/usr 620 KDEDIR=/usr
614 : ${PREFIX:=/usr} 621 : ${PREFIX:=/usr}
615 EKDEDIR=${EPREFIX}/usr 622 EKDEDIR=${EPREFIX}/usr
780 kded4 2>&1 > /dev/null & 787 kded4 2>&1 > /dev/null &
781 kded4_pid=$! 788 kded4_pid=$!
782 fi 789 fi
783 790
784 cmake-utils_src_test 791 cmake-utils_src_test
785 } 792 }
786 793
787 # When run as normal user during ebuild development with the ebuild command, the 794 # When run as normal user during ebuild development with the ebuild command, the
788 # kde tests tend to access the session DBUS. This however is not possible in a real 795 # kde tests tend to access the session DBUS. This however is not possible in a real
789 # emerge or on the tinderbox. 796 # emerge or on the tinderbox.
790 # > make sure it does not happen, so bad tests can be recognized and disabled 797 # > make sure it does not happen, so bad tests can be recognized and disabled

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.148

  ViewVC Help
Powered by ViewVC 1.1.20