/[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.118 Revision 1.119
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.118 2012/06/07 22:06:04 zmedico Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.119 2012/06/22 09:19:46 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
17# @DESCRIPTION: 17# @DESCRIPTION:
18# If set to "none", do nothing. 18# If set to "none", do nothing.
19# For any other value, add selinux to IUSE, and depending on that useflag 19# For any other value, add selinux to IUSE, and depending on that useflag
20# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND 20# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND
21: ${KDE_SELINUX_MODULE:=none} 21: ${KDE_SELINUX_MODULE:=none}
22
23# @ECLASS-VARIABLE: VIRTUALDBUS_TEST
24# @DESCRIPTION:
25# If defined, launch and use a private dbus session during src_test.
22 26
23# @ECLASS-VARIABLE: VIRTUALX_REQUIRED 27# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
24# @DESCRIPTION: 28# @DESCRIPTION:
25# For proper description see virtualx.eclass manpage. 29# For proper description see virtualx.eclass manpage.
26# Here we redefine default value to be manual, if your package needs virtualx 30# Here we redefine default value to be manual, if your package needs virtualx
164# Setup packages inheriting this eclass 168# Setup packages inheriting this eclass
165case ${KDEBASE} in 169case ${KDEBASE} in
166 kde-base) 170 kde-base)
167 HOMEPAGE="http://www.kde.org/" 171 HOMEPAGE="http://www.kde.org/"
168 LICENSE="GPL-2" 172 LICENSE="GPL-2"
169 if [[ $BUILD_TYPE = live ]]; then 173 if [[ ${BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
170 # Disable tests for live ebuilds 174 # Disable tests for live ebuilds by default
171 RESTRICT+=" test" 175 RESTRICT+=" test"
172 fi 176 fi
173 177
174 # Only add the kdeprefix USE flag for older versions, to help 178 # Only add the kdeprefix USE flag for older versions, to help
175 # non-portage package managers handle the upgrade 179 # non-portage package managers handle the upgrade
444 case ${PV} in 448 case ${PV} in
445 4.4.11.1) 449 4.4.11.1)
446 # KDEPIM 4.4, special case 450 # KDEPIM 4.4, special case
447 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree 451 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree
448 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;; 452 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;;
449 4.[456789].8[05] | 4.[456789].9[0235678]) 453 4.[4567].8[05] | 4.[4567].9[0235678])
450 # Unstable KDE SC releases 454 # Unstable KDE SC releases
451 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 455 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
452 4.8.[12345]) 456 4.8.[12345])
453 # Stable KDE SC releases with .xz support 457 # Stable KDE SC releases with .xz support
454 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 458 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
459 4.[89].8[05] | 4.[89].9[0235678])
460 # Unstable KDE SC releases
461 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
455 *) 462 *)
456 # Stable KDE SC releases 463 # Stable KDE SC releases
457 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 464 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
458 esac 465 esac
459 ;; 466 ;;
799# @DESCRIPTION: 806# @DESCRIPTION:
800# Function for testing KDE4 applications. 807# Function for testing KDE4 applications.
801kde4-base_src_test() { 808kde4-base_src_test() {
802 debug-print-function ${FUNCNAME} "$@" 809 debug-print-function ${FUNCNAME} "$@"
803 810
811 local kded4_pid
812
813 _test_runner() {
814 if [[ -n "${VIRTUALDBUS_TEST}" ]]; then
815 export $(dbus-launch)
816 kded4 2>&1 > /dev/null &
817 kded4_pid=$!
818 fi
819
820 cmake-utils_src_test
821 }
822
823 # When run as normal user during ebuild development with the ebuild command, the
824 # kde tests tend to access the session DBUS. This however is not possible in a real
825 # emerge or on the tinderbox.
826 # > make sure it does not happen, so bad tests can be recognized and disabled
827 unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
828
804 # Override this value, set in kde4-base_src_configure() 829 # Override this value, set in kde4-base_src_configure()
805 mycmakeargs+=(-DKDE4_BUILD_TESTS=ON) 830 mycmakeargs+=(-DKDE4_BUILD_TESTS=ON)
806 cmake-utils_src_configure 831 cmake-utils_src_configure
807 kde4-base_src_compile 832 kde4-base_src_compile
808
809 # When run as normal user during ebuild development with the ebuild command, the
810 # kde tests tend to access the session DBUS. This however is not possible in a real
811 # emerge or on the tinderbox.
812 # > make sure it does not happen, so bad tests can be recognized and disabled
813 unset DBUS_SESSION_BUS_ADDRESS
814 833
815 if [[ ${VIRTUALX_REQUIRED} == always || ${VIRTUALX_REQUIRED} == test ]]; then 834 if [[ ${VIRTUALX_REQUIRED} == always || ${VIRTUALX_REQUIRED} == test ]]; then
816 # check for sanity if anyone already redefined VIRTUALX_COMMAND from the default 835 # check for sanity if anyone already redefined VIRTUALX_COMMAND from the default
817 if [[ ${VIRTUALX_COMMAND} != emake ]]; then 836 if [[ ${VIRTUALX_COMMAND} != emake ]]; then
818 # surprise- we are already INSIDE virtualmake!!! 837 # surprise- we are already INSIDE virtualmake!!!
819 debug-print "QA Notice: This version of kde4-base.eclass includes the virtualx functionality." 838 debug-print "QA Notice: This version of kde4-base.eclass includes the virtualx functionality."
820 debug-print " You may NOT set VIRTUALX_COMMAND or call virtualmake from the ebuild." 839 debug-print " You may NOT set VIRTUALX_COMMAND or call virtualmake from the ebuild."
821 debug-print " Setting VIRTUALX_REQUIRED is completely sufficient. See the" 840 debug-print " Setting VIRTUALX_REQUIRED is completely sufficient. See the"
822 debug-print " kde4-base.eclass docs for details... Applying workaround." 841 debug-print " kde4-base.eclass docs for details... Applying workaround."
823 cmake-utils_src_test 842 _test_runner
824 else 843 else
825 VIRTUALX_COMMAND="cmake-utils_src_test" virtualmake 844 VIRTUALX_COMMAND="_test_runner" virtualmake
826 fi 845 fi
827 else 846 else
828 cmake-utils_src_test 847 _test_runner
848 fi
849
850 if [ -n "${kded4_pid}" ] ; then
851 kill ${kded4_pid}
852 fi
853
854 if [ -n "${DBUS_SESSION_BUS_PID}" ] ; then
855 kill ${DBUS_SESSION_BUS_PID}
829 fi 856 fi
830} 857}
831 858
832# @FUNCTION: kde4-base_src_install 859# @FUNCTION: kde4-base_src_install
833# @DESCRIPTION: 860# @DESCRIPTION:

Legend:
Removed from v.1.118  
changed lines
  Added in v.1.119

  ViewVC Help
Powered by ViewVC 1.1.20