/[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.132 Revision 1.143
1# Copyright 1999-2014 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.132 2014/01/18 00:43:03 dilfridge Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.143 2014/11/13 04:19:51 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
80 if [[ ${KDE_BUILD_TYPE} = live ]]; then 80 if [[ ${KDE_BUILD_TYPE} = live ]]; then
81 # @ECLASS-VARIABLE: KDEVELOP_VERSION 81 # @ECLASS-VARIABLE: KDEVELOP_VERSION
82 # @DESCRIPTION: 82 # @DESCRIPTION:
83 # 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.
84 # Applies to KDEBASE=kdevelop only. 84 # Applies to KDEBASE=kdevelop only.
85 KDEVELOP_VERSION="${KDEVELOP_VERSION:-9999}" 85 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.9999}"
86 # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION 86 # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION
87 # @DESCRIPTION: 87 # @DESCRIPTION:
88 # 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.
89 # Applies to KDEBASE=kdevelop only. 89 # Applies to KDEBASE=kdevelop only.
90 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-9999}" 90 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-4.9999}"
91 else 91 else
92 case ${PN} in 92 case ${PN} in
93 kdevelop|quanta) 93 kdevelop)
94 KDEVELOP_VERSION=${PV} 94 KDEVELOP_VERSION=${PV}
95 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)" 95 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)"
96 ;; 96 ;;
97 kdevplatform|kdevelop-php*|kdevelop-python) 97 kdevplatform|kdevelop-php*|kdevelop-python)
98 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)" 98 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)"
198esac 198esac
199 199
200# @ECLASS-VARIABLE: QT_MINIMAL 200# @ECLASS-VARIABLE: QT_MINIMAL
201# @DESCRIPTION: 201# @DESCRIPTION:
202# Determine version of qt we enforce as minimal for the package. 202# Determine version of qt we enforce as minimal for the package.
203QT_MINIMAL="${QT_MINIMAL:-4.8.0}" 203QT_MINIMAL="${QT_MINIMAL:-4.8.5}"
204 204
205# Declarative dependencies 205# Declarative dependencies
206qtdeclarativedepend=" 206qtdeclarativedepend="
207 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4 207 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4
208" 208"
286kdecommondepend=" 286kdecommondepend="
287 dev-lang/perl 287 dev-lang/perl
288 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility] 288 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
289 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl] 289 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl]
290 >=dev-qt/qtdbus-${QT_MINIMAL}:4 290 >=dev-qt/qtdbus-${QT_MINIMAL}:4
291 || ( 291 >=dev-qt/designer-${QT_MINIMAL}:4[-phonon]
292 ( >=dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)] dev-qt/designer:4[-phonon] )
293 <dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)] 292 >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus(+)]
294 )
295 >=dev-qt/qtscript-${QT_MINIMAL}:4 293 >=dev-qt/qtscript-${QT_MINIMAL}:4
296 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support] 294 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
297 >=dev-qt/qtsvg-${QT_MINIMAL}:4 295 >=dev-qt/qtsvg-${QT_MINIMAL}:4
298 >=dev-qt/qttest-${QT_MINIMAL}:4 296 >=dev-qt/qttest-${QT_MINIMAL}:4
299 >=dev-qt/qtwebkit-${QT_MINIMAL}:4 297 >=dev-qt/qtwebkit-${QT_MINIMAL}:4
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
439 # Unstable KDE SC releases 437 # Unstable KDE SC releases
440 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 438 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
441 4.[1-7].[12345]) 439 4.[1-7].[12345])
442 # Stable KDE SC with old .bz2 support 440 # Stable KDE SC with old .bz2 support
443 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 441 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
442 4.11.9)
443 # Part of 4.12 actually, sigh. Not stable for next release!
444 SRC_URI="mirror://kde/stable/4.12.5/src/${_kmname_pv}.tar.xz" ;;
445 4.11.11)
446 # Part of 4.13 actually, sigh. Not stable for next release!
447 SRC_URI="mirror://kde/stable/4.13.3/src/${_kmname_pv}.tar.xz" ;;
448 4.11.12)
449 # Part of 4.14 actually, sigh. Not stable for next release!
450 SRC_URI="mirror://kde/stable/4.14.1/src/${_kmname_pv}.tar.xz" ;;
451 4.11.13)
452 # Part of 4.14 actually, sigh. Not stable for next release!
453 SRC_URI="mirror://kde/stable/4.14.2/src/${_kmname_pv}.tar.xz" ;;
454 4.11.14)
455 # Part of 4.14 actually, sigh. Not stable for next release!
456 SRC_URI="mirror://kde/stable/4.14.3/src/${_kmname_pv}.tar.xz" ;;
444 *) 457 *)
445 # Stable KDE SC releases 458 # Stable KDE SC releases
446 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 459 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
447 esac 460 esac
448 ;; 461 ;;
462 case ${KDE_SCM} in 475 case ${KDE_SCM} in
463 svn) 476 svn)
464 # Determine branch URL based on live type 477 # Determine branch URL based on live type
465 local branch_prefix 478 local branch_prefix
466 case ${PV} in 479 case ${PV} in
467 9999*) 480 4.9999*)
468 # trunk 481 # trunk
469 branch_prefix="trunk/KDE" 482 branch_prefix="trunk/KDE"
470 ;; 483 ;;
471 *) 484 *)
472 # branch 485 # branch
549 else 562 else
550 _kmname=${PN} 563 _kmname=${PN}
551 fi 564 fi
552 565
553 # default branching 566 # default branching
554 [[ ${PV} != 9999* && ${KDEBASE} == kde-base ]] && \ 567 [[ ${PV} != 4.9999* && ${KDEBASE} == kde-base ]] && \
555 EGIT_BRANCH="KDE/$(get_kde_version)" 568 EGIT_BRANCH="KDE/$(get_kde_version)"
556
557 # kde-workspace master needs Qt5/kf5
558 [[ ${PV} == 9999 && ${_kmname} == kde-workspace ]] && \
559 EGIT_BRANCH="KDE/4.11"
560 569
561 # default repo uri 570 # default repo uri
562 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" ) 571 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" )
563 572
564 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}" 573 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}"
595 unset KDEHOME 604 unset KDEHOME
596 605
597 # Check if gcc compiler is fresh enough. 606 # Check if gcc compiler is fresh enough.
598 # In theory should be in pkg_pretend but we check it only for kdelibs there 607 # In theory should be in pkg_pretend but we check it only for kdelibs there
599 # and for others we do just quick scan in pkg_setup because pkg_pretend 608 # and for others we do just quick scan in pkg_setup because pkg_pretend
600 # executions consume quite some time. 609 # executions consume quite some time (ie. when merging 300 packages at once will cause 300 checks)
601 if [[ ${MERGE_TYPE} != binary ]]; then 610 if [[ ${MERGE_TYPE} != binary ]]; then
602 [[ $(gcc-major-version) -lt 4 ]] || \ 611 [[ $(gcc-major-version) -lt 4 ]] || \
603 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \ 612 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 6 ]] ) \
604 && die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)." 613 && die "Sorry, but gcc-4.6 and earlier wont work for some KDE packages."
605 fi 614 fi
606 615
607 KDEDIR=/usr 616 KDEDIR=/usr
608 : ${PREFIX:=/usr} 617 : ${PREFIX:=/usr}
609 EKDEDIR=${EPREFIX}/usr 618 EKDEDIR=${EPREFIX}/usr
774 kded4 2>&1 > /dev/null & 783 kded4 2>&1 > /dev/null &
775 kded4_pid=$! 784 kded4_pid=$!
776 fi 785 fi
777 786
778 cmake-utils_src_test 787 cmake-utils_src_test
779 } 788 }
780 789
781 # When run as normal user during ebuild development with the ebuild command, the 790 # When run as normal user during ebuild development with the ebuild command, the
782 # kde tests tend to access the session DBUS. This however is not possible in a real 791 # kde tests tend to access the session DBUS. This however is not possible in a real
783 # emerge or on the tinderbox. 792 # emerge or on the tinderbox.
784 # > make sure it does not happen, so bad tests can be recognized and disabled 793 # > make sure it does not happen, so bad tests can be recognized and disabled

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.143

  ViewVC Help
Powered by ViewVC 1.1.20