summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/php-common-r1.eclass20
-rw-r--r--eclass/php4_4-sapi.eclass172
-rw-r--r--eclass/php5_0-sapi.eclass168
-rw-r--r--eclass/php5_1-sapi.eclass185
4 files changed, 352 insertions, 193 deletions
diff --git a/eclass/php-common-r1.eclass b/eclass/php-common-r1.eclass
index b7557b130dbf..2ebad67054bf 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.4 2005/11/01 10:04:13 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.5 2006/01/04 09:22:48 chtekk Exp $
# ########################################################################
#
@@ -148,7 +148,7 @@ php_check_mta() {
# ORACLE SUPPORT
# ########################################################################
-php_check_oracle() {
+php_check_oracle_all() {
if useq oci8 && [ -z "${ORACLE_HOME}" ]; then
eerror
eerror "You must have the ORACLE_HOME variable in your environment!"
@@ -164,6 +164,22 @@ php_check_oracle() {
fi
}
+php_check_oracle_8() {
+ if useq oci8 && [ -z "${ORACLE_HOME}" ]; then
+ eerror
+ eerror "You must have the ORACLE_HOME variable in your environment!"
+ eerror
+ die "Oracle configuration incorrect; user error"
+ fi
+
+ if useq oci8 ; then
+ if has_version 'dev-db/oracle-instantclient-basic' ; then
+ ewarn "Please ensure you have a full install of the Oracle client."
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient."
+ fi
+ fi
+}
+
# ########################################################################
# END OF ECLASS
# ########################################################################
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
}
diff --git a/eclass/php5_0-sapi.eclass b/eclass/php5_0-sapi.eclass
index 632302b6d766..89bc7343dea5 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.7 2005/11/04 00:30:01 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v 1.8 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 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 kerberos ldap libedit mcve memlimit mhash ming mnogosearch msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc oracle7 ovrimos pcntl pcre pdo-external pear pfpro pic 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 cjk 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 kerberos ldap libedit mcve memlimit mhash ming mnogosearch msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc oracle7 ovrimos pcntl pcre pdo-external pear pfpro pic 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 xml xmlrpc xpm xsl yaz zip zlib"
# these USE flags should have the correct dependencies
DEPEND="${DEPEND}
@@ -68,7 +68,6 @@ DEPEND="${DEPEND}
kerberos? ( virtual/krb5 )
ldap? ( >=net-nds/openldap-1.2.11 )
libedit? ( dev-libs/libedit )
- mcve? ( net-libs/libmonetra )
mhash? ( app-crypt/mhash )
ming? ( media-libs/ming )
mssql? ( dev-db/freetds )
@@ -78,7 +77,7 @@ 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 )
qdbm? ( dev-db/qdbm )
readline? ( sys-libs/readline )
recode? ( app-text/recode )
@@ -93,10 +92,9 @@ DEPEND="${DEPEND}
tidy? ( app-text/htmltidy )
tiff? ( media-libs/tiff )
truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 )
- wddx? ( dev-libs/expat )
- xml2? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
xmlrpc? ( >=dev-libs/libxml2-2.6.8 )
- xpm? ( virtual/x11 )
+ xpm? ( || ( virtual/x11 x11-libs/libXpm ) )
xsl? ( dev-libs/libxslt )
zlib? ( sys-libs/zlib )
virtual/mta"
@@ -114,6 +112,7 @@ RDEPEND="${RDEPEND} ${DEPEND}"
PDEPEND="${PDEPEND}
doc? ( app-doc/php-docs )
java-external? ( dev-php5/php-java-bridge )
+ mcve? ( dev-php5/pecl-mcve )
pdo-external? ( dev-php5/pecl-pdo )
pear? ( >=dev-php/PEAR-PEAR-1.3.6 )
yaz? ( dev-php5/pecl-yaz )
@@ -128,16 +127,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
- 5.0.4) HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.1.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} )"
+[ -n "${HARDENEDPHP_PATCH}" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
# ========================================================================
@@ -171,7 +162,7 @@ php5_0-sapi_check_awkward_uses() {
confutils_use_depend_all "qdbm" "dba"
# 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"
@@ -192,7 +183,7 @@ php5_0-sapi_check_awkward_uses() {
# Oracle support
confutils_use_conflict "oci8" "oci8-instant-client"
- php_check_oracle
+ php_check_oracle_all
# LDAP-sasl support
confutils_use_depend_all "sasl" "ldap"
@@ -213,7 +204,7 @@ php5_0-sapi_check_awkward_uses() {
confutils_use_depend_all "solid" "odbc"
# PEAR support
- confutils_use_depend_all "pear" "cli" "pcre" "xml2" "zlib"
+ confutils_use_depend_all "pear" "cli" "pcre" "xml" "zlib"
# QDBM doesn't play nicely with GDBM
confutils_use_conflict "qdbm" "gdbm"
@@ -248,11 +239,25 @@ php5_0-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
# Patch for session persistence bug
epatch "${FILESDIR}/5.0-any/php5-soap_persistence_session.diff"
@@ -281,7 +286,7 @@ php5_0-sapi_src_unpack() {
# fix problems compiling with apache2
if useq apache2 && ! useq threads ; then
- epatch "${FILESDIR}/5.0-any/php5-prefork.patch" || die "Unable to patch for prefork support"
+ epatch "${FILESDIR}/5.0-any/php5-prefork.patch"
fi
# fix configure scripts to correctly support HardenedPHP
@@ -294,13 +299,13 @@ php5_0-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() {
@@ -326,7 +331,7 @@ php5_0-sapi_src_compile() {
enable_extension_with "curl" "curl" 1
enable_extension_with "curlwrappers" "curlwrappers" 1
enable_extension_enable "dbase" "dbase" 1
- enable_extension_disable "dom" "xml2" 0
+ enable_extension_disable "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"
@@ -335,15 +340,14 @@ php5_0-sapi_src_compile() {
enable_extension_with "gettext" "nls" 1
enable_extension_with "gmp" "gmp" 1
enable_extension_with "hwapi" "hyperwave-api" 1
- enable_extension_with "iconv" "iconv" 1
+ enable_extension_without "iconv" "iconv" 1
enable_extension_with "informix" "informix" 1
enable_extension_disable "ipv6" "ipv6" 0
# ircg extension not supported on Gentoo at this time
enable_extension_with "kerberos" "kerberos" 0 "/usr"
- enable_extension_disable "libxml" "xml2" 0
+ enable_extension_disable "libxml" "xml" 0
enable_extension_enable "mbstring" "nls" 1
enable_extension_with "mcrypt" "crypt" 1
- enable_extension_with "mcve" "mcve" 1
enable_extension_enable "memory-limit" "memlimit" 0
enable_extension_with "mhash" "mhash" 1
enable_extension_with "ming" "ming" 1
@@ -378,7 +382,7 @@ php5_0-sapi_src_compile() {
enable_extension_with "tidy" "tidy" 1
enable_extension_disable "tokenizer" "tokenizer" 1
enable_extension_enable "wddx" "wddx" 1
- enable_extension_disable "xml" "xml2" 0
+ enable_extension_disable "xml" "xml" 0
enable_extension_with "xmlrpc" "xmlrpc" 1
enable_extension_with "xsl" "xsl" 1
enable_extension_with "zlib" "zlib" 1
@@ -576,51 +580,83 @@ php5_0-sapi_install_ini() {
}
php5_0-sapi_pkg_postinst() {
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache 1 is configured to load a different version of PHP."
+ ewarn "To make Apache 1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select apache2 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache 2 is configured to load a different version of PHP."
+ ewarn "To make Apache 2 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php5"
+ 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 php5"
- ewarn "to symlink to /usr/lib/php5/bin/php."
+ "${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php5
+ 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 v5, use php-select:"
+ ewarn
+ ewarn " php-select php php5"
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."
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php5
+ 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 v5, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php5"
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."
+ "${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php5
+ 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 v5, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php5"
ewarn
- else
- eselect php-devel set php5
fi
ewarn "If you have additional third party PHP extensions (such as"
@@ -629,6 +665,13 @@ php5_0-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
@@ -644,4 +687,9 @@ php5_0-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."
+ ewarn
}
diff --git a/eclass/php5_1-sapi.eclass b/eclass/php5_1-sapi.eclass
index f4c8a3c7952c..fd7722202198 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.7 2005/10/31 14:08:42 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php5_1-sapi.eclass,v 1.8 2006/01/04 09:22:48 chtekk Exp $
#
# ########################################################################
#
@@ -19,7 +19,7 @@
#
# ========================================================================
-CONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase hyperwave-api informix interbase msql oci8 oracle7 ovrimos pfpro sapdb solid sybase sybase-ct"
+CONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase hyperwave-api informix interbase msql oci8 sapdb solid sybase sybase-ct"
EBUILD_SUPPORTS_SHAREDEXT=1
inherit flag-o-matic eutils confutils libtool php-common-r1
@@ -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 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 kerberos ldap libedit mcve memlimit mhash ming msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc oracle7 ovrimos pcntl pcre pdo pdo-external pear pfpro pic 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 cjk 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 kerberos ldap libedit mcve memlimit mhash ming msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc pcntl pcre pdo pdo-external pear pic 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 tokenizer truetype vm-goto vm-switch wddx xml xmlreader xmlrpc xpm xsl yaz zip zlib"
# these USE flags should have the correct dependencies
DEPEND="${DEPEND}
@@ -68,7 +68,6 @@ DEPEND="${DEPEND}
kerberos? ( virtual/krb5 )
ldap? ( >=net-nds/openldap-1.2.11 )
libedit? ( dev-libs/libedit )
- mcve? ( net-libs/libmonetra )
mhash? ( app-crypt/mhash )
ming? ( media-libs/ming )
mssql? ( dev-db/freetds )
@@ -78,7 +77,7 @@ 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 )
qdbm? ( dev-db/qdbm )
readline? ( sys-libs/readline )
recode? ( app-text/recode )
@@ -91,13 +90,11 @@ DEPEND="${DEPEND}
ssl? ( >=dev-libs/openssl-0.9.7 )
sybase? ( dev-db/freetds )
tidy? ( app-text/htmltidy )
- tiff? ( media-libs/tiff )
truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 )
- wddx? ( dev-libs/expat )
- xml2? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
xmlrpc? ( >=dev-libs/libxml2-2.6.8 )
- xpm? ( virtual/x11 )
+ xpm? ( || ( virtual/x11 x11-libs/libXpm ) )
xsl? ( dev-libs/libxslt )
zlib? ( sys-libs/zlib )
virtual/mta"
@@ -115,6 +112,7 @@ RDEPEND="${RDEPEND} ${DEPEND}"
PDEPEND="${PDEPEND}
doc? ( app-doc/php-docs )
java-external? ( dev-php5/php-java-bridge )
+ mcve? ( dev-php5/pecl-mcve )
pdo-external? ( dev-php5/pecl-pdo )
pear? ( >=dev-php/PEAR-PEAR-1.3.6 )
yaz? ( dev-php5/pecl-yaz )
@@ -129,15 +127,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
-# 5.1.0) ;;
-#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} )"
# ========================================================================
@@ -171,13 +162,12 @@ php5_1-sapi_check_awkward_uses() {
confutils_use_depend_all "qdbm" "dba"
# 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"
# support for the GD graphics library
confutils_use_conflict "gd" "gd-external"
confutils_use_depend_any "truetype" "gd" "gd-external"
confutils_use_depend_any "cjk" "gd" "gd-external"
- confutils_use_depend_all "tiff" "gd"
confutils_use_depend_all "xpm" "gd"
confutils_use_depend_all "gd" "zlib"
@@ -192,7 +182,7 @@ php5_1-sapi_check_awkward_uses() {
# Oracle support
confutils_use_conflict "oci8" "oci8-instant-client"
- php_check_oracle
+ php_check_oracle_8
# LDAP-sasl support
confutils_use_depend_all "sasl" "ldap"
@@ -217,7 +207,7 @@ php5_1-sapi_check_awkward_uses() {
confutils_use_conflict "pdo" "pdo-external"
# PEAR support
- confutils_use_depend_all "pear" "cli" "pcre" "xml2" "zlib"
+ confutils_use_depend_all "pear" "cli" "pcre" "xml" "zlib"
# QDBM doesn't play nicely with GDBM
confutils_use_conflict "qdbm" "gdbm"
@@ -255,11 +245,25 @@ php5_1-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
# Patch for session persistence bug
epatch "${FILESDIR}/5.1-any/php5-soap_persistence_session.diff"
@@ -291,7 +295,7 @@ php5_1-sapi_src_unpack() {
# fix problems compiling with apache2
if useq apache2 && ! useq threads ; then
- epatch "${FILESDIR}/5.1-any/php5-prefork.patch" || die "Unable to patch for prefork support"
+ epatch "${FILESDIR}/5.1-any/php5-prefork.patch"
fi
# fix configure scripts to correctly support HardenedPHP
@@ -302,13 +306,13 @@ php5_1-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() {
@@ -334,7 +338,7 @@ php5_1-sapi_src_compile() {
enable_extension_with "curl" "curl" 1
enable_extension_with "curlwrappers" "curlwrappers" 1
enable_extension_enable "dbase" "dbase" 1
- enable_extension_disable "dom" "xml2" 0
+ enable_extension_disable "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"
@@ -343,15 +347,14 @@ php5_1-sapi_src_compile() {
enable_extension_with "gettext" "nls" 1
enable_extension_with "gmp" "gmp" 1
enable_extension_with "hwapi" "hyperwave-api" 1
- enable_extension_with "iconv" "iconv" 1
+ enable_extension_without "iconv" "iconv" 1
enable_extension_with "informix" "informix" 1
enable_extension_disable "ipv6" "ipv6" 0
# ircg extension not supported on Gentoo at this time
enable_extension_with "kerberos" "kerberos" 0 "/usr"
- enable_extension_disable "libxml" "xml2" 0
+ enable_extension_disable "libxml" "xml" 0
enable_extension_enable "mbstring" "nls" 1
enable_extension_with "mcrypt" "crypt" 1
- enable_extension_with "mcve" "mcve" 1
enable_extension_enable "memory-limit" "memlimit" 0
enable_extension_with "mhash" "mhash" 1
enable_extension_with "ming" "ming" 1
@@ -360,14 +363,11 @@ php5_1-sapi_src_compile() {
enable_extension_with "ncurses" "ncurses" 1
enable_extension_with "oci8" "oci8" 1
enable_extension_with "oci8-instant-client" "oci8-instant-client" 1
- enable_extension_with "oracle" "oracle7" 1
enable_extension_with "openssl" "ssl" 1
enable_extension_with "openssl-dir" "ssl" 0 "/usr"
- enable_extension_with "ovrimos" "ovrimos" 1
enable_extension_enable "pcntl" "pcntl" 1
enable_extension_without "pcre-regex" "pcre" 0
enable_extension_disable "pdo" "pdo" 1
- enable_extension_with "pfpro" "pfpro" 1
enable_extension_with "pgsql" "postgres" 1
enable_extension_disable "posix" "posix" 1
enable_extension_with "pspell" "spell" 1
@@ -386,7 +386,7 @@ php5_1-sapi_src_compile() {
enable_extension_with "tidy" "tidy" 1
enable_extension_disable "tokenizer" "tokenizer" 1
enable_extension_enable "wddx" "wddx" 1
- enable_extension_disable "xml" "xml2" 0
+ enable_extension_disable "xml" "xml" 0
enable_extension_with "xmlreader" "xmlreader" 1
enable_extension_with "xmlrpc" "xmlrpc" 1
enable_extension_with "xsl" "xsl" 1
@@ -419,7 +419,6 @@ php5_1-sapi_src_compile() {
enable_extension_enable "gd-native-ttf" "truetype" 0
enable_extension_with "jpeg-dir" "gd" 0 "/usr"
enable_extension_with "png-dir" "gd" 0 "/usr"
- enable_extension_with "tiff-dir" "tiff" 0 "/usr"
enable_extension_with "xpm-dir" "xpm" 0 "/usr/X11R6"
# enable gd last, so configure can pick up the previous settings
enable_extension_with "gd" "gd" 0
@@ -611,51 +610,83 @@ php5_1-sapi_install_ini() {
}
php5_1-sapi_pkg_postinst() {
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache 1 is configured to load a different version of PHP."
+ ewarn "To make Apache 1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select apache2 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache 2 is configured to load a different version of PHP."
+ ewarn "To make Apache 2 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php5"
+ 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 php5"
- ewarn "to symlink to /usr/lib/php5/bin/php."
+ "${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php5
+ 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 v5, use php-select:"
+ ewarn
+ ewarn " php-select php php5"
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."
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php5
+ 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 v5, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php5"
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."
+ "${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php5
+ 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 v5, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php5"
ewarn
- else
- eselect php-devel set php5
fi
ewarn "If you have additional third party PHP extensions (such as"
@@ -664,6 +695,13 @@ php5_1-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
@@ -679,4 +717,19 @@ php5_1-sapi_pkg_postinst() {
ewarn "configurations where you disabled TEXTRELs, for example using"
ewarn "PaX in the kernel."
ewarn
+
+ ewarn "With PHP 5.1, some extensions were removed from PHP because"
+ ewarn "they were unmaintained or moved to PECL. Our ebuilds reflect"
+ ewarn "this: the Oracle extension was removed ('oracle7' USE flag),"
+ ewarn "please use the 'oci8' USE flag for Oracle support now and/or"
+ ewarn "the PDO OCI8 driver, enabled if you set both the 'oci8' and"
+ ewarn "'pdo' USE flags. Also, the MCVE extension was moved to PECL"
+ ewarn "and thus can now be found in dev-php5/pecl-mcve. The Ovrimos"
+ ewarn "and Pfpro extensions were removed altogether and have no"
+ ewarn "available sobstitute."
+
+ 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."
+ ewarn
}