diff options
author | Luca Longinotti <chtekk@gentoo.org> | 2006-07-14 16:02:36 +0000 |
---|---|---|
committer | Luca Longinotti <chtekk@gentoo.org> | 2006-07-14 16:02:36 +0000 |
commit | 72d0e3ce793846de6e03a4dbe1416d0c5e1f0a5b (patch) | |
tree | b0552737a67541375228c38844cdad6f27e8f86a /eclass/php5_1-sapi.eclass | |
parent | ppc stable, bug #139612 (diff) | |
download | gentoo-2-72d0e3ce793846de6e03a4dbe1416d0c5e1f0a5b.tar.gz gentoo-2-72d0e3ce793846de6e03a4dbe1416d0c5e1f0a5b.tar.bz2 gentoo-2-72d0e3ce793846de6e03a4dbe1416d0c5e1f0a5b.zip |
Update PHP eclasses, better ebuild/eclass separation, accomodate for new features.
Diffstat (limited to 'eclass/php5_1-sapi.eclass')
-rw-r--r-- | eclass/php5_1-sapi.eclass | 338 |
1 files changed, 128 insertions, 210 deletions
diff --git a/eclass/php5_1-sapi.eclass b/eclass/php5_1-sapi.eclass index d9f17259c0ca..769f2d873793 100644 --- a/eclass/php5_1-sapi.eclass +++ b/eclass/php5_1-sapi.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 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.27 2006/07/06 15:10:16 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php5_1-sapi.eclass,v 1.28 2006/07/14 16:02:36 chtekk Exp $ # # ######################################################################## # @@ -19,10 +19,9 @@ # # ======================================================================== -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" +PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase hyperwave-api informix interbase msql oci8 sapdb solid sybase sybase-ct" -inherit flag-o-matic eutils phpconfutils libtool php-common-r1 toolchain-funcs +inherit flag-o-matic toolchain-funcs libtool eutils phpconfutils php-common-r1 # set MY_PHP_P in the ebuild @@ -39,81 +38,78 @@ 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 dbase dbmaker debug doc empress empress-bcs esoob exif fastbuild frontbase fdftk filepro firebird flatfile ftp gd gd-external gdbm gmp hardenedphp hash 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 pic posix postgres qdbm readline reflection recode sapdb sasl session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl sybase sybase-ct sysvipc threads tidy tokenizer truetype unicode vm-goto vm-switch wddx xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib" +IUSE="adabas bcmath berkdb birdstep bzip2 calendar cdb cjk crypt ctype curl curlwrappers db2 dbase dbmaker debug doc empress empress-bcs esoob exif frontbase fdftk filepro firebird flatfile ftp gd gd-external gdbm gmp hardenedphp hash 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 pic posix postgres qdbm readline reflection recode sapdb sasl session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl sybase sybase-ct sysvipc tidy tokenizer truetype unicode vm-goto vm-switch wddx xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib" # these USE flags should have the correct dependencies -DEPEND="${DEPEND} - !dev-php/php - !dev-php/php-cgi - !dev-php/mod_php - adabas? ( >=dev-db/unixODBC-1.8.13 ) - berkdb? ( =sys-libs/db-4* ) - birdstep? ( >=dev-db/unixODBC-1.8.13 ) - bzip2? ( app-arch/bzip2 ) - cdb? ( dev-db/cdb ) - cjk? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) - crypt? ( >=dev-libs/libmcrypt-2.4 ) - curl? ( >=net-misc/curl-7.10.5 ) - db2? ( >=dev-db/unixODBC-1.8.13 ) - dbmaker? ( >=dev-db/unixODBC-1.8.13 ) - empress? ( >=dev-db/unixODBC-1.8.13 ) - empress-bcs? ( >=dev-db/unixODBC-1.8.13 ) - esoob? ( >=dev-db/unixODBC-1.8.13 ) - exif? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) - fdftk? ( app-text/fdftk ) - firebird? ( dev-db/firebird ) - gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) - gd-external? ( media-libs/gd ) - gdbm? ( >=sys-libs/gdbm-1.8.0 ) - gmp? ( >=dev-libs/gmp-4.1.2 ) - iconv? ( virtual/libiconv ) - imap? ( virtual/imap-c-client ) - iodbc? ( dev-db/libiodbc >=dev-db/unixODBC-1.8.13 ) - kerberos? ( virtual/krb5 ) - ldap? ( >=net-nds/openldap-1.2.11 ) - libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) - mcve? ( >=dev-libs/openssl-0.9.7 ) - mhash? ( app-crypt/mhash ) - ming? ( media-libs/ming ) - mssql? ( dev-db/freetds ) - mysql? ( dev-db/mysql ) - mysqli? ( >=dev-db/mysql-4.1 ) - ncurses? ( sys-libs/ncurses ) - nls? ( sys-devel/gettext ) - oci8-instant-client? ( dev-db/oracle-instantclient-basic ) - odbc? ( >=dev-db/unixODBC-1.8.13 ) - postgres? ( >=dev-db/libpq-7.1 ) - qdbm? ( dev-db/qdbm ) - readline? ( sys-libs/readline ) - recode? ( app-text/recode ) - sapdb? ( >=dev-db/unixODBC-1.8.13 ) - sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) - sharedmem? ( dev-libs/mm ) - simplexml? ( >=dev-libs/libxml2-2.6.8 ) - snmp? ( >=net-analyzer/net-snmp-5.2 ) - soap? ( >=dev-libs/libxml2-2.6.8 ) - solid? ( >=dev-db/unixODBC-1.8.13 ) - spell? ( >=app-text/aspell-0.50 ) - ssl? ( >=dev-libs/openssl-0.9.7 ) - sybase? ( dev-db/freetds ) - tidy? ( app-text/htmltidy ) - truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) - wddx? ( >=dev-libs/libxml2-2.6.8 ) - xml? ( >=dev-libs/libxml2-2.6.8 ) - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) - xmlreader? ( >=dev-libs/libxml2-2.6.8 ) - xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) - xpm? ( || ( x11-libs/libXpm virtual/x11 ) >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) - xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) - zlib? ( sys-libs/zlib ) - virtual/mta" +DEPEND="adabas? ( >=dev-db/unixODBC-1.8.13 ) + berkdb? ( =sys-libs/db-4* ) + birdstep? ( >=dev-db/unixODBC-1.8.13 ) + bzip2? ( app-arch/bzip2 ) + cdb? ( dev-db/cdb ) + cjk? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) + crypt? ( >=dev-libs/libmcrypt-2.4 ) + curl? ( >=net-misc/curl-7.10.5 ) + db2? ( >=dev-db/unixODBC-1.8.13 ) + dbmaker? ( >=dev-db/unixODBC-1.8.13 ) + empress? ( >=dev-db/unixODBC-1.8.13 ) + empress-bcs? ( >=dev-db/unixODBC-1.8.13 ) + esoob? ( >=dev-db/unixODBC-1.8.13 ) + exif? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) + fdftk? ( app-text/fdftk ) + firebird? ( dev-db/firebird ) + gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) + gd-external? ( media-libs/gd ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + gmp? ( >=dev-libs/gmp-4.1.2 ) + iconv? ( virtual/libiconv ) + imap? ( virtual/imap-c-client ) + iodbc? ( dev-db/libiodbc >=dev-db/unixODBC-1.8.13 ) + kerberos? ( virtual/krb5 ) + ldap? ( >=net-nds/openldap-1.2.11 ) + libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) + mcve? ( >=dev-libs/openssl-0.9.7 ) + mhash? ( app-crypt/mhash ) + ming? ( media-libs/ming ) + mssql? ( dev-db/freetds ) + mysql? ( dev-db/mysql ) + mysqli? ( >=dev-db/mysql-4.1 ) + ncurses? ( sys-libs/ncurses ) + nls? ( sys-devel/gettext ) + oci8-instant-client? ( dev-db/oracle-instantclient-basic ) + odbc? ( >=dev-db/unixODBC-1.8.13 ) + postgres? ( >=dev-db/libpq-7.1 ) + qdbm? ( dev-db/qdbm ) + readline? ( sys-libs/readline ) + recode? ( app-text/recode ) + sapdb? ( >=dev-db/unixODBC-1.8.13 ) + sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) + sharedmem? ( dev-libs/mm ) + simplexml? ( >=dev-libs/libxml2-2.6.8 ) + snmp? ( >=net-analyzer/net-snmp-5.2 ) + soap? ( >=dev-libs/libxml2-2.6.8 ) + solid? ( >=dev-db/unixODBC-1.8.13 ) + spell? ( >=app-text/aspell-0.50 ) + ssl? ( >=dev-libs/openssl-0.9.7 ) + sybase? ( dev-db/freetds ) + tidy? ( app-text/htmltidy ) + truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) + wddx? ( >=dev-libs/libxml2-2.6.8 ) + xml? ( >=dev-libs/libxml2-2.6.8 ) + xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) + xmlreader? ( >=dev-libs/libxml2-2.6.8 ) + xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) + xpm? ( || ( x11-libs/libXpm virtual/x11 ) >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) + xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) + zlib? ( sys-libs/zlib ) + virtual/mta" # libswf conflicts with ming and should not # be installed with the new PHP ebuilds -DEPEND="${DEPEND} !media-libs/libswf" +DEPEND="${DEPEND} + !media-libs/libswf" # simplistic for now -RDEPEND="${RDEPEND} ${DEPEND}" +RDEPEND="${DEPEND}" # those are only needed at compile-time DEPEND="${DEPEND} @@ -127,8 +123,7 @@ DEPEND="${DEPEND} # Additional features # # They are in PDEPEND because we need PHP installed first! -PDEPEND="${PDEPEND} - doc? ( app-doc/php-docs ) +PDEPEND="doc? ( app-doc/php-docs ) java-external? ( dev-php5/php-java-bridge ) mcve? ( dev-php5/pecl-mcve ) pdo-external? ( dev-php5/pecl-pdo ) @@ -140,6 +135,15 @@ PDEPEND="${PDEPEND} # ======================================================================== PHP_INI_FILE="php.ini" +PHP_INI_UPSTREAM="php.ini-dist" + +# ======================================================================== + +# PHP patchsets support +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2" + +# Hardened-PHP patch support +[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )" # ======================================================================== @@ -165,8 +169,8 @@ php5_1-sapi_check_use_flags() { phpconfutils_use_depend_all "xmlreader" "xml" phpconfutils_use_depend_all "xmlwriter" "xml" phpconfutils_use_depend_all "xsl" "xml" - phpconfutils_use_depend_all "xmlrpc" "iconv" - phpconfutils_use_depend_all "java-external" "session" + phpconfutils_use_depend_all "xmlrpc" "iconv" + phpconfutils_use_depend_all "java-external" "session" phpconfutils_use_depend_all "sasl" "ldap" phpconfutils_use_depend_all "mcve" "ssl" phpconfutils_use_depend_all "adabas" "odbc" @@ -216,13 +220,25 @@ php5_1-sapi_set_php_ini_dir() { php5_1-sapi_install_ini() { destdir=/usr/$(get_libdir)/php5 - # get the extension dir - PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" + # get the extension dir, if not already defined + [[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" # work out where we are installing the ini file php5_1-sapi_set_php_ini_dir - local phpinisrc=php.ini-dist + local phpinisrc=${PHP_INI_UPSTREAM} + + # Set the extension dir + einfo "Setting extension_dir in php.ini" + sed -e "s|^extension_dir .*$|extension_dir = ${PHPEXTDIR}|g" -i ${phpinisrc} + + # A patch for PHP for security + einfo "Securing fopen wrappers" + sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i ${phpinisrc} + + # Set the include path to point to where we want to find PEAR packages + einfo "Setting correct include_path" + sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php5:/usr/share/php"|' -i ${phpinisrc} dodir ${PHP_INI_DIR} insinto ${PHP_INI_DIR} @@ -253,10 +269,6 @@ php5_1-sapi_pkg_setup() { } php5_1-sapi_src_unpack() { - if [[ "${PHP_PACKAGE}" == 1 ]] ; then - unpack ${A} - fi - cd "${S}" # Change PHP branding @@ -312,15 +324,6 @@ php5_1-sapi_src_unpack() { fi fi - # fastbuild support - if useq fastbuild ; then - if [[ -n "${FASTBUILD_PATCH}" ]] && [[ -f "${WORKDIR}/${FASTBUILD_PATCH}" ]] ; then - epatch "${WORKDIR}/${FASTBUILD_PATCH}" - else - ewarn "There is no fastbuild patch available for this PHP release yet!" - fi - fi - # Fix configure scripts to correctly support Hardened-PHP einfo "Running aclocal" WANT_AUTOMAKE=1.9 aclocal --force || die "Unable to run aclocal successfully" @@ -340,9 +343,11 @@ php5_1-sapi_src_unpack() { php5_1-sapi_src_compile() { destdir=/usr/$(get_libdir)/php5 + php5_1-sapi_set_php_ini_dir cd "${S}" + phpconfutils_init my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE} --without-pear" @@ -353,7 +358,7 @@ php5_1-sapi_src_compile() { phpconfutils_extension_enable "calendar" "calendar" 1 phpconfutils_extension_disable "ctype" "ctype" 0 phpconfutils_extension_with "curl" "curl" 1 - phpconfutils_extension_with "curlwrappers" "curlwrappers" 1 + phpconfutils_extension_with "curlwrappers" "curlwrappers" 0 phpconfutils_extension_enable "dbase" "dbase" 1 phpconfutils_extension_disable "dom" "xml" 0 phpconfutils_extension_enable "exif" "exif" 1 @@ -382,29 +387,29 @@ php5_1-sapi_src_compile() { phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr" phpconfutils_extension_enable "pcntl" "pcntl" 1 phpconfutils_extension_without "pcre-regex" "pcre" 0 - phpconfutils_extension_disable "pdo" "pdo" 1 + phpconfutils_extension_disable "pdo" "pdo" 0 phpconfutils_extension_with "pgsql" "postgres" 1 - phpconfutils_extension_disable "posix" "posix" 1 + phpconfutils_extension_disable "posix" "posix" 0 phpconfutils_extension_with "pspell" "spell" 1 phpconfutils_extension_with "recode" "recode" 1 phpconfutils_extension_disable "reflection" "reflection" 0 - phpconfutils_extension_disable "simplexml" "simplexml" 1 + phpconfutils_extension_disable "simplexml" "simplexml" 0 phpconfutils_extension_enable "shmop" "sharedmem" 0 phpconfutils_extension_with "snmp" "snmp" 1 phpconfutils_extension_enable "soap" "soap" 1 phpconfutils_extension_enable "sockets" "sockets" 1 - phpconfutils_extension_disable "spl" "spl" 1 + phpconfutils_extension_disable "spl" "spl" 0 phpconfutils_extension_with "sybase" "sybase" 1 phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 phpconfutils_extension_enable "sysvmsg" "sysvipc" 1 phpconfutils_extension_enable "sysvsem" "sysvipc" 1 phpconfutils_extension_enable "sysvshm" "sysvipc" 1 phpconfutils_extension_with "tidy" "tidy" 1 - phpconfutils_extension_disable "tokenizer" "tokenizer" 1 + phpconfutils_extension_disable "tokenizer" "tokenizer" 0 phpconfutils_extension_enable "wddx" "wddx" 1 phpconfutils_extension_disable "xml" "xml" 0 - phpconfutils_extension_disable "xmlreader" "xmlreader" 1 - phpconfutils_extension_disable "xmlwriter" "xmlwriter" 1 + phpconfutils_extension_disable "xmlreader" "xmlreader" 0 + phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0 phpconfutils_extension_with "xmlrpc" "xmlrpc" 1 phpconfutils_extension_with "xsl" "xsl" 1 phpconfutils_extension_with "zlib" "zlib" 1 @@ -421,7 +426,7 @@ php5_1-sapi_src_compile() { phpconfutils_extension_with "flatfile" "flatfile" 1 phpconfutils_extension_with "gdbm" "gdbm" 1 phpconfutils_extension_with "inifile" "inifile" 1 - phpconfutils_extension_with "qdbm" "qdbm" 1 + phpconfutils_extension_with "qdbm" "qdbm" 1 # Support for the GD graphics library if useq gd-external || phpconfutils_usecheck gd-external ; then @@ -521,12 +526,12 @@ php5_1-sapi_src_compile() { # Session support if ! useq session && ! phpconfutils_usecheck session ; then - phpconfutils_extension_disable "session" "session" 1 + phpconfutils_extension_disable "session" "session" 0 else phpconfutils_extension_with "mm" "sharedmem" 0 fi - # Sqlite support + # SQLite support if ! useq sqlite && ! phpconfutils_usecheck sqlite ; then phpconfutils_extension_without "sqlite" "sqlite" 0 else @@ -544,17 +549,11 @@ php5_1-sapi_src_compile() { fi # Fix ELF-related problems - if useq pic ; then + if useq pic || phpconfutils_usecheck pic ; then einfo "Enabling PIC support" my_conf="${my_conf} --with-pic" fi - # apache2 & threads support - if useq apache2 && useq threads ; then - my_conf="${my_conf} --enable-maintainer-zts" - ewarn "Enabling ZTS for Apache2 MPM" - fi - # Catch CFLAGS problems php_check_cflags @@ -570,7 +569,7 @@ php5_1-sapi_src_compile() { tc-export CC # We don't use econf, because we need to override all of its settings - ./configure --prefix=${destdir} --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed" + ./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed" emake || die "make failed" } @@ -578,11 +577,11 @@ php5_1-sapi_src_install() { destdir=/usr/$(get_libdir)/php5 cd "${S}" + addpredict /usr/share/snmp/mibs/.index - PHP_INSTALLTARGETS="install-build install-headers install-programs" - useq sharedext && PHP_INSTALLTARGETS="${PHP_INSTALLTARGETS} install-modules" - make INSTALL_ROOT="${D}" ${PHP_INSTALLTARGETS} || die "install failed" + # Install PHP + make INSTALL_ROOT="${D}" install-build install-headers install-programs || die "make install failed" # Install missing header files if useq unicode || phpconfutils_usecheck unicode ; then @@ -593,21 +592,17 @@ php5_1-sapi_src_install() { done fi - # Get the extension dir - PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" - - # Don't forget the php.ini file - local phpinisrc=php.ini-dist - einfo "Setting extension_dir in php.ini" - sed -e "s|^extension_dir .*$|extension_dir = ${PHPEXTDIR}|g" -i ${phpinisrc} - - # A patch for PHP for security - einfo "Securing fopen wrappers" - sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i ${phpinisrc} + # Get the extension dir, if not already defined + [[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" - # Set the include path to point to where we want to find PEAR packages - einfo "Setting correct include_path" - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php5:/usr/share/php"|' -i ${phpinisrc} + # And install the modules to it + if useq sharedext ; then + for x in `ls "${S}/modules/"*.so | sort` ; do + insinto "${PHPEXTDIR}" + einfo "Installing PHP ${x/.so/} extension" + doins "modules/${x}" + done + fi # Generate the USE file for PHP phpconfutils_generate_usefile @@ -617,85 +612,7 @@ php5_1-sapi_src_install() { } 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} == 2 ]] ; 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} == 2 ]] ; 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 || phpconfutils_usecheck cli ; then - "${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 - fi - fi - - # Create the symlinks for php-cgi - if useq cgi ; then - "${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 - fi - fi - - # Create the symlinks for php-devel - "${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 - fi - + ewarn ewarn "If you have additional third party PHP extensions (such as" ewarn "dev-php5/phpdbg) you may need to recompile them now." ewarn "A new way of enabling/disabling PHP extensions was introduced" @@ -711,7 +628,7 @@ php5_1-sapi_pkg_postinst() { fi ewarn - if useq curl; then + 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 @@ -721,8 +638,8 @@ php5_1-sapi_pkg_postinst() { ewarn "With PIC enabled, your PHP installation may become slower, but" ewarn "PIC is required on Hardened-Gentoo platforms (where the USE flag" ewarn "is enabled automatically). You may also need this on other" - ewarn "configurations where you disabled TEXTRELs, for example using" - ewarn "PaX in the kernel." + ewarn "configurations where TEXTRELs are disabled, for example when using" + ewarn "certain PaX options in the kernel." ewarn ewarn "With PHP 5.1, some extensions were removed from PHP because" @@ -734,6 +651,7 @@ php5_1-sapi_pkg_postinst() { 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 substitute." + 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'" |