diff options
author | Stuart Herbert <stuart@gentoo.org> | 2005-09-08 20:32:49 +0000 |
---|---|---|
committer | Stuart Herbert <stuart@gentoo.org> | 2005-09-08 20:32:49 +0000 |
commit | fe589129eea78b2571312cf9efe5144439ab22be (patch) | |
tree | 3f781831518284d400c41f29c49e56fff26f8b0e /eclass/php5_0-sapi.eclass | |
parent | Bump (diff) | |
download | gentoo-2-fe589129eea78b2571312cf9efe5144439ab22be.tar.gz gentoo-2-fe589129eea78b2571312cf9efe5144439ab22be.tar.bz2 gentoo-2-fe589129eea78b2571312cf9efe5144439ab22be.zip |
Latest PHP eclasses from the overlay
Diffstat (limited to 'eclass/php5_0-sapi.eclass')
-rw-r--r-- | eclass/php5_0-sapi.eclass | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/eclass/php5_0-sapi.eclass b/eclass/php5_0-sapi.eclass index 181aa4fda8a0..0153217f2f7d 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.1 2005/09/04 10:54:53 stuart Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v 1.2 2005/09/08 20:32:49 stuart Exp $ # # ######################################################################## # @@ -126,6 +126,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" ;; esac [ -n "${HARDENEDPHP_PATCH}" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://www.hardened-php.net/${HARDENEDPHP_PATCH} )" @@ -278,6 +279,15 @@ php5_0-sapi_src_unpack() { 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 + # 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" @@ -547,11 +557,60 @@ php5_0-sapi_install_ini() { } php5_0-sapi_pkg_postinst() { + # 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 php5" + ewarn "to symlink to /usr/lib/php5/bin/php." + ewarn + else + eselect php set php5 + 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 php5" + ewarn "to symlink to /usr/lib/php5/bin/php-cgi." + ewarn + else + eselect php-cgi set php5 + 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 php5" + ewarn "to symlink to /usr/lib/php5/bin/phpize and" + ewarn "/usr/lib/php5/bin/php-config." + ewarn + else + eselect php-devel set php5 + fi + ewarn "If you have additional third party PHP extensions (such as" ewarn "dev-php5/phpdbg) you may need to recompile them now." + ewarn if useq curl; then ewarn "Please be aware that CURL can allow the bypass of open_basedir restrictions." ewarn "This can be a security risk!" + ewarn fi } |