diff options
author | Luca Longinotti <chtekk@gentoo.org> | 2006-01-04 09:22:48 +0000 |
---|---|---|
committer | Luca Longinotti <chtekk@gentoo.org> | 2006-01-04 09:22:48 +0000 |
commit | 11b87d387d766fb4d09f9a332dc3894314e48416 (patch) | |
tree | a32b6da0e902669383df9ad5d9bb503f04fec3f6 /eclass/php4_4-sapi.eclass | |
parent | fix dev-lang/php + arm + firebird (diff) | |
download | gentoo-2-11b87d387d766fb4d09f9a332dc3894314e48416.tar.gz gentoo-2-11b87d387d766fb4d09f9a332dc3894314e48416.tar.bz2 gentoo-2-11b87d387d766fb4d09f9a332dc3894314e48416.zip |
Update the PHP packages, sync with overlay.
Diffstat (limited to 'eclass/php4_4-sapi.eclass')
-rw-r--r-- | eclass/php4_4-sapi.eclass | 172 |
1 files changed, 107 insertions, 65 deletions
diff --git a/eclass/php4_4-sapi.eclass b/eclass/php4_4-sapi.eclass index 43af7cd8b160..4330843bc44a 100644 --- a/eclass/php4_4-sapi.eclass +++ b/eclass/php4_4-sapi.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/php4_4-sapi.eclass,v 1.6 2005/11/03 23:33:53 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php4_4-sapi.eclass,v 1.7 2006/01/04 09:22:48 chtekk Exp $ # # ######################################################################## # @@ -39,7 +39,7 @@ if [ "${PHP_PACKAGE}" = 1 ]; then S="${WORKDIR}/${MY_PHP_P}" fi -IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk crypt ctype curl curlwrappers db2 dba dbase dbmaker dbx debug doc empress empress-bcs esoob exif fastbuild frontbase fdftk filepro firebird flatfile ftp gd gd-external gdbm gmp hardenedphp hyperwave-api iconv imap informix inifile interbase iodbc ipv6 java-internal java-external kerberos ldap libedit mcal mcve memlimit mhash ming mnogosearch msql mssql mysql ncurses nls oci8 oci8-instant-client odbc oracle7 overload ovrimos pcntl pcre pear pfpro pic posix postgres readline recode sapdb sasl session sharedext sharedmem snmp sockets solid spell sqlite ssl sybase sybase-ct sysvipc threads tiff tokenizer truetype wddx xml xml2 xmlrpc xpm xsl yaz zip zlib" +IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk crypt ctype curl db2 dba dbase dbmaker dbx debug doc empress empress-bcs esoob exif expat fastbuild frontbase fdftk filepro firebird flatfile ftp gd gd-external gdbm gmp hardenedphp hyperwave-api iconv imap informix inifile interbase iodbc ipv6 java-internal java-external kerberos ldap libedit mcal mcve memlimit mhash ming mnogosearch msql mssql mysql ncurses nls oci8 oci8-instant-client odbc oracle7 overload ovrimos pcntl pcre pear pfpro pic posix postgres readline recode sapdb session sharedext sharedmem snmp sockets solid spell sqlite ssl sybase sybase-ct sysvipc threads tiff tokenizer truetype wddx xml xmlrpc xpm xsl yaz zip zlib" # these USE flags should have the correct dependencies DEPEND="${DEPEND} @@ -79,10 +79,9 @@ DEPEND="${DEPEND} nls? ( sys-devel/gettext ) oci8-instant-client? ( dev-db/oracle-instantclient-basic ) odbc? ( >=dev-db/unixODBC-1.8.13 ) - postgres? ( >=dev-db/postgresql-7.1 ) + postgres? ( >=dev-db/libpq-7.1 ) readline? ( sys-libs/readline ) recode? ( app-text/recode ) - sasl? ( dev-libs/cyrus-sasl ) sharedmem? ( dev-libs/mm ) snmp? ( >=net-analyzer/net-snmp-5.2 ) spell? ( >=app-text/aspell-0.50 ) @@ -90,10 +89,8 @@ DEPEND="${DEPEND} sybase? ( dev-db/freetds ) tiff? ( media-libs/tiff ) truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 ) - wddx? ( dev-libs/expat ) - xpm? ( virtual/x11 ) - xml? ( dev-libs/expat ) - xml2? ( dev-libs/libxml2 xsl? ( dev-libs/libxslt ) ) + xpm? ( || ( virtual/x11 x11-libs/libXpm ) ) + xml? ( dev-libs/libxml2 xsl? ( dev-libs/libxslt ) ) xmlrpc? ( dev-libs/expat ) xsl? ( app-text/sablotron dev-libs/expat ) zlib? ( sys-libs/zlib ) @@ -129,17 +126,8 @@ PHP_INI_FILE="php.ini" # ======================================================================== # Hardened-PHP Support # ======================================================================== -# -# I've done it like this so that we can support different versions of -# the patch for different versions of PHP - -case "${PV}" in - 4.3.11) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.3.patch.gz" ;; - 4.4.0) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.3.patch.gz" ;; - 4.4.1) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.5.patch.gz" ;; -esac -[ -n "${HARDENEDPHP_PATCH}" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://www.hardened-php.net/${HARDENEDPHP_PATCH} )" +[ -n "${HARDENEDPHP_PATCH}" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )" # ======================================================================== @@ -175,10 +163,10 @@ php4_4-sapi_check_awkward_uses() { confutils_use_depend_any "dbx" "frontbase" "mssql" "odbc" "postgres" "sybase-ct" "oci8" "oci8-instant-client" # DOM XML support - confutils_use_depend_all "xml2" "zlib" + confutils_use_depend_all "xml" "zlib" # EXIF only gets built if we support a file format that uses it - confutils_use_depend_any "exif" "gd" "tiff" + confutils_use_depend_any "exif" "gd" "gd-external" "tiff" # support for the GD graphics library confutils_use_conflict "gd" "gd-external" @@ -203,10 +191,7 @@ php4_4-sapi_check_awkward_uses() { # Oracle support confutils_use_conflict "oci8" "oci8-instant-client" - php_check_oracle - - # LDAP-sasl support - confutils_use_depend_all "sasl" "ldap" + php_check_oracle_all # MCVE needs OpenSSL confutils_use_depend_all "mcve" "ssl" @@ -224,7 +209,7 @@ php4_4-sapi_check_awkward_uses() { confutils_use_depend_all "solid" "odbc" # PEAR support - confutils_use_depend_all "pear" "cli" "pcre" "xml" "zlib" + confutils_use_depend_all "pear" "cli" "pcre" "expat" "zlib" # Readline and libedit do the same thing; you can't have both confutils_use_conflict "readline" "libedit" @@ -256,11 +241,25 @@ php4_4-sapi_src_unpack() { cd "${S}" + # lib64 support + if [ -n "${LIB64_PATCH}" ] ; then + epatch "${FILESDIR}/${LIB64_PATCH}" + else + ewarn "There is no lib64 patch available for this PHP release yet!" + fi + # Patch PHP to show Gentoo as the server platform - sed -e "s/PHP_UNAME=\`uname -a | xargs\`/PHP_UNAME=\`uname -s -n -r -v | xargs\`/g" -i configure.in + sed -e "s/PHP_UNAME=\`uname -a | xargs\`/PHP_UNAME=\`uname -s -n -r -v | xargs\`/g" -i configure.in || die "Failed to fix server platform name" + + # Patch PHP to support heimdal instead of mit-krb5 + if has_version "app-crypt/heimdal" ; then + sed -e "s|gssapi_krb5|gssapi|g" -i acinclude.m4 || die "Failed to fix heimdal libname" + fi # Patch for PostgreSQL support - use postgres && sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 + if use postgres ; then + sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 || die "Failed to fix PostgreSQL include paths" + fi # stop php from activating the apache config, as we will do that ourselves for i in configure sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 ; do @@ -300,13 +299,13 @@ php4_4-sapi_src_unpack() { # rebuild configure to make sure it's up to date einfo "Rebuilding configure script" - WANT_AUTOCONF=2.5 autoreconf --force -W no-cross || die "Unable to regenerate configure script" + WANT_AUTOCONF=2.5 autoreconf --force -W no-cross || die "Unable to regenerate configure script successfully" # run elibtoolize elibtoolize # Just in case ;-) - chmod 755 configure + chmod 755 configure || die "Failed to chmod configure to 755" } set_php_ini_dir() { @@ -330,9 +329,8 @@ php4_4-sapi_src_compile() { enable_extension_enable "calendar" "calendar" 1 enable_extension_disable "ctype" "ctype" 0 enable_extension_with "curl" "curl" 1 - enable_extension_with "curlwrappers" "curlwrappers" 1 enable_extension_enable "dbase" "dbase" 1 - enable_extension_with "dom" "xml2" 0 + enable_extension_with "dom" "xml" 0 enable_extension_enable "exif" "exif" 1 enable_extension_with "fbsql" "frontbase" 1 enable_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0" @@ -381,7 +379,7 @@ php4_4-sapi_src_compile() { enable_extension_enable "sysvshm" "sysvipc" 1 enable_extension_disable "tokenizer" "tokenizer" 1 enable_extension_enable "wddx" "wddx" 1 - enable_extension_disable "xml" "xml" 0 + enable_extension_disable "xml" "expat" 0 enable_extension_with "xmlrpc" "xmlrpc" 1 enable_extension_with "zlib" "zlib" 1 enable_extension_enable "debug" "debug" 0 @@ -441,7 +439,6 @@ php4_4-sapi_src_compile() { # LDAP support if useq ldap ; then enable_extension_with "ldap" "ldap" 1 - enable_extension_with "ldap-sasl" "sasl" 0 fi # MySQL support @@ -481,7 +478,7 @@ php4_4-sapi_src_compile() { # Sablotron/XSLT support enable_extension_enable "xslt" "xsl" 1 enable_extension_with "xslt-sablot" "xsl" 1 - if useq xml2 ; then + if useq xml ; then enable_extension_with "dom-xslt" "xsl" 0 "/usr" enable_extension_with "dom-exslt" "xsl" 0 "/usr" fi @@ -587,51 +584,83 @@ php4_4-sapi_install_ini() { } php4_4-sapi_pkg_postinst() { + # Update Apache1 to use mod_php + if useq apache ; then + "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1 + exitStatus=$? + if [[ ${exitStatus} == 5 ]] ; then + php-select apache1 php4 + elif [[ ${exitStatus} == 4 ]] ; then + ewarn + ewarn "Apache 1 is configured to load a different version of PHP." + ewarn "To make Apache 1 use PHP v4, use php-select:" + ewarn + ewarn " php-select apache1 php4" + ewarn + fi + fi + + # Update Apache2 to use mod_php + if useq apache2 ; then + "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1 + exitStatus=$? + if [[ ${exitStatus} == 5 ]] ; then + php-select apache2 php4 + elif [[ ${exitStatus} == 4 ]] ; then + ewarn + ewarn "Apache 2 is configured to load a different version of PHP." + ewarn "To make Apache 2 use PHP v4, use php-select:" + ewarn + ewarn " php-select apache2 php4" + ewarn + fi + fi + # Create the symlinks for php-cli if useq cli ; then - if test -h "/usr/bin/php"; then - ewarn "/usr/bin/php is a symlink." - ewarn "The PHP packages will not update that symlink," - ewarn "please check it and do so yourself if you need" - ewarn "to, using eselect." - ewarn "For example with the command:" - ewarn "eselect php set php4" - ewarn "to symlink to /usr/lib/php4/bin/php." + "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1 + exitStatus=$? + if [[ ${exitStatus} == 5 ]] ; then + php-select php php4 + elif [[ ${exitStatus} == 4 ]] ; then + ewarn + ewarn "/usr/bin/php links to a different version of PHP." + ewarn "To make /usr/bin/php point to PHP v4, use php-select:" + ewarn + ewarn " php-select php php4" ewarn - else - eselect php set php4 fi fi # Create the symlinks for php-cgi if useq cgi ; then - if test -h "/usr/bin/php-cgi"; then - ewarn "/usr/bin/php-cgi is a symlink." - ewarn "The PHP packages will not update that symlink," - ewarn "please check it and do so yourself if you need" - ewarn "to, using eselect." - ewarn "For example with the command:" - ewarn "eselect php-cgi set php4" - ewarn "to symlink to /usr/lib/php4/bin/php-cgi." + "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1 + exitStatus=$? + if [[ ${exitStatus} == 5 ]] ; then + php-select php-cgi php4 + elif [[ ${exitStatus} == 4 ]] ; then + ewarn + ewarn "/usr/bin/php-cgi links to a different version of PHP." + ewarn "To make /usr/bin/php-cgi point to PHP v4, use php-select:" + ewarn + ewarn " php-select php-cgi php4" ewarn - else - eselect php-cgi set php4 fi fi # Create the symlinks for php-devel - if test -h "/usr/bin/phpize" || test -h "/usr/bin/php-config" ; then - ewarn "/usr/bin/phpize and/or /usr/bin/php-config are symlinks." - ewarn "The PHP packages will not update these symlinks," - ewarn "please check them and do so yourself if you need" - ewarn "to, using eselect." - ewarn "For example with the command:" - ewarn "eselect php-devel set php4" - ewarn "to symlink to /usr/lib/php4/bin/phpize and" - ewarn "/usr/lib/php4/bin/php-config." + "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1 + exitStatus=$? + if [[ $exitStatus == 5 ]] ; then + php-select php-devel php4 + elif [[ $exitStatus == 4 ]] ; then + ewarn + ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a" + ewarn "different version of PHP. To make them point to PHP v4, use" + ewarn "php-select:" + ewarn + ewarn " php-select php-devel php4" ewarn - else - eselect php-devel set php4 fi ewarn "If you have additional third party PHP extensions (such as" @@ -640,6 +669,13 @@ php4_4-sapi_pkg_postinst() { ewarn "with the newer PHP packages releases, so please reemerge any" ewarn "PHP extensions you have installed to automatically adapt to" ewarn "the new configuration layout." + if useq sharedext ; then + ewarn "The core PHP extensions are now loaded through external" + ewarn ".ini files, not anymore using a 'extension=name.so' line" + ewarn "in the php.ini file. Portage will take care of this by" + ewarn "creating new, updated config-files, please make sure to" + ewarn "install those using etc-update or dispatch-conf." + fi ewarn if useq curl; then @@ -655,4 +691,10 @@ php4_4-sapi_pkg_postinst() { ewarn "configurations where you disabled TEXTRELs, for example using" ewarn "PaX in the kernel." ewarn + + ewarn "The 'xml' and 'xml2' USE flags were unified in only the 'xml' USE" + ewarn "flag. To get the features that were once controlled by the 'xml2'" + ewarn "USE flag, turn the 'xml' USE flag on. To get the features that were" + ewarn "once controlled by the 'xml' USE flag, turn the 'expat' USE flag on." + ewarn } |