summaryrefslogtreecommitdiffstats
path: root/dev-lang/php/files/eblits
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /dev-lang/php/files/eblits
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'dev-lang/php/files/eblits')
-rw-r--r--dev-lang/php/files/eblits/common-v1.eblit9
-rw-r--r--dev-lang/php/files/eblits/common-v2.eblit9
-rw-r--r--dev-lang/php/files/eblits/pkg_postinst-v1.eblit76
-rw-r--r--dev-lang/php/files/eblits/pkg_postinst-v2.eblit64
-rw-r--r--dev-lang/php/files/eblits/pkg_setup-v1.eblit28
-rw-r--r--dev-lang/php/files/eblits/pkg_setup-v2.eblit16
-rw-r--r--dev-lang/php/files/eblits/pkg_setup-v3.eblit9
-rw-r--r--dev-lang/php/files/eblits/src_compile-v1.eblit60
-rw-r--r--dev-lang/php/files/eblits/src_compile-v2.eblit17
-rw-r--r--dev-lang/php/files/eblits/src_configure-v1.eblit280
-rw-r--r--dev-lang/php/files/eblits/src_configure-v2.eblit276
-rw-r--r--dev-lang/php/files/eblits/src_configure-v52.eblit279
-rw-r--r--dev-lang/php/files/eblits/src_configure-v521.eblit273
-rw-r--r--dev-lang/php/files/eblits/src_configure-v53.eblit262
-rw-r--r--dev-lang/php/files/eblits/src_configure-v54.eblit260
-rw-r--r--dev-lang/php/files/eblits/src_install-v1.eblit160
-rw-r--r--dev-lang/php/files/eblits/src_install-v2.eblit165
-rw-r--r--dev-lang/php/files/eblits/src_install-v3.eblit160
-rw-r--r--dev-lang/php/files/eblits/src_prepare-v1.eblit70
-rw-r--r--dev-lang/php/files/eblits/src_prepare-v2.eblit71
-rw-r--r--dev-lang/php/files/eblits/src_prepare-v3.eblit73
-rw-r--r--dev-lang/php/files/eblits/src_prepare-v4.eblit62
-rw-r--r--dev-lang/php/files/eblits/src_test-v1.eblit54
23 files changed, 2733 insertions, 0 deletions
diff --git a/dev-lang/php/files/eblits/common-v1.eblit b/dev-lang/php/files/eblits/common-v1.eblit
new file mode 100644
index 0000000..ae21475
--- /dev/null
+++ b/dev-lang/php/files/eblits/common-v1.eblit
@@ -0,0 +1,9 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit,v 1.2 2010/10/08 18:25:10 olemarkus Exp $
+
+php_set_ini_dir() {
+ PHP_INI_DIR="/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
diff --git a/dev-lang/php/files/eblits/common-v2.eblit b/dev-lang/php/files/eblits/common-v2.eblit
new file mode 100644
index 0000000..394dacb
--- /dev/null
+++ b/dev-lang/php/files/eblits/common-v2.eblit
@@ -0,0 +1,9 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v2.eblit,v 1.3 2010/10/08 18:25:10 olemarkus Exp $
+
+php_set_ini_dir() {
+ PHP_INI_DIR="/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
diff --git a/dev-lang/php/files/eblits/pkg_postinst-v1.eblit b/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
new file mode 100644
index 0000000..c19dd9a
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
@@ -0,0 +1,76 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_postinst-v1.eblit,v 1.4 2011/02/16 08:12:28 olemarkus Exp $
+
+eblit-php-pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP${PHP_MV}"
+ if use concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php${PHP_MV}_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php${PHP_MV}"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache2 to use mod_php
+ if use apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make Apache2 use php-${PHP_MV}, use"
+ ewarn " php-select apache2 php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if use cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make usr/bin/php point to php-${PHP_MV}, use"
+ ewarn " php-select php php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if use cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make usr/bin/php-cgi point to php-${PHP_MV}, use"
+ ewarn " php-select php-cgi php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php${PHP_MV}
+ elif [[ $exitStatus == 4 ]] ; then
+ ewarn "To make usr/bin/php-config and usr/bin/phpize point to php-${PHP_MV}, use"
+ ewarn " php-select php-devel php${PHP_MV}"
+ ewarn
+ fi
+
+ ewarn "You may have to recompile third-party extensions now"
+ ewarn "(includes every dev-php5/pecl-* package and probably others in that category)"
+ ewarn "Also make sure that you merge in the correct extension_dir ini setting for all your"
+ ewarn "php.ini files."
+ ewarn
+ ewarn "Please read the upgrade guide: http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ ewarn
+}
+
+
diff --git a/dev-lang/php/files/eblits/pkg_postinst-v2.eblit b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit
new file mode 100644
index 0000000..70bb7e8
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit
@@ -0,0 +1,64 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_postinst-v2.eblit,v 1.12 2011/02/18 09:18:38 olemarkus Exp $
+
+eblit-php-pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "You may have to recompile third-party extensions now"
+ elog "(includes every dev-php5/pecl-* package and probably others in that category)"
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
+
diff --git a/dev-lang/php/files/eblits/pkg_setup-v1.eblit b/dev-lang/php/files/eblits/pkg_setup-v1.eblit
new file mode 100644
index 0000000..f487a0b
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_setup-v1.eblit
@@ -0,0 +1,28 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v1.eblit,v 1.2 2010/07/08 22:39:52 mabi Exp $
+
+eblit-php-pkg_setup() {
+ if use concurrentmodphp || use kolab ; then
+ ewarn "concurrentmodphp and kolab are Gentoo-specific experimental"
+ ewarn "patches. Before reporting any bugs to bugs.php.net, make sure to"
+ ewarn "rebuild PHP with those USE flags disabled"
+ ewarn
+ fi
+
+ # Mail support
+ php_check_mta
+
+ # imap support
+ # if virtuals/imap-c-client goes to new style virtual, we can exchange this
+ # for proper use-deps
+ php_check_imap
+
+ # Oracle support
+ php_check_oracle_8
+
+ phpconfutils_warn_about_external_deps
+ depend.apache_pkg_setup
+}
+
+
diff --git a/dev-lang/php/files/eblits/pkg_setup-v2.eblit b/dev-lang/php/files/eblits/pkg_setup-v2.eblit
new file mode 100644
index 0000000..a5218b3
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_setup-v2.eblit
@@ -0,0 +1,16 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v2.eblit,v 1.2 2011/03/17 16:34:47 olemarkus Exp $
+
+eblit-php-pkg_setup() {
+ # Mail support
+ php_check_mta
+
+ # Oracle support
+ php_check_oracle_8
+
+ phpconfutils_warn_about_external_deps
+ depend.apache_pkg_setup
+}
+
+
diff --git a/dev-lang/php/files/eblits/pkg_setup-v3.eblit b/dev-lang/php/files/eblits/pkg_setup-v3.eblit
new file mode 100644
index 0000000..ca81906
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_setup-v3.eblit
@@ -0,0 +1,9 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v3.eblit,v 1.1 2011/07/02 15:14:41 olemarkus Exp $
+
+eblit-php-pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_compile-v1.eblit b/dev-lang/php/files/eblits/src_compile-v1.eblit
new file mode 100644
index 0000000..cb0d56c
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_compile-v1.eblit
@@ -0,0 +1,60 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_compile-v1.eblit,v 1.6 2010/08/14 19:37:31 mabi Exp $
+
+eblit-php-src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+
+ SAPI_DIR="${WORKDIR}/sapis"
+
+ for sapi in ${SAPIS} ; do
+ use "${sapi}" || continue
+
+ php_sapi_build "${sapi}"
+ php_sapi_copy "${sapi}"
+ done
+}
+
+php_sapi_build() {
+ mkdir -p "${SAPI_DIR}/$1"
+
+ cd "${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+}
+
+php_sapi_copy() {
+ local sapi="$1"
+ local source=""
+
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}.so"
+ ;;
+
+ apache2)
+ # apache2 is a special case; the necessary files
+ # (yes, multiple) are copied by make install, not
+ # by the ebuild; that's the reason, why apache2 has
+ # to be the last sapi
+ emake INSTALL_ROOT="${SAPI_DIR}/${sapi}/" install-sapi
+ ;;
+
+ *)
+ die "unhandled sapi in php_sapi_copy"
+ ;;
+ esac
+
+ if [[ "${source}" ]] ; then
+ cp "$source" "${SAPI_DIR}/$sapi" || die "Unable to copy ${sapi} SAPI"
+ fi
+}
diff --git a/dev-lang/php/files/eblits/src_compile-v2.eblit b/dev-lang/php/files/eblits/src_compile-v2.eblit
new file mode 100644
index 0000000..6e3d277
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_compile-v2.eblit
@@ -0,0 +1,17 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_compile-v2.eblit,v 1.3 2011/10/31 16:18:04 mabi Exp $
+
+eblit-php-src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+
+ for sapi in ${SAPIS} ; do
+ use "${sapi}" && php_sapi_build "${sapi}"
+ done
+}
+
+php_sapi_build() {
+ cd "${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v1.eblit b/dev-lang/php/files/eblits/src_configure-v1.eblit
new file mode 100644
index 0000000..09838bd
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v1.eblit
@@ -0,0 +1,280 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v1.eblit,v 1.8 2010/10/24 11:48:42 mabi Exp $
+
+eblit-php-src_configure() {
+ PHP_DESTDIR="/usr/$(get_libdir)/php${PHP_MV}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 1
+ phpconfutils_extension_with "curlwrappers" "curlwrappers" 0
+ phpconfutils_extension_disable "dom" "xml" 0
+ phpconfutils_extension_with "enchant" "enchant" 1 "/usr"
+ phpconfutils_extension_enable "exif" "exif" 1
+ phpconfutils_extension_disable "fileinfo" "fileinfo" 1
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_enable "intl" "intl" 1
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "onig" "unicode" 0 "/usr"
+ phpconfutils_extension_with "openssl" "ssl" 0
+ phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr"
+ phpconfutils_extension_enable "pcntl" "pcntl" 1
+ phpconfutils_extension_disable "phar" "phar" 1
+ phpconfutils_extension_disable "pdo" "pdo" 0
+ phpconfutils_extension_with "pgsql" "postgres" 1
+ phpconfutils_extension_disable "posix" "posix" 0
+ phpconfutils_extension_with "pspell" "spell" 1
+ phpconfutils_extension_with "recode" "recode" 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_without "sqlite3" "sqlite3" 1 "/usr"
+ 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" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ 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_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ if use gd-external ; then
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "gd" "gd-external" 1 "/usr"
+ else
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+ fi
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+
+ # LDAP support
+ if use ldap ; then
+ if use oci8 ; then
+ phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}"
+ else
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ phpconfutils_extension_with "adabas" "adabas" 1
+ phpconfutils_extension_with "birdstep" "birdstep" 1
+ phpconfutils_extension_with "dbmaker" "dbmaker" 1
+ phpconfutils_extension_with "empress" "empress" 1
+ if use empress ; then
+ phpconfutils_extension_with "empress-bcs" "empress-bcs" 0
+ fi
+ phpconfutils_extension_with "esoob" "esoob" 1
+ # Needed to run conftest for IBM DB2
+ [[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`"
+ phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}"
+ phpconfutils_extension_with "sapdb" "sapdb" 1
+ phpconfutils_extension_with "solid" "solid" 1
+ fi
+
+ if use iodbc ; then
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ fi
+
+ # Oracle support
+ phpconfutils_extension_with "oci8" "oci8" 1
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ if use mysqlnd ; then
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite3" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8 ; then
+ phpconfutils_extension_with "pdo-oci" "oci8" 1
+ fi
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ # SQLite support
+ if use sqlite ; then
+ phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
+ phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
+ else
+ phpconfutils_extension_without "sqlite" "sqlite" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+ if has fpm ${IUSE//+} && use fpm ; then
+ my_conf="${my_conf} --with-libevent-dir=/usr/`get_libdir`"
+ fi
+
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+ if use apache2 ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php${PHP_MV}-ldvs"
+ fi
+ fi
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v2.eblit b/dev-lang/php/files/eblits/src_configure-v2.eblit
new file mode 100644
index 0000000..ab09832
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v2.eblit
@@ -0,0 +1,276 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit,v 1.5 2011/01/05 11:23:16 mabi Exp $
+
+eblit-php-src_configure() {
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 1
+ phpconfutils_extension_with "curlwrappers" "curlwrappers" 0
+ phpconfutils_extension_disable "dom" "xml" 0
+ phpconfutils_extension_with "enchant" "enchant" 1 "/usr"
+ phpconfutils_extension_enable "exif" "exif" 1
+ phpconfutils_extension_disable "fileinfo" "fileinfo" 1
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_with "mhash" "mhash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_enable "intl" "intl" 1
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "onig" "unicode" 0 "/usr"
+ phpconfutils_extension_with "openssl" "ssl" 0
+ phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr"
+ phpconfutils_extension_enable "pcntl" "pcntl" 1
+ phpconfutils_extension_disable "phar" "phar" 1
+ phpconfutils_extension_disable "pdo" "pdo" 0
+ phpconfutils_extension_with "pgsql" "postgres" 1
+ phpconfutils_extension_disable "posix" "posix" 0
+ phpconfutils_extension_with "pspell" "spell" 1
+ phpconfutils_extension_with "recode" "recode" 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_without "sqlite3" "sqlite3" 1 "/usr"
+ phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 "/usr"
+ 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" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ 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_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ if use gd-external ; then
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "gd" "gd-external" 1 "/usr"
+ else
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+ fi
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ # Interbase/firebird support
+ if use interbase ; then
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ fi
+
+ if use firebird ; then
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ if use oci8 ; then
+ phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}"
+ else
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ phpconfutils_extension_with "adabas" "adabas" 1
+ phpconfutils_extension_with "birdstep" "birdstep" 1
+ phpconfutils_extension_with "dbmaker" "dbmaker" 1
+ phpconfutils_extension_with "empress" "empress" 1
+ if use empress ; then
+ phpconfutils_extension_with "empress-bcs" "empress-bcs" 0
+ fi
+ phpconfutils_extension_with "esoob" "esoob" 1
+ # Needed to run conftest for IBM DB2
+ [[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`"
+ phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}"
+ phpconfutils_extension_with "sapdb" "sapdb" 1
+ phpconfutils_extension_with "solid" "solid" 1
+ fi
+
+ if use iodbc ; then
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ fi
+
+ # Oracle support
+ phpconfutils_extension_with "oci8" "oci8" 1
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ if use mysqlnd ; then
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite3" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8 ; then
+ phpconfutils_extension_with "pdo-oci" "oci8" 1
+ fi
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ # SQLite support
+ if use sqlite ; then
+ phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
+ phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
+ else
+ phpconfutils_extension_without "sqlite" "sqlite" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v52.eblit b/dev-lang/php/files/eblits/src_configure-v52.eblit
new file mode 100644
index 0000000..73fecea
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v52.eblit
@@ -0,0 +1,279 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v52.eblit,v 1.5 2010/09/19 15:15:08 mabi Exp $
+
+eblit-php-src_configure() {
+ export CFLAGS="${CFLAGS} -D_GNU_SOURCE"
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 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
+ phpconfutils_extension_with "fbsql" "frontbase" 1
+ phpconfutils_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0"
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mhash" "mhash" 1
+ phpconfutils_extension_with "msql" "msql" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "ncurses" "ncurses" 1
+ phpconfutils_extension_with "openssl" "ssl" 0
+ 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" 0
+ phpconfutils_extension_with "pgsql" "postgres" 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" 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" 0
+ 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" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ 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_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ if use gd-external ; then
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "gd" "gd-external" 1 "/usr"
+ else
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+ fi
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+
+ # LDAP support
+ if use ldap ; then
+ if use oci8 ; then
+ phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}"
+ else
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ phpconfutils_extension_with "adabas" "adabas" 1
+ phpconfutils_extension_with "birdstep" "birdstep" 1
+ phpconfutils_extension_with "dbmaker" "dbmaker" 1
+ phpconfutils_extension_with "empress" "empress" 1
+ if use empress ; then
+ phpconfutils_extension_with "empress-bcs" "empress-bcs" 0
+ fi
+ phpconfutils_extension_with "esoob" "esoob" 1
+ # Needed to run conftest for IBM DB2
+ [[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`"
+ phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}"
+ phpconfutils_extension_with "sapdb" "sapdb" 1
+ phpconfutils_extension_with "solid" "solid" 1
+ fi
+
+ if use iodbc ; then
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ fi
+
+ # Oracle support
+ phpconfutils_extension_with "oci8" "oci8" 1
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8 ; then
+ phpconfutils_extension_with "pdo-oci" "oci8" 1
+ fi
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ # SQLite support
+ if use sqlite ; then
+ phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
+ phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
+ else
+ phpconfutils_extension_without "sqlite" "sqlite" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ if use pcre ; then
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+ fi
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+ if use apache2 ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php${PHP_MV}-ldvs"
+ fi
+ fi
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|embed)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ cgi)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=" --enable-cgi --enable-fastcgi"
+ use discard-path && sapi_conf+=" --enable-discard-path"
+ use force-cgi-redirect && sapi_conf+=" --enable-force-cgi-redirect"
+ else
+ sapi_conf+=" --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v521.eblit b/dev-lang/php/files/eblits/src_configure-v521.eblit
new file mode 100644
index 0000000..61e6389
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v521.eblit
@@ -0,0 +1,273 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v521.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $
+
+eblit-php-src_configure() {
+ export CFLAGS="${CFLAGS} -D_GNU_SOURCE"
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 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
+ phpconfutils_extension_with "fbsql" "frontbase" 1
+ phpconfutils_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0"
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mhash" "mhash" 1
+ phpconfutils_extension_with "msql" "msql" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "ncurses" "ncurses" 1
+ phpconfutils_extension_with "openssl" "ssl" 0
+ 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" 0
+ phpconfutils_extension_with "pgsql" "postgres" 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" 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" 0
+ 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" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ 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_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ if use gd-external ; then
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "gd" "gd-external" 1 "/usr"
+ else
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+ fi
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+
+ # LDAP support
+ if use ldap ; then
+ if use oci8 ; then
+ phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}"
+ else
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ phpconfutils_extension_with "adabas" "adabas" 1
+ phpconfutils_extension_with "birdstep" "birdstep" 1
+ phpconfutils_extension_with "dbmaker" "dbmaker" 1
+ phpconfutils_extension_with "empress" "empress" 1
+ if use empress ; then
+ phpconfutils_extension_with "empress-bcs" "empress-bcs" 0
+ fi
+ phpconfutils_extension_with "esoob" "esoob" 1
+ # Needed to run conftest for IBM DB2
+ [[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`"
+ phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}"
+ phpconfutils_extension_with "sapdb" "sapdb" 1
+ phpconfutils_extension_with "solid" "solid" 1
+ fi
+
+ if use iodbc ; then
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ fi
+
+ # Oracle support
+ phpconfutils_extension_with "oci8" "oci8" 1
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8 ; then
+ phpconfutils_extension_with "pdo-oci" "oci8" 1
+ fi
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ # SQLite support
+ if use sqlite ; then
+ phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
+ phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
+ else
+ phpconfutils_extension_without "sqlite" "sqlite" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ if use pcre ; then
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+ fi
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|embed)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ cgi)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=" --enable-cgi --enable-fastcgi"
+ use discard-path && sapi_conf+=" --enable-discard-path"
+ use force-cgi-redirect && sapi_conf+=" --enable-force-cgi-redirect"
+ else
+ sapi_conf+=" --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v53.eblit b/dev-lang/php/files/eblits/src_configure-v53.eblit
new file mode 100644
index 0000000..00b7275
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v53.eblit
@@ -0,0 +1,262 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v53.eblit,v 1.2 2011/12/23 17:16:42 olemarkus Exp $
+
+eblit-php-src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="--prefix=${PHP_DESTDIR}
+ --mandir=${PHP_DESTDIR}/man
+ --infodir=${PHP_DESTDIR}/info
+ --libdir=${PHP_DESTDIR}/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 )
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl )
+ $(use_with curlwrappers curlwrappers )
+ $(use_enable xml dom )
+ $(use_with enchant enchant /usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext )
+ $(use_with gmp gmp )
+ $(use_enable hash hash )
+ $(use_with mhash mhash )
+ $(use_with iconv iconv )
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos /usr)
+ $(use_enable xml libxml )
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt )
+ $(use_with mssql mssql )
+ $(use_with unicode onig /usr)
+ $(use_with ssl openssl )
+ $(use_with ssl openssl-dir /usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql )
+ $(use_enable posix posix )
+ $(use_with spell pspell )
+ $(use_with recode recode )
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp )
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite /usr)"
+ use sqlite && my_conf+=" $(use_enable unicode sqlite-utf8)"
+ my_conf+="
+ $(use_with sqlite3 sqlite3 /usr)
+ $(use_with sybase-ct sybase-ct /usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with tidy tidy )
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc )
+ $(use_with xsl xsl )
+ $(use_enable zip zip )
+ $(use_with zlib zlib )
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_conf+="
+ $(use_with cdb cdb )
+ $(use_with berkdb db4 )
+ $(use_enable flatfile flatfile )
+ $(use_with gdbm gdbm )
+ $(use_enable inifile inifile )
+ $(use_with qdbm qdbm )"
+
+ # Support for the GD graphics library
+ my_conf+="
+ $(use_with truetype freetype-dir /usr)
+ $(use_with truetype t1lib /usr)
+ $(use_enable cjk gd-jis-conv )
+ $(use_with gd jpeg-dir /usr)
+ $(use_with gd png-dir /usr)
+ $(use_with xpm xpm-dir /usr)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd )"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap )
+ $(use_with ssl imap-ssl )"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase /usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap )
+ $(use_with ldap-sasl ldap-sasl )"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql /usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock /var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli /usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC /usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc /usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ my_conf+="
+ $(use_with oci8-instant-client oci8 "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib")"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql /usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite3 pdo-sqlite /usr)
+ $(use_with odbc pdo-odbc unixODBC,/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci "instantclient,/usr,${OCI8IC_PKG}" )"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline )
+ $(use_with libedit libedit )"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm )"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v54.eblit b/dev-lang/php/files/eblits/src_configure-v54.eblit
new file mode 100644
index 0000000..9e6b295
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v54.eblit
@@ -0,0 +1,260 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v54.eblit,v 1.1 2011/12/18 09:00:26 olemarkus Exp $
+
+eblit-php-src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 )
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl )
+ $(use_with curlwrappers curlwrappers )
+ $(use_enable xml dom )
+ $(use_with enchant enchant /usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext )
+ $(use_with gmp gmp )
+ $(use_enable hash hash )
+ $(use_with mhash mhash )
+ $(use_with iconv iconv )
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos /usr)
+ $(use_enable xml libxml )
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt )
+ $(use_with mssql mssql )
+ $(use_with unicode onig /usr)
+ $(use_with ssl openssl )
+ $(use_with ssl openssl-dir /usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql )
+ $(use_enable posix posix )
+ $(use_with spell pspell )
+ $(use_with recode recode )
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp )
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite3 sqlite3 /usr)
+ $(use_with sybase-ct sybase-ct /usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with tidy tidy )
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc )
+ $(use_with xsl xsl )
+ $(use_enable zip zip )
+ $(use_with zlib zlib )
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_conf+="
+ $(use_with cdb cdb )
+ $(use_with berkdb db4 )
+ $(use_enable flatfile flatfile )
+ $(use_with gdbm gdbm )
+ $(use_enable inifile inifile )
+ $(use_with qdbm qdbm )"
+
+ # Support for the GD graphics library
+ my_conf+="
+ $(use_with truetype freetype-dir /usr)
+ $(use_with truetype t1lib /usr)
+ $(use_enable cjk gd-jis-conv )
+ $(use_with gd jpeg-dir /usr)
+ $(use_with gd png-dir /usr)
+ $(use_with xpm xpm-dir /usr)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd )"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap )
+ $(use_with ssl imap-ssl )"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase /usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap )
+ $(use_with ldap-sasl ldap-sasl )"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql /usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock /var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli /usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC /usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc /usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ my_conf+="
+ $(use_with oci8-instant-client oci8 "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib")"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql /usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite3 pdo-sqlite /usr)
+ $(use_with odbc pdo-odbc unixODBC,/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci "instantclient,/usr,${OCI8IC_PKG}" )"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline )
+ $(use_with libedit libedit )"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm )"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_install-v1.eblit b/dev-lang/php/files/eblits/src_install-v1.eblit
new file mode 100644
index 0000000..225c8f4
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_install-v1.eblit
@@ -0,0 +1,160 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v1.eblit,v 1.12 2010/10/27 10:33:18 olemarkus Exp $
+
+eblit-php-src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)"
+
+ # And install the modules to it
+ if use sharedext ; then
+ insinto "${extension_dir}"
+ doins "${WORKDIR}/sapis-build/${first_sapi}/modules/"*.so
+ fi
+
+ # Generate the USE file for PHP
+ phpconfutils_generate_usefile
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir /usr/share/php${PHP_MV}
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}"
+ # needed each time, php_install_ini would reset it
+ into "${PHP_DESTDIR}"
+ file=$(find "${SAPI_DIR}/${sapi}/" -type f | head -n 1)
+
+ if [[ "${file: -3}" == ".so" ]]; then
+ if [[ "${sapi}" == "apache2" ]]; then
+ insinto "${PHP_DESTDIR}/../apache2/modules/"
+ newins "${file}" "${file/*\/}"
+ else
+ dolib.so "${file}" || die "Unable to install ${sapi} sapi"
+ fi
+ else
+ dobin "${file}" || die "Unable to install ${sapi} sapi"
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php${PHP_MV}-envd" \
+ "20php${PHP_MV}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+ "${D}/etc/env.d/20php${PHP_MV}"
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${D}/usr/$(get_libdir)/php5/bin/php-config"
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to allow_url_open=Off, bug 332763
+ sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i "${phpinisrc}"
+
+ # default to expose_php=Off, bug 300695
+ sed -e 's|^expose_php .*|expose_php = Off|g' -i "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php'${PHP_MV}':/usr/share/php"|' -i "${phpinisrc}"
+
+ dodir "${PHP_INI_DIR}"
+ insinto "${PHP_INI_DIR}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ dodir "${PHP_EXT_INI_DIR}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE}"
+
+ # Install any extensions built as shared objects
+ if use sharedext ; then
+ insinto "${PHP_EXT_INI_DIR}"
+ for extension in "${D}/${extension_dir}/"*.so ; do
+ extension="${extension##*/}"
+ inifilename="${extension/.so/.ini}"
+ echo "extension=${extension}" > "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename"
+ doins "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename"
+ dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}"
+ done
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "apache2" ]] ; then
+ if use concurrentmodphp ; then
+ einfo "Installing Apache2 config file 70_mod_php${PHP_MV}_concurr.conf"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/70_mod_php${PHP_MV}_concurr.conf-apache2" \
+ "70_mod_php${PHP_MV}_concurr.conf"
+
+ # Put the ld version script in the right place so
+ # it's always accessible
+ insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/"
+ doins "${FILESDIR}/php${PHP_MV}-ldvs"
+ else
+ einfo "Installing Apache2 config 70_mod_php${PHP_MV}.conf"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
+ "70_mod_php${PHP_MV}.conf"
+ fi
+ fi
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ epatch "${FILESDIR}/php-fpm-gentooified.patch"
+ insinto ${PHP_INI_DIR}
+ doins "${WORKDIR}/sapis-build/fpm/sapi/fpm/php-fpm.conf"
+ dodir "/etc/init.d"
+ insinto "/etc/init.d"
+ newins "${FILESDIR}/php-fpm.init" "php-fpm"
+ fperms 755 "/etc/init.d/php-fpm"
+ dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm"
+ fi
+}
diff --git a/dev-lang/php/files/eblits/src_install-v2.eblit b/dev-lang/php/files/eblits/src_install-v2.eblit
new file mode 100644
index 0000000..b0dd1ae
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_install-v2.eblit
@@ -0,0 +1,165 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit,v 1.14 2011/12/16 09:02:43 olemarkus Exp $
+
+eblit-php-src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)"
+
+ # And install the modules to it
+ if use sharedext ; then
+ insinto "${extension_dir}"
+ doins "${WORKDIR}/sapis-build/${first_sapi}/modules/"*.so
+ fi
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir /usr/share/php${PHP_MV}
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}"
+ # needed each time, php_install_ini would reset it
+ into "${PHP_DESTDIR}"
+ file=$(find "${SAPI_DIR}/${sapi}/" -type f | head -n 1)
+
+ if [[ "${file: -3}" == ".so" ]]; then
+ if [[ "${sapi}" == "apache2" ]]; then
+ insinto "${PHP_DESTDIR}/apache2/"
+ newins "${file}" "${file/*\/}"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ dolib.so "${file}" || die "Unable to install ${sapi} sapi"
+ fi
+ else
+ dobin "${file}" || die "Unable to install ${sapi} sapi"
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" \
+ "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+ "${D}/etc/env.d/20php${SLOT}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${D}/etc/env.d/20php${SLOT}"
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${D}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to allow_url_open=Off, bug 332763
+ sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i "${phpinisrc}"
+
+ # default to expose_php=Off, bug 300695
+ sed -e 's|^expose_php .*|expose_php = Off|g' -i "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php'${PHP_MV}':/usr/share/php"|' -i "${phpinisrc}"
+
+ dodir "${PHP_INI_DIR}"
+ insinto "${PHP_INI_DIR}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE}"
+
+ # Install any extensions built as shared objects
+ if use sharedext ; then
+ insinto "${PHP_EXT_INI_DIR}"
+ for extension in "${D}/${extension_dir}/"*.so ; do
+ extension="${extension##*/}"
+ inifilename="${extension/.so/.ini}"
+ echo "extension=${extension}" > "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename"
+ doins "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename"
+ dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}"
+ done
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "apache2" ]] ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
+ "70_mod_php${PHP_MV}.conf"
+ fi
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ [[ -z ${PHP_FPM_INIT_VER} ]] && PHP_FPM_INIT_VER=3
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto ${PHP_INI_DIR}
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+ dodir "/etc/init.d"
+ insinto "/etc/init.d"
+ newinitd "${FILESDIR}/php-fpm-r${PHP_FPM_INIT_VER}.init" "php-fpm"
+ #dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm"
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${D}/etc/php-fpm.conf.default" ]] && rm "${D}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+ if [[ ${SLOT} == '5.2' ]]; then
+ newdoc php.ini-dist php.ini-development
+ newdoc php.ini-recommended php.ini-production
+ fi
+
+ if [[ ${SLOT} == '5.3' ]]; then
+ dodoc php.ini-development
+ dodoc php.ini-production
+ fi
+
+}
diff --git a/dev-lang/php/files/eblits/src_install-v3.eblit b/dev-lang/php/files/eblits/src_install-v3.eblit
new file mode 100644
index 0000000..4c3ba24
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_install-v3.eblit
@@ -0,0 +1,160 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v3.eblit,v 1.5 2011/11/08 18:14:08 olemarkus Exp $
+
+eblit-php-src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir /usr/share/php${PHP_MV}
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}"
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR}/apache2/"
+ newins ".libs/libphp5.so" "libphp${PHP_MV}.so"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ into "${PHP_DESTDIR}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}.so"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source: -3}" == ".so" ]]; then
+ dolib.so "${source}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" \
+ "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+ "${D}/etc/env.d/20php${SLOT}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${D}/etc/env.d/20php${SLOT}"
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${D}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php'${PHP_MV}':/usr/share/php"|' -i "${phpinisrc}"
+
+ dodir "${PHP_INI_DIR}"
+ insinto "${PHP_INI_DIR}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE}"
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "apache2" ]] ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
+ "70_mod_php${PHP_MV}.conf"
+ fi
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ [[ -z ${PHP_FPM_INIT_VER} ]] && PHP_FPM_INIT_VER=3
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto ${PHP_INI_DIR}
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+ dodir "/etc/init.d"
+ insinto "/etc/init.d"
+ newinitd "${FILESDIR}/php-fpm-r${PHP_FPM_INIT_VER}.init" "php-fpm"
+ #dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm"
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${D}/etc/php-fpm.conf.default" ]] && rm "${D}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+ if [[ ${SLOT} == '5.2' ]]; then
+ newdoc php.ini-dist php.ini-development
+ newdoc php.ini-recommended php.ini-production
+ fi
+
+ if [[ ${SLOT} == '5.3' ]]; then
+ dodoc php.ini-development
+ dodoc php.ini-production
+ fi
+
+}
diff --git a/dev-lang/php/files/eblits/src_prepare-v1.eblit b/dev-lang/php/files/eblits/src_prepare-v1.eblit
new file mode 100644
index 0000000..d6856b8
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_prepare-v1.eblit
@@ -0,0 +1,70 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v1.eblit,v 1.3 2010/06/01 16:17:05 mabi Exp $
+
+eblit-php-src_prepare() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # Concurrent PHP Apache2 modules support
+ use apache2 && use concurrentmodphp && \
+ epatch "${WORKDIR}/${PV}/opt/concurrent_apache_modules.patch"
+
+ # kolab support (support for imap annotations)
+ use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch"
+
+ # Change PHP branding
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+ # Apply generic PHP patches
+ EPATCH_SOURCE="${WORKDIR}/${PV}/generic" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch
+
+ # 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 || die "Failed to fix server platform name"
+
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
+
+ # 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"
+ sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
+ || die "Failed to fix heimdal crypt library reference"
+ fi
+
+ # Suhosin support
+ if use suhosin ; then
+ epatch "${WORKDIR}/${SUHOSIN_PATCH}"
+ fi
+
+ # rebuild the whole autotools stuff as we are heavily patching it
+ # (suhosin, fastbuild, ...)
+
+ # eaclocal doesn't accept --force, so we try to force re-generation
+ # this way
+ rm aclocal.m4
+
+ # work around divert() issues with newer autoconf, bug #281697
+ if has_version '>=sys-devel/autoconf-2.64' ; then
+ sed -i -r \
+ -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \
+ $(grep -l divert $(find . -name '*.m4') configure.in) || die
+ fi
+ eautoreconf --force -W no-cross
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_prepare-v2.eblit b/dev-lang/php/files/eblits/src_prepare-v2.eblit
new file mode 100644
index 0000000..b6bd72e
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_prepare-v2.eblit
@@ -0,0 +1,71 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v2.eblit,v 1.3 2011/01/05 11:23:16 mabi Exp $
+
+eblit-php-src_prepare() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # kolab support (support for imap annotations)
+ use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch"
+
+ # Change PHP branding
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+ # Apply generic PHP patches
+ EPATCH_SOURCE="${WORKDIR}/${PV}/generic" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch
+
+ # 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 || die "Failed to fix server platform name"
+
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
+
+ # 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"
+ sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
+ || die "Failed to fix heimdal crypt library reference"
+ fi
+
+ # Suhosin support
+ if [[ -n $SUHOSIN_VERSION ]] ; then
+ if use suhosin ; then
+ epatch "${WORKDIR}/${SUHOSIN_PATCH}"
+ fi
+ else
+ ewarn "Please note that this version of PHP does not yet come with a suhosin patch"
+ fi
+
+
+ # rebuild the whole autotools stuff as we are heavily patching it
+ # (suhosin, fastbuild, ...)
+
+ # eaclocal doesn't accept --force, so we try to force re-generation
+ # this way
+ rm aclocal.m4
+
+ # work around divert() issues with newer autoconf, bug #281697
+ if has_version '>=sys-devel/autoconf-2.64' ; then
+ sed -i -r \
+ -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \
+ $(grep -l divert $(find . -name '*.m4') configure.in) || die
+ fi
+ eautoreconf --force -W no-cross
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_prepare-v3.eblit b/dev-lang/php/files/eblits/src_prepare-v3.eblit
new file mode 100644
index 0000000..7e270f9
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_prepare-v3.eblit
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v3.eblit,v 1.1 2011/03/13 09:48:06 olemarkus Exp $
+
+eblit-php-src_prepare() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # kolab support (support for imap annotations)
+ use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch"
+
+ # Change PHP branding
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+ # Apply generic PHP patches
+ EPATCH_SOURCE="${WORKDIR}/${PV}/generic" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch
+
+ # 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 || die "Failed to fix server platform name"
+
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
+
+ # 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"
+ sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
+ || die "Failed to fix heimdal crypt library reference"
+ fi
+
+ # Suhosin support
+ if [[ -n $SUHOSIN_VERSION ]] ; then
+ if use suhosin ; then
+ epatch "${WORKDIR}/${SUHOSIN_PATCH}"
+ fi
+ else
+ ewarn "Please note that this version of PHP does not yet come with a suhosin patch"
+ fi
+
+ #Add user patches #357637
+ epatch_user
+
+ # rebuild the whole autotools stuff as we are heavily patching it
+ # (suhosin, fastbuild, ...)
+
+ # eaclocal doesn't accept --force, so we try to force re-generation
+ # this way
+ rm aclocal.m4
+
+ # work around divert() issues with newer autoconf, bug #281697
+ if has_version '>=sys-devel/autoconf-2.64' ; then
+ sed -i -r \
+ -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \
+ $(grep -l divert $(find . -name '*.m4') configure.in) || die
+ fi
+ eautoreconf --force -W no-cross
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_prepare-v4.eblit b/dev-lang/php/files/eblits/src_prepare-v4.eblit
new file mode 100644
index 0000000..cab740f
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_prepare-v4.eblit
@@ -0,0 +1,62 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v4.eblit,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
+
+eblit-php-src_prepare() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # kolab support (support for imap annotations)
+ use kolab && epatch "${WORKDIR}/patches/opt/imap-kolab-annotations.patch"
+
+ # Change PHP branding
+ # Get the alpha/beta/rc version
+ local ver=$(get_version_component_range 4)
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-${ver}-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+ # Apply generic PHP patches
+ EPATCH_SOURCE="${WORKDIR}/patches/generic" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch
+
+ # 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 || die "Failed to fix server platform name"
+
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
+
+ # 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"
+ sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
+ || die "Failed to fix heimdal crypt library reference"
+ fi
+
+ # Suhosin support
+ if [[ -n $SUHOSIN_VERSION ]] ; then
+ if use suhosin ; then
+ epatch "${WORKDIR}/${SUHOSIN_PATCH}"
+ fi
+ else
+ ewarn "Please note that this version of PHP does not yet come with a suhosin patch"
+ fi
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+}
diff --git a/dev-lang/php/files/eblits/src_test-v1.eblit b/dev-lang/php/files/eblits/src_test-v1.eblit
new file mode 100644
index 0000000..95ebc7d
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_test-v1.eblit
@@ -0,0 +1,54 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_test-v1.eblit,v 1.2 2010/08/09 10:47:57 mabi Exp $
+
+eblit-php-src_test() {
+ vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ if [[ ! -x "${WORKDIR}/sapis/cli/php" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${WORKDIR}/sapis/cli/php"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
+ fi
+
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+