diff options
author | Luca Longinotti <chtekk@gentoo.org> | 2006-04-20 12:15:35 +0000 |
---|---|---|
committer | Luca Longinotti <chtekk@gentoo.org> | 2006-04-20 12:15:35 +0000 |
commit | e4e919e015ecc3308b17e0cc1133d8ca64b41a29 (patch) | |
tree | e7700ab27fb8053f20079159b42a9fbbc7105b45 /eclass | |
parent | Moved setup code to pkg_setup, hopefully fixing bug #130553. (diff) | |
download | gentoo-2-e4e919e015ecc3308b17e0cc1133d8ca64b41a29.tar.gz gentoo-2-e4e919e015ecc3308b17e0cc1133d8ca64b41a29.tar.bz2 gentoo-2-e4e919e015ecc3308b17e0cc1133d8ca64b41a29.zip |
Don't die on USE=-*, eclass part.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/depend.php.eclass | 26 | ||||
-rw-r--r-- | eclass/php4_4-sapi.eclass | 6 | ||||
-rw-r--r-- | eclass/php5_0-sapi.eclass | 6 | ||||
-rw-r--r-- | eclass/php5_1-sapi.eclass | 6 | ||||
-rw-r--r-- | eclass/phpconfutils.eclass | 9 |
5 files changed, 25 insertions, 28 deletions
diff --git a/eclass/depend.php.eclass b/eclass/depend.php.eclass index 1a8619132229..1995fc289d93 100644 --- a/eclass/depend.php.eclass +++ b/eclass/depend.php.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.12 2006/03/24 23:05:47 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.13 2006/04/20 12:15:35 chtekk Exp $ # # ======================================================================== # @@ -162,7 +162,7 @@ require_php_sapi_from() { einfo "Checking for compatible SAPI(s)" for x in $@ ; do - if built_with_use =${PHP_PKG} ${x} ; then + if built_with_use =${PHP_PKG} ${x} || phpconfutils_built_with_use =${PHP_PKG} ${x} ; then einfo " Discovered compatible SAPI ${x}" has_sapi="1" fi @@ -266,7 +266,7 @@ require_php_with_any_use() { has_zts() { has_php - if built_with_use =${PHP_PKG} apache2 threads ; then + if built_with_use =${PHP_PKG} apache2 threads || phpconfutils_built_with_use =${PHP_PKG} apache2 threads ; then return 0 fi @@ -278,7 +278,7 @@ has_zts() { has_hardenedphp() { has_php - if built_with_use =${PHP_PKG} hardenedphp ; then + if built_with_use =${PHP_PKG} hardenedphp || phpconfutils_built_with_use =${PHP_PKG} hardenedphp ; then return 0 fi @@ -290,7 +290,7 @@ has_hardenedphp() { has_debug() { has_php - if built_with_use =${PHP_PKG} debug ; then + if built_with_use =${PHP_PKG} debug || phpconfutils_built_with_use =${PHP_PKG} debug ; then return 0 fi @@ -323,12 +323,12 @@ require_pdo() { fi # Was PHP5 compiled with internal PDO support? - if built_with_use =${PHP_PKG} pdo ; then + if built_with_use =${PHP_PKG} pdo || phpconfutils_built_with_use =${PHP_PKG} pdo ; then return fi # Ok, maybe PDO was built as an external extension? - if built_with_use =${PHP_PKG} pdo-external && has_version 'dev-php5/pecl-pdo' ; then + if ( built_with_use =${PHP_PKG} pdo-external || phpconfutils_built_with_use =${PHP_PKG} pdo-external ) && has_version 'dev-php5/pecl-pdo' ; then return fi @@ -368,7 +368,7 @@ require_php_cli() { if has_version '=dev-lang/php-4*' ; then PHP_PACKAGE_FOUND="1" pkg="`best_version '=dev-lang/php-4*'`" - if built_with_use =${pkg} cli ; then + if built_with_use =${pkg} cli || phpconfutils_built_with_use =${pkg} cli ; then PHP_VERSION="4" fi fi @@ -376,7 +376,7 @@ require_php_cli() { if has_version '=dev-lang/php-5*' ; then PHP_PACKAGE_FOUND="1" pkg="`best_version '=dev-lang/php-5*'`" - if built_with_use =${pkg} cli ; then + if built_with_use =${pkg} cli || phpconfutils_built_with_use =${pkg} cli ; then PHP_VERSION="5" fi fi @@ -411,7 +411,7 @@ require_php_cgi() { if has_version '=dev-lang/php-4*' ; then PHP_PACKAGE_FOUND="1" pkg="`best_version '=dev-lang/php-4*'`" - if built_with_use =${pkg} cgi ; then + if built_with_use =${pkg} cgi || phpconfutils_built_with_use =${pkg} cgi ; then PHP_VERSION="4" fi fi @@ -419,7 +419,7 @@ require_php_cgi() { if has_version '=dev-lang/php-5*' ; then PHP_PACKAGE_FOUND="1" pkg="`best_version '=dev-lang/php-5*'`" - if built_with_use =${pkg} cgi ; then + if built_with_use =${pkg} cgi || phpconfutils_built_with_use =${pkg} cgi ; then PHP_VERSION="5" fi fi @@ -507,7 +507,7 @@ php_binary_extension() { # API version, so they can't be installed when USE flags # are enabled wich change the PHP API version - if built_with_use =${PHP_PKG} hardenedphp ; then + if built_with_use =${PHP_PKG} hardenedphp || phpconfutils_built_with_use =${PHP_PKG} hardenedphp ; then eerror eerror "You cannot install binary PHP extensions" eerror "when the 'hardenedphp' USE flag is enabled!" @@ -517,7 +517,7 @@ php_binary_extension() { PUSE_ENABLED="1" fi - if built_with_use =${PHP_PKG} debug ; then + if built_with_use =${PHP_PKG} debug || phpconfutils_built_with_use =${PHP_PKG} debug ; then eerror eerror "You cannot install binary PHP extensions" eerror "when the 'debug' USE flag is enabled!" diff --git a/eclass/php4_4-sapi.eclass b/eclass/php4_4-sapi.eclass index d64dc0e4198a..8bf2dd9b98b9 100644 --- a/eclass/php4_4-sapi.eclass +++ b/eclass/php4_4-sapi.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/php4_4-sapi.eclass,v 1.17 2006/04/18 22:29:31 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php4_4-sapi.eclass,v 1.18 2006/04/20 12:15:35 chtekk Exp $ # # ######################################################################## # @@ -145,8 +145,6 @@ EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst # ======================================================================== php4_4-sapi_check_use_flags() { - PHPCONFUTILS_AUTO_USE="" - # Multiple USE dependencies phpconfutils_use_depend_any "truetype" "gd" "gd" "gd-external" phpconfutils_use_depend_any "cjk" "gd" "gd" "gd-external" @@ -603,7 +601,7 @@ php4_4-sapi_pkg_postinst() { fi # Create the symlinks for php-cli - if useq cli ; then + if useq cli || phpconfutils_usecheck cli ; then "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1 exitStatus=$? if [[ ${exitStatus} == 5 ]] ; then diff --git a/eclass/php5_0-sapi.eclass b/eclass/php5_0-sapi.eclass index b83f1534dec6..a43084524f3c 100644 --- a/eclass/php5_0-sapi.eclass +++ b/eclass/php5_0-sapi.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v 1.19 2006/04/18 22:29:31 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v 1.20 2006/04/20 12:15:35 chtekk Exp $ # # ######################################################################## # @@ -148,8 +148,6 @@ EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst # ======================================================================== php5_0-sapi_check_use_flags() { - PHPCONFUTILS_AUTO_USE="" - # Multiple USE dependencies phpconfutils_use_depend_any "truetype" "gd" "gd" "gd-external" phpconfutils_use_depend_any "cjk" "gd" "gd" "gd-external" @@ -597,7 +595,7 @@ php5_0-sapi_pkg_postinst() { fi # Create the symlinks for php-cli - if useq cli ; then + if useq cli || phpconfutils_usecheck cli ; then "${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 exitStatus=$? if [[ ${exitStatus} == 5 ]] ; then diff --git a/eclass/php5_1-sapi.eclass b/eclass/php5_1-sapi.eclass index 7b6281f1b9f7..2faadf292e4e 100644 --- a/eclass/php5_1-sapi.eclass +++ b/eclass/php5_1-sapi.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/php5_1-sapi.eclass,v 1.22 2006/04/18 22:29:31 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php5_1-sapi.eclass,v 1.23 2006/04/20 12:15:35 chtekk Exp $ # # ######################################################################## # @@ -150,8 +150,6 @@ EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst # ======================================================================== php5_1-sapi_check_use_flags() { - PHPCONFUTILS_AUTO_USE="" - # Multiple USE dependencies phpconfutils_use_depend_any "truetype" "gd" "gd" "gd-external" phpconfutils_use_depend_any "cjk" "gd" "gd" "gd-external" @@ -649,7 +647,7 @@ php5_1-sapi_pkg_postinst() { fi # Create the symlinks for php-cli - if useq cli ; then + if useq cli || phpconfutils_usecheck cli ; then "${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 exitStatus=$? if [[ ${exitStatus} == 5 ]] ; then diff --git a/eclass/phpconfutils.eclass b/eclass/phpconfutils.eclass index 3a22b48b0236..a1e9d8997714 100644 --- a/eclass/phpconfutils.eclass +++ b/eclass/phpconfutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/phpconfutils.eclass,v 1.2 2006/04/18 12:21:14 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/phpconfutils.eclass,v 1.3 2006/04/20 12:15:35 chtekk Exp $ # # ######################################################################## # @@ -93,6 +93,7 @@ phpconfutils_require_any() { shift local required_flags="$@" + local default_flag="$1" local success="0" while [[ -n "$1" ]] ; do @@ -112,13 +113,15 @@ phpconfutils_require_any() { # If we get here, then none of the required USE flags were enabled eerror - eerror "You *must* enable one or more of the following USE flags:" + eerror "You should enable one or more of the following USE flags:" eerror " ${required_flags}" eerror eerror "You can do this by enabling these flags in /etc/portage/package.use:" eerror " =${CATEGORY}/${PN}-${PVR} ${required_flags}" eerror - die "Missing USE flags found" + eerror "The ${default_flag} USE flag was automatically enabled now." + eerror + PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE} ${default_flag}" } # ======================================================================== |