summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorStuart Herbert <stuart@gentoo.org>2005-09-08 20:32:49 +0000
committerStuart Herbert <stuart@gentoo.org>2005-09-08 20:32:49 +0000
commit8fe0df3b93277a59deef7e91eaf47ec14b8c84bf (patch)
tree51222ef25afcd3b5c0abafc3f311e4a4733b6dbe /eclass
parentBump (diff)
downloadhistorical-8fe0df3b93277a59deef7e91eaf47ec14b8c84bf.tar.gz
historical-8fe0df3b93277a59deef7e91eaf47ec14b8c84bf.tar.bz2
historical-8fe0df3b93277a59deef7e91eaf47ec14b8c84bf.zip
Latest PHP eclasses from the overlay
Diffstat (limited to 'eclass')
-rw-r--r--eclass/php4_4-sapi.eclass66
-rw-r--r--eclass/php5_0-sapi.eclass61
-rw-r--r--eclass/php5_1-sapi.eclass63
3 files changed, 185 insertions, 5 deletions
diff --git a/eclass/php4_4-sapi.eclass b/eclass/php4_4-sapi.eclass
index 139f130670cf..a893b2bfacf8 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.1 2005/09/04 10:54:53 stuart Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php4_4-sapi.eclass,v 1.2 2005/09/08 20:32:49 stuart Exp $
#
# ########################################################################
#
@@ -126,7 +126,8 @@ PHP_INI_FILE="php.ini"
# the patch for different versions of PHP
case "${PV}" in
- 4.4.0) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.1.patch.gz" ;;
+ 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" ;;
esac
[ -n "${HARDENEDPHP_PATCH}" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://www.hardened-php.net/${HARDENEDPHP_PATCH} )"
@@ -183,6 +184,9 @@ php4_4-sapi_check_awkward_uses() {
# 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
@@ -280,6 +284,15 @@ php4_4-sapi_src_unpack() {
# 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
+
# 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"
@@ -551,11 +564,60 @@ php4_4-sapi_install_ini() {
}
php4_4-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 php4"
+ ewarn "to symlink to /usr/lib/php4/bin/php."
+ 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."
+ 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."
+ ewarn
+ else
+ eselect php-devel set php4
+ fi
+
ewarn "If you have additional third party PHP extensions (such as"
ewarn "dev-php4/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
}
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
}
diff --git a/eclass/php5_1-sapi.eclass b/eclass/php5_1-sapi.eclass
index 51bd04cbda68..1cc83735d960 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.2 2005/09/04 15:15:37 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php5_1-sapi.eclass,v 1.3 2005/09/08 20:32:49 stuart Exp $
#
# ########################################################################
#
@@ -178,6 +178,9 @@ php5_1-sapi_check_awkward_uses() {
# 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
@@ -289,6 +292,13 @@ php5_1-sapi_src_unpack() {
# 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
+
# 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"
@@ -483,7 +493,7 @@ php5_1-sapi_src_compile() {
else
enable_extension_enable "sqlite-utf8" "nls" 0
fi
-
+
# Zend-GOTO-VM support
if useq vm-goto ; then
my_conf="${my_conf} --with-zend-vm=GOTO"
@@ -581,11 +591,60 @@ php5_1-sapi_install_ini() {
}
php5_1-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
}