/[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.79 Revision 1.86
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-base.eclass,v 1.79 2010/12/06 10:17:04 tampakrap Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.86 2011/04/06 08:53:48 dilfridge 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
13# NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but 13# NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but
14# eclass will fail with version older than 2. 14# eclass will fail with version older than 2.
15 15
16# @ECLASS-VARIABLE: VIRTUALX_REQUIRED 16# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
17# @DESCRIPTION: 17# @DESCRIPTION:
18# Do we need an X server? Valid values are "always", "optional", and "manual". 18# For proper description see virtualx.eclass manpage.
19# "tests" is a synonym for "optional". While virtualx.eclass supports in principle 19# Here we redefine default value to be manual, if your package needs virtualx
20# also the use of an X server during other ebuild phases, we only use it in 20# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
21# src_test here. Most likely you'll want to set "optional", which introduces the
22# use-flag "test" (if not already present), adds dependencies conditional on that
23# use-flag, and automatically runs (only) the ebuild test phase with a virtual X server
24# present. This makes things a lot more comfortable than the bare virtualx eclass.
25
26# In case the variable is not set in the ebuild, let virtualx eclass not do anything
27: ${VIRTUALX_REQUIRED:=manual} 21: ${VIRTUALX_REQUIRED:=manual}
28 22
29inherit kde4-functions base virtualx eutils 23inherit kde4-functions base virtualx eutils
30 24
31get_build_type 25get_build_type
371fi 365fi
372kdedepend=" 366kdedepend="
373 dev-util/automoc 367 dev-util/automoc
374 dev-util/pkgconfig 368 dev-util/pkgconfig
375 !aqua? ( 369 !aqua? (
376 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 ) 370 >=x11-libs/libXtst-1.1.0
377 x11-proto/xf86vidmodeproto 371 x11-proto/xf86vidmodeproto
378 ) 372 )
379" 373"
380kderdepend="" 374kderdepend=""
375
376if [[ ${PN} != oxygen-icons ]]; then
377 kderdepend+=" $(add_kdebase_dep oxygen-icons)"
378fi
381 379
382kdehandbookdepend=" 380kdehandbookdepend="
383 app-text/docbook-xml-dtd:4.2 381 app-text/docbook-xml-dtd:4.2
384 app-text/docbook-xsl-stylesheets 382 app-text/docbook-xsl-stylesheets
385" 383"
531 fi 529 fi
532 _kmname_pv="${_kmname}-${PV}" 530 _kmname_pv="${_kmname}-${PV}"
533 case ${KDEBASE} in 531 case ${KDEBASE} in
534 kde-base) 532 kde-base)
535 case ${PV} in 533 case ${PV} in
534 4.5.93)
535 # Only kdepim and kdepim-runtime 4.6beta here
536 SRC_URI="mirror://kde/unstable/kdepim/${PV}/${_kmname}-4.6beta3.tar.bz2"
537 ;;
536 4.[456].8[05] | 4.[456].9[023568]) 538 4.[456].8[05] | 4.[456].9[023568])
537 # Unstable KDE SC releases 539 # Unstable KDE SC releases
538 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" 540 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2"
539 ;; 541 ;;
540 4.4.6 | 4.4.7 | 4.4.8) 542 4.4.6 | 4.4.7 | 4.4.8 | 4.4.9 | 4.4.10)
541 # Only kdepim here 543 # Only kdepim here
542 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" 544 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2"
543 ;; 545 ;;
544 *) 546 *)
545 # Stable KDE SC releases 547 # Stable KDE SC releases
687 689
688 # Enable/disable handbooks for kde4-base packages 690 # Enable/disable handbooks for kde4-base packages
689 # kde-l10n inherits kde4-base but is metpackage, so no check for doc 691 # kde-l10n inherits kde4-base but is metpackage, so no check for doc
690 # kdelibs inherits kde4-base but handle installing the handbook itself 692 # kdelibs inherits kde4-base but handle installing the handbook itself
691 if ! has kde4-meta ${INHERITED}; then 693 if ! has kde4-meta ${INHERITED}; then
692 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas 694 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdepim-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas
693 fi 695 fi
694 696
695 # SCM bootstrap 697 # SCM bootstrap
696 if [[ ${BUILD_TYPE} = live ]]; then 698 if [[ ${BUILD_TYPE} = live ]]; then
697 if has subversion ${INHERITED}; then 699 if has subversion ${INHERITED}; then
830 # Override this value, set in kde4-base_src_configure() 832 # Override this value, set in kde4-base_src_configure()
831 mycmakeargs+=(-DKDE4_BUILD_TESTS=ON) 833 mycmakeargs+=(-DKDE4_BUILD_TESTS=ON)
832 cmake-utils_src_configure 834 cmake-utils_src_configure
833 kde4-base_src_compile 835 kde4-base_src_compile
834 836
835 if [[ ${VIRTUALX_REQUIRED} == always ]] || 837 # When run as normal user during ebuild development with the ebuild command, the
836 ( [[ ${VIRTUALX_REQUIRED} != manual ]] && use test ); then 838 # kde tests tend to access the session DBUS. This however is not possible in a real
839 # emerge or on the tinderbox.
840 # > make sure it does not happen, so bad tests can be recognized and disabled
841 unset DBUS_SESSION_BUS_ADDRESS
837 842
838 if [[ ${maketype} ]]; then 843 if [[ ${VIRTUALX_REQUIRED} == always || ${VIRTUALX_REQUIRED} == test ]]; then
844 # check for sanity if anyone already redefined VIRTUALX_COMMAND from the default
845 if [[ ${VIRTUALX_COMMAND} != "emake" ]]; then
839 # surprise- we are already INSIDE virtualmake!!! 846 # surprise- we are already INSIDE virtualmake!!!
840 ewarn "QA Notice: This version of kde4-base.eclass includes the virtualx functionality." 847 debug-print "QA Notice: This version of kde4-base.eclass includes the virtualx functionality."
841 ewarn " You may NOT set maketype or call virtualmake from the ebuild. Applying workaround." 848 debug-print " You may NOT set VIRTUALX_COMMAND or call virtualmake from the ebuild."
849 debug-print " Setting VIRTUALX_REQUIRED is completely sufficient. See the"
850 debug-print " kde4-base.eclass docs for details... Applying workaround."
842 cmake-utils_src_test 851 cmake-utils_src_test
843 else 852 else
844 export maketype="cmake-utils_src_test" 853 VIRTUALX_COMMAND="cmake-utils_src_test" virtualmake
845 virtualmake
846 fi 854 fi
847 else 855 else
848 cmake-utils_src_test 856 cmake-utils_src_test
849 fi 857 fi
850} 858}

Legend:
Removed from v.1.79  
changed lines
  Added in v.1.86

  ViewVC Help
Powered by ViewVC 1.1.20