diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2005-09-18 12:57:22 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2005-09-18 12:57:22 +0000 |
commit | f279812a4441cf19ec5b2b0dd799367945bc0bd4 (patch) | |
tree | 4e932bc71b7e35e43b6fd21730bdb192f9316257 | |
parent | Amule uses external crypto++ now (diff) | |
download | gentoo-2-f279812a4441cf19ec5b2b0dd799367945bc0bd4.tar.gz gentoo-2-f279812a4441cf19ec5b2b0dd799367945bc0bd4.tar.bz2 gentoo-2-f279812a4441cf19ec5b2b0dd799367945bc0bd4.zip |
php update
-rw-r--r-- | eclass/php-common-r1.eclass | 30 | ||||
-rw-r--r-- | eclass/php4_4-sapi.eclass | 79 | ||||
-rw-r--r-- | eclass/php5_0-sapi.eclass | 68 | ||||
-rw-r--r-- | eclass/php5_1-sapi.eclass | 69 | ||||
-rw-r--r-- | profiles/use.local.desc | 3 |
5 files changed, 112 insertions, 137 deletions
diff --git a/eclass/php-common-r1.eclass b/eclass/php-common-r1.eclass index ddc67edc1972..44feb4f5ef5d 100644 --- a/eclass/php-common-r1.eclass +++ b/eclass/php-common-r1.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/php-common-r1.eclass,v 1.1 2005/09/04 10:54:53 stuart Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.2 2005/09/18 12:57:22 hollow Exp $ # ######################################################################## # @@ -63,21 +63,9 @@ php_check_imap() { # there is now the PHP-Java-Bridge that works under both PHP4 and PHP5. # ######################################################################## -php_uses_java() { - if ! useq java ; then - return 1 - fi - - if useq alpha || useq amd64 ; then - return 1 - fi - - return 0 -} - php_check_java() { - if ! php_uses_java ; then - return + if ! useq java-internal ; then + return 1 fi JDKHOME="`java-config --jdk-home`" @@ -89,7 +77,6 @@ php_check_java() { # stuart@gentoo.org - 2003/05/18 # Kaffe JVM is not a drop-in replacement for the Sun JDK at this time - if echo ${JDKHOME} | grep kaffe > /dev/null 2>&1 ; then eerror eerror "PHP will not build using the Kaffe Java Virtual Machine." @@ -97,16 +84,15 @@ php_check_java() { eerror eerror "To build PHP without Java support, please re-run this emerge" eerror "and place the line:" - eerror " USE='-java'" + eerror " USE='-java-internal'" eerror "in front of your emerge command; e.g." - eerror " USE='-java' emerge mod_php" + eerror " USE='-java-internal' emerge =dev-lang/php-4*" eerror eerror "or edit your USE flags in /etc/make.conf" die "Kaffe JVM not supported" fi - JDKVER=$(java-config --java-version 2>&1 | awk '/^java version/ { print $3 -}' | xargs ) + JDKVER=$(java-config --java-version 2>&1 | awk '/^java version/ { print $3 }' | xargs ) einfo "Active JDK version: ${JDKVER}" case ${JDKVER} in 1.4.*) ;; @@ -116,8 +102,8 @@ php_check_java() { } php_install_java() { - if ! php_uses_java ; then - return + if ! useq java-internal ; then + return 1 fi # we put these into /usr/lib so that they cannot conflict with diff --git a/eclass/php4_4-sapi.eclass b/eclass/php4_4-sapi.eclass index a893b2bfacf8..6f1ad93faa7f 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.2 2005/09/08 20:32:49 stuart Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php4_4-sapi.eclass,v 1.3 2005/09/18 12:57:22 hollow 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 crypt ctype curl curlwrappers db2 dba dbase dbm 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 java-external jpeg kerberos ldap libedit mcal mcve memlimit mhash ming msql mssql mysql ncurses nls oci8 odbc oracle7 overload ovrimos pcntl pcre pear pfpro png 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 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 jpeg kerberos ldap libedit mcal mcve memlimit mhash ming msql mssql mysql ncurses nls oci8 odbc oracle7 overload ovrimos pcntl pcre pear pfpro png 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" # these USE flags should have the correct dependencies DEPEND="${DEPEND} @@ -58,7 +58,7 @@ DEPEND="${DEPEND} gmp? ( dev-libs/gmp ) imap? ( virtual/imap-c-client ) iodbc? ( dev-db/libiodbc ) - !alpha? ( !amd64? ( java? ( =virtual/jdk-1.4* dev-java/java-config ) ) ) + java-internal? ( =virtual/jdk-1.4* dev-java/java-config !dev-php4/php-java-bridge ) jpeg? ( >=media-libs/jpeg-6b ) kerberos? ( virtual/krb5 ) ldap? ( >=net-nds/openldap-1.2.11 ) @@ -76,6 +76,7 @@ DEPEND="${DEPEND} postgres? ( >=dev-db/postgresql-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.60 ) @@ -86,7 +87,8 @@ DEPEND="${DEPEND} wddx? ( dev-libs/expat ) xpm? ( virtual/x11 ) xml? ( dev-libs/expat ) - xml2? ( dev-libs/libxml2 ) + xml2? ( dev-libs/libxml2 xsl? ( dev-libs/libxslt ) ) + xmlrpc? ( dev-libs/expat ) xsl? ( app-text/sablotron dev-libs/expat ) zlib? ( sys-libs/zlib ) virtual/mta" @@ -126,8 +128,8 @@ PHP_INI_FILE="php.ini" # the patch for different versions of PHP case "${PV}" in - 4.3.11) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.2.patch.gz" ;; - 4.4.0) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.2.patch.gz" ;; + 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" ;; esac [ -n "${HARDENEDPHP_PATCH}" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://www.hardened-php.net/${HARDENEDPHP_PATCH} )" @@ -158,7 +160,6 @@ php4_4-sapi_check_awkward_uses() { # A variety of extensions need DBA confutils_use_depend_all "berkdb" "dba" confutils_use_depend_all "cdb" "dba" - confutils_use_depend_all "dbm" "dba" confutils_use_depend_all "flatfile" "dba" confutils_use_depend_all "gdbm" "dba" confutils_use_depend_all "inifile" "dba" @@ -181,12 +182,6 @@ php4_4-sapi_check_awkward_uses() { confutils_use_depend_any "xpm" "gd" "gd-external" confutils_use_depend_all "png" "zlib" - # Hardened-PHP doesn't work well with Apache; needs further investigation - confutils_use_conflict "hardenedphp" "apache" "apache2" - - # Hardened-PHP doesn't work with fastbuild enabled - confutils_use_conflict "hardenedphp" "fastbuild" - # IMAP support php_check_imap @@ -194,7 +189,7 @@ php4_4-sapi_check_awkward_uses() { php_check_java # Java-external support - confutils_use_conflict "java-external" "java" + confutils_use_conflict "java-external" "java-internal" confutils_use_depend_all "java-external" "session" # Mail support @@ -248,16 +243,17 @@ php4_4-sapi_pkg_setup() { } php4_4-sapi_src_unpack() { - if [ "${PHP_PACKAGE}" == 1 ]; then + if [ "${PHP_PACKAGE}" == 1 ] ; then unpack ${A} fi - cd ${PHP_S} + cd ${S} # Patch PHP to show Gentoo as the server platform - sed -i "s/PHP_UNAME=\`uname -a\`/PHP_UNAME=\`uname -s -n -r -v\`/g" configure + sed -e "s/PHP_UNAME=\`uname -a | xargs\`/PHP_UNAME=\`uname -s -n -r -v | xargs\`/g" -i configure.in + # Patch for PostgreSQL support - sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i configure + sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 # 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 @@ -265,9 +261,6 @@ php4_4-sapi_src_unpack() { sed -i.orig -e 's,-i -A -n php,-i -n php,g' ${i} done - # hardenedphp support - use hardenedphp && [ -n "${HARDENEDPHP_PATCH}" ] && epatch ${DISTDIR}/${HARDENEDPHP_PATCH} - # imap support use imap && epatch ${FILESDIR}/4.4.0/php4-imap-symlink.diff @@ -275,30 +268,33 @@ php4_4-sapi_src_unpack() { use iodbc && epatch ${FILESDIR}/4.4.0/php4-iodbc-config.diff use iodbc && epatch ${FILESDIR}/4.4.0/php4-with-iodbc.diff - # fix configure scripts to recognize uClibc - uclibctoolize - - # Just in case ;-) - chmod 755 configure + # hardenedphp support + if use hardenedphp ; then + if [ -n "${HARDENEDPHP_PATCH}" ] ; then + epatch ${DISTDIR}/${HARDENEDPHP_PATCH} + else + ewarn "There is no Hardened-PHP available for this PHP release yet!" + fi + fi # fastbuild support use fastbuild && epatch ${FILESDIR}/4.4.0/fastbuild.patch - # run aclocal if hardenedphp is enabled, else rebuilding the configure dies - if use hardenedphp && [ -n "${HARDENEDPHP_PATCH}" ] ; then - # patch to support libtool 1.5 - epatch ${FILESDIR}/4.4.0/php4-hphp-acinclude.patch - einfo "Running aclocal for hardenedphp" - WANT_AUTOMAKE=1.6 aclocal || die "Unable to run aclocal successfully" - libtoolize --copy --force || die "Unable to run libtoolize successfully" - fi + # fix configure scripts to recognize uClibc, now done with elibtoolize, + # and patch PHP to support libtool 1.5 + epatch ${FILESDIR}/4.4.0/php4-libtool-1.5.patch + einfo "Running aclocal" + WANT_AUTOMAKE=1.9 aclocal --force || die "Unable to run aclocal successfully" + elibtoolize + einfo "Running libtoolize" + libtoolize --copy --force || die "Unable to run libtoolize successfully" # rebuild configure to make sure it's up to date einfo "Rebuilding configure script" - WANT_AUTOCONF=2.5 autoconf -W no-cross || die "Unable to regenerate configure script" + WANT_AUTOCONF=2.5 autoreconf --force -W no-cross || die "Unable to regenerate configure script" - # fix DBA support - sed -e 's!for LIB in dbm c gdbm!for LIB in dbm c gdbm gdbm_compat!' -i configure + # Just in case ;-) + chmod 755 configure } set_php_ini_dir() { @@ -310,7 +306,7 @@ php4_4-sapi_src_compile() { destdir=/usr/$(get_libdir)/php4 set_php_ini_dir - cd ${PHP_S} + cd ${S} confutils_init my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR} --without-pear" @@ -382,7 +378,6 @@ php4_4-sapi_src_compile() { if useq dba ; then enable_extension_with "cdb" "cdb" 1 enable_extension_with "db4" "berkdb" 1 - enable_extension_with "dbm" "dbm" 1 enable_extension_with "flatfile" "flatfile" 1 enable_extension_with "gdbm" "gdbm" 1 enable_extension_with "inifile" "inifile" 1 @@ -413,8 +408,8 @@ php4_4-sapi_src_compile() { fi # Java support - if useq java ; then - enable_extension_with "java" "java" 0 "`java-config --jdk-home`" + if useq java-internal ; then + enable_extension_with "java" "java-internal" 0 "`java-config --jdk-home`" fi # IMAP support @@ -513,7 +508,7 @@ php4_4-sapi_src_compile() { php4_4-sapi_src_install() { destdir=/usr/$(get_libdir)/php4 - cd ${PHP_S} + cd ${S} addpredict /usr/share/snmp/mibs/.index PHP_INSTALLTARGETS="install-build install-headers install-programs" diff --git a/eclass/php5_0-sapi.eclass b/eclass/php5_0-sapi.eclass index 0153217f2f7d..0f323fb8e2e7 100644 --- a/eclass/php5_0-sapi.eclass +++ b/eclass/php5_0-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/php5_0-sapi.eclass,v 1.2 2005/09/08 20:32:49 stuart Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v 1.3 2005/09/18 12:57:22 hollow 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 crypt ctype curl curlwrappers db2 dba dbase dbm dbmaker debug doc empress empress-bcs esoob exif frontbase fdftk filepro firebird flatfile ftp gd gd-external gdbm gmp hardenedphp hyperwave-api iconv imap informix inifile interbase iodbc ipv6 java-external jpeg kerberos ldap libedit mcve memlimit mhash ming msql mssql mysql mysqli ncurses nls oci8 odbc oracle7 ovrimos pcntl pcre pdo-external pear pfpro png posix postgres qdbm readline recode sapdb sasl session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl sybase sybase-ct sysvipc threads tidy tiff tokenizer truetype wddx xml2 xmlrpc xpm xsl yaz zip zlib" +IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb crypt ctype curl curlwrappers db2 dba dbase dbmaker debug doc empress empress-bcs esoob exif frontbase fdftk filepro firebird flatfile ftp gd gd-external gdbm gmp hardenedphp hyperwave-api iconv imap informix inifile interbase iodbc ipv6 java-external jpeg kerberos ldap libedit mcve memlimit mhash ming msql mssql mysql mysqli ncurses nls oci8 odbc oracle7 ovrimos pcntl pcre pdo-external pear pfpro png posix postgres qdbm readline recode sapdb sasl session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl sybase sybase-ct sysvipc threads tidy tiff tokenizer truetype wddx xml2 xmlrpc xpm xsl yaz zip zlib" # these USE flags should have the correct dependencies DEPEND="${DEPEND} @@ -76,6 +76,7 @@ DEPEND="${DEPEND} qdbm? ( dev-db/qdbm ) readline? ( sys-libs/readline ) recode? ( app-text/recode ) + sasl? ( dev-libs/cyrus-sasl ) sharedmem? ( dev-libs/mm ) simplexml? ( >=dev-libs/libxml2-2.6.8 ) snmp? ( >=net-analyzer/net-snmp-5.2 ) @@ -88,6 +89,7 @@ DEPEND="${DEPEND} truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 ) wddx? ( dev-libs/expat ) xml2? ( >=dev-libs/libxml2-2.6.8 ) + xmlrpc? ( >=dev-libs/libxml2-2.6.8 ) xpm? ( virtual/x11 ) xsl? ( dev-libs/libxslt ) zlib? ( sys-libs/zlib ) @@ -126,7 +128,7 @@ PHP_INI_FILE="php.ini" case "${PV}" in 5.0.4) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.1.patch.gz" ;; - 5.0.5) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.2.patch.gz" ;; + 5.0.5) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.3.patch.gz" ;; esac [ -n "${HARDENEDPHP_PATCH}" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://www.hardened-php.net/${HARDENEDPHP_PATCH} )" @@ -157,7 +159,6 @@ php5_0-sapi_check_awkward_uses() { # A variety of extensions need DBA confutils_use_depend_all "berkdb" "dba" confutils_use_depend_all "cdb" "dba" - confutils_use_depend_all "dbm" "dba" confutils_use_depend_all "flatfile" "dba" confutils_use_depend_all "gdbm" "dba" confutils_use_depend_all "inifile" "dba" @@ -175,9 +176,6 @@ php5_0-sapi_check_awkward_uses() { confutils_use_depend_any "xpm" "gd" "gd-external" confutils_use_depend_all "png" "zlib" - # Hardened-PHP doesn't work well with Apache; needs further investigation - confutils_use_conflict "hardenedphp" "apache" "apache2" - # IMAP support php_check_imap @@ -211,8 +209,8 @@ php5_0-sapi_check_awkward_uses() { # PEAR support confutils_use_depend_all "pear" "cli" "pcre" "xml2" - # QDBM doesn't play nicely with GDBM or DBM - confutils_use_conflict "qdbm" "gdbm" "dbm" + # QDBM doesn't play nicely with GDBM + confutils_use_conflict "qdbm" "gdbm" # Readline and libedit do the same thing; you can't have both confutils_use_conflict "readline" "libedit" @@ -238,16 +236,17 @@ php5_0-sapi_pkg_setup() { } php5_0-sapi_src_unpack() { - if [ "${PHP_PACKAGE}" == 1 ]; then + if [ "${PHP_PACKAGE}" == 1 ] ; then unpack ${A} fi - cd ${PHP_S} + cd ${S} # Patch PHP to show Gentoo as the server platform - sed -i "s/PHP_UNAME=\`uname -a\`/PHP_UNAME=\`uname -s -n -r -v\`/g" configure + sed -e "s/PHP_UNAME=\`uname -a | xargs\`/PHP_UNAME=\`uname -s -n -r -v | xargs\`/g" -i configure.in + # Patch for PostgreSQL support - sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i configure + sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 # Patch for session persistence bug epatch ${FILESDIR}/5.1.0/php5_soap_persistence_session.diff @@ -258,9 +257,6 @@ php5_0-sapi_src_unpack() { sed -i.orig -e 's,-i -A -n php5,-i -n php5,g' ${i} done - # hardenedphp support - use hardenedphp && [ -n "${HARDENEDPHP_PATCH}" ] && epatch ${DISTDIR}/${HARDENEDPHP_PATCH} - # imap support use imap && epatch ${FILESDIR}/5.0.0/php5-imap-symlink.diff @@ -268,32 +264,35 @@ php5_0-sapi_src_unpack() { use iodbc && epatch ${FILESDIR}/5.0.0/php5-iodbc-config.diff use iodbc && epatch ${FILESDIR}/5.1.0/php5-with-iodbc.diff - # fix configure scripts to recognize uClibc - uclibctoolize - - # Just in case ;-) - chmod 755 configure + # hardenedphp support + if use hardenedphp ; then + if [ -n "${HARDENEDPHP_PATCH}" ] ; then + epatch ${DISTDIR}/${HARDENEDPHP_PATCH} + else + ewarn "There is no Hardened-PHP available for this PHP release yet!" + fi + fi # fix problems compiling with apache2 if useq apache2 && ! useq threads ; then epatch ${FILESDIR}/5.1.0/php5-prefork.patch || die "Unable to patch for prefork support" fi - # run aclocal if hardenedphp is enabled, else rebuilding the configure dies - if use hardenedphp && [ -n "${HARDENEDPHP_PATCH}" ] ; then - # patch to support libtool 1.5 - epatch ${FILESDIR}/5.0.0/php5-hphp-acinclude.patch - einfo "Running aclocal for hardenedphp" - WANT_AUTOMAKE=1.6 aclocal || die "Unable to run aclocal successfully" - libtoolize --copy --force || die "Unable to run libtoolize successfully" - fi + # fix configure scripts to recognize uClibc, now done with elibtoolize, + # and patch PHP to support libtool 1.5 + epatch ${FILESDIR}/5.0.0/php5-libtool-1.5.patch + einfo "Running aclocal" + WANT_AUTOMAKE=1.9 aclocal --force || die "Unable to run aclocal successfully" + elibtoolize + einfo "Running libtoolize" + libtoolize --copy --force || die "Unable to run libtoolize successfully" # rebuild configure to make sure it's up to date einfo "Rebuilding configure script" - WANT_AUTOCONF=2.5 autoconf -W no-cross || die "Unable to regenerate configure script" + WANT_AUTOCONF=2.5 autoreconf --force -W no-cross || die "Unable to regenerate configure script" - # fix DBA support - sed -e 's!for LIB in dbm c gdbm!for LIB in dbm c gdbm gdbm_compat!' -i configure + # Just in case ;-) + chmod 755 configure } set_php_ini_dir() { @@ -305,7 +304,7 @@ php5_0-sapi_src_compile() { destdir=/usr/$(get_libdir)/php5 set_php_ini_dir - cd ${PHP_S} + cd ${S} confutils_init my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR} --without-pear" @@ -381,7 +380,6 @@ php5_0-sapi_src_compile() { if useq dba ; then enable_extension_with "cdb" "cdb" 1 enable_extension_with "db4" "berkdb" 1 - enable_extension_with "dbm" "dbm" 1 enable_extension_with "flatfile" "flatfile" 1 enable_extension_with "gdbm" "gdbm" 1 enable_extension_with "inifile" "inifile" 1 @@ -500,7 +498,7 @@ php5_0-sapi_src_compile() { php5_0-sapi_src_install() { destdir=/usr/$(get_libdir)/php5 - cd ${PHP_S} + cd ${S} addpredict /usr/share/snmp/mibs/.index PHP_INSTALLTARGETS="install-build install-headers install-programs" diff --git a/eclass/php5_1-sapi.eclass b/eclass/php5_1-sapi.eclass index de97e2267ce0..f0cfec40bfbc 100644 --- a/eclass/php5_1-sapi.eclass +++ b/eclass/php5_1-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/php5_1-sapi.eclass,v 1.4 2005/09/09 13:09:28 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php5_1-sapi.eclass,v 1.5 2005/09/18 12:57:22 hollow 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 crypt ctype curl curlwrappers db2 dba dbase dbm dbmaker 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-external jpeg kerberos ldap libedit mcve memlimit mhash ming msql mssql mysql mysqli ncurses nls oci8 odbc oracle7 ovrimos pcntl pcre pdo pdo-external pear pfpro png posix postgres qdbm readline recode sapdb sasl session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl sybase sybase-ct sysvipc threads tidy tiff tokenizer truetype vm-goto vm-switch wddx xml2 xmlreader xmlrpc xpm xsl yaz zip zlib" +IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb crypt ctype curl curlwrappers db2 dba dbase dbmaker 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-external jpeg kerberos ldap libedit mcve memlimit mhash ming msql mssql mysql mysqli ncurses nls oci8 odbc oracle7 ovrimos pcntl pcre pdo pdo-external pear pfpro png posix postgres qdbm readline recode sapdb sasl session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl sybase sybase-ct sysvipc threads tidy tiff tokenizer truetype vm-goto vm-switch wddx xml2 xmlreader xmlrpc xpm xsl yaz zip zlib" # these USE flags should have the correct dependencies DEPEND="${DEPEND} @@ -76,6 +76,7 @@ DEPEND="${DEPEND} qdbm? ( dev-db/qdbm ) readline? ( sys-libs/readline ) recode? ( app-text/recode ) + sasl? ( dev-libs/cyrus-sasl ) sharedmem? ( dev-libs/mm ) simplexml? ( >=dev-libs/libxml2-2.6.8 ) snmp? ( >=net-analyzer/net-snmp-5.2 ) @@ -89,6 +90,7 @@ DEPEND="${DEPEND} wddx? ( dev-libs/expat ) xml2? ( >=dev-libs/libxml2-2.6.8 ) xmlreader? ( >=dev-libs/libxml2-2.6.8 ) + xmlrpc? ( >=dev-libs/libxml2-2.6.8 ) xpm? ( virtual/x11 ) xsl? ( dev-libs/libxslt ) zlib? ( sys-libs/zlib ) @@ -157,7 +159,6 @@ php5_1-sapi_check_awkward_uses() { # A variety of extensions need DBA confutils_use_depend_all "berkdb" "dba" confutils_use_depend_all "cdb" "dba" - confutils_use_depend_all "dbm" "dba" confutils_use_depend_all "flatfile" "dba" confutils_use_depend_all "gdbm" "dba" confutils_use_depend_all "inifile" "dba" @@ -175,12 +176,6 @@ php5_1-sapi_check_awkward_uses() { confutils_use_depend_any "xpm" "gd" "gd-external" confutils_use_depend_all "png" "zlib" - # Hardened-PHP doesn't work well with Apache; needs further investigation - confutils_use_conflict "hardenedphp" "apache" "apache2" - - # Hardened-PHP doesn't work with fastbuild enabled - confutils_use_conflict "hardenedphp" "fastbuild" - # IMAP support php_check_imap @@ -218,8 +213,8 @@ php5_1-sapi_check_awkward_uses() { # PEAR support confutils_use_depend_all "pear" "cli" "pcre" "xml2" - # QDBM doesn't play nicely with GDBM or DBM - confutils_use_conflict "qdbm" "gdbm" "dbm" + # QDBM doesn't play nicely with GDBM + confutils_use_conflict "qdbm" "gdbm" # Readline and libedit do the same thing; you can't have both confutils_use_conflict "readline" "libedit" @@ -248,16 +243,17 @@ php5_1-sapi_pkg_setup() { } php5_1-sapi_src_unpack() { - if [ "${PHP_PACKAGE}" == 1 ]; then + if [ "${PHP_PACKAGE}" == 1 ] ; then unpack ${A} fi - cd ${PHP_S} + cd ${S} # Patch PHP to show Gentoo as the server platform - sed -i "s/PHP_UNAME=\`uname -a\`/PHP_UNAME=\`uname -s -n -r -v\`/g" configure + sed -e "s/PHP_UNAME=\`uname -a | xargs\`/PHP_UNAME=\`uname -s -n -r -v | xargs\`/g" -i configure.in + # Patch for PostgreSQL support - sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i configure + sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 # Patch for session persistence bug epatch ${FILESDIR}/5.1.0/php5_soap_persistence_session.diff @@ -268,9 +264,6 @@ php5_1-sapi_src_unpack() { sed -i.orig -e 's,-i -A -n php5,-i -n php5,g' ${i} done - # hardenedphp support - use hardenedphp && [ -n "${HARDENEDPHP_PATCH}" ] && epatch ${DISTDIR}/${HARDENEDPHP_PATCH} - # imap support use imap && epatch ${FILESDIR}/5.1.0/php5-imap-symlink.diff @@ -278,33 +271,36 @@ php5_1-sapi_src_unpack() { use iodbc && epatch ${FILESDIR}/5.1.0/php5-iodbc-config.diff use iodbc && epatch ${FILESDIR}/5.1.0/php5-with-iodbc.diff - # fix configure scripts to recognize uClibc - uclibctoolize + # hardenedphp support + if use hardenedphp ; then + if [ -n "${HARDENEDPHP_PATCH}" ] ; then + epatch ${DISTDIR}/${HARDENEDPHP_PATCH} + else + ewarn "There is no Hardened-PHP available for this PHP release yet!" + fi + fi - # Just in case ;-) - chmod 755 configure + # fastbuild support + use fastbuild && epatch ${FILESDIR}/5.1.0/fastbuild.patch # fix problems compiling with apache2 if useq apache2 && ! useq threads ; then epatch ${FILESDIR}/5.1.0/php5-prefork.patch || die "Unable to patch for prefork support" fi - # fastbuild support - use fastbuild && epatch ${FILESDIR}/5.1.0/fastbuild.patch - - # run aclocal if hardenedphp is enabled, else rebuilding the configure dies - if use hardenedphp && [ -n "${HARDENEDPHP_PATCH}" ] ; then - einfo "Running aclocal for hardenedphp" - WANT_AUTOMAKE=1.6 aclocal || die "Unable to run aclocal successfully" - libtoolize --copy --force || die "Unable to run libtoolize successfully" - fi + # fix configure scripts to recognize uClibc, now done with elibtoolize + einfo "Running aclocal" + WANT_AUTOMAKE=1.9 aclocal --force || die "Unable to run aclocal successfully" + elibtoolize + einfo "Running libtoolize" + libtoolize --copy --force || die "Unable to run libtoolize successfully" # rebuild configure to make sure it's up to date einfo "Rebuilding configure script" - WANT_AUTOCONF=2.5 autoconf -W no-cross || die "Unable to regenerate configure script" + WANT_AUTOCONF=2.5 autoreconf --force -W no-cross || die "Unable to regenerate configure script" - # fix DBA support - sed -e 's!for LIB in dbm c gdbm!for LIB in dbm c gdbm gdbm_compat!' -i configure + # Just in case ;-) + chmod 755 configure } set_php_ini_dir() { @@ -316,7 +312,7 @@ php5_1-sapi_src_compile() { destdir=/usr/$(get_libdir)/php5 set_php_ini_dir - cd ${PHP_S} + cd ${S} confutils_init my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR} --without-pear" @@ -394,7 +390,6 @@ php5_1-sapi_src_compile() { if useq dba ; then enable_extension_with "cdb" "cdb" 1 enable_extension_with "db4" "berkdb" 1 - enable_extension_with "dbm" "dbm" 1 enable_extension_with "flatfile" "flatfile" 1 enable_extension_with "gdbm" "gdbm" 1 enable_extension_with "inifile" "inifile" 1 @@ -534,7 +529,7 @@ php5_1-sapi_src_compile() { php5_1-sapi_src_install() { destdir=/usr/$(get_libdir)/php5 - cd ${PHP_S} + cd ${S} addpredict /usr/share/snmp/mibs/.index PHP_INSTALLTARGETS="install-build install-headers install-programs" diff --git a/profiles/use.local.desc b/profiles/use.local.desc index 9165e1681bc5..39994d37f327 100644 --- a/profiles/use.local.desc +++ b/profiles/use.local.desc @@ -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/profiles/use.local.desc,v 1.1454 2005/09/18 00:11:48 vericgar Exp $ +# $Header: /var/cvsroot/gentoo-x86/profiles/use.local.desc,v 1.1455 2005/09/18 12:52:31 hollow Exp $ # This file contains descriptions of local USE flags, and the ebuilds which # contain them. @@ -242,6 +242,7 @@ dev-lang/php:discard-path - Switch on common security setting for CGI SAPI dev-lang/php:force-cgi-redirect - Switch on common security setting for CGI SAPI dev-lang/php:fastbuild - Build PHP quicker (experimental) dev-lang/php:java-external - Use the external java extension rather than the bundled one +dev-lang/php:java-internal - Use the bundled java extension in PHP4 dev-lang/php:overload - Enable the overload extension dev-lang/php:pdo-external - Use the external pecl-pdo extension rather than the bundled one dev-lang/php:pear - Enable PEAR support |