summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/files/eblits/src_configure-v54.eblit')
-rw-r--r--dev-lang/php/files/eblits/src_configure-v54.eblit261
1 files changed, 261 insertions, 0 deletions
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..7ca5ab2
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v54.eblit
@@ -0,0 +1,261 @@
+# 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="${EPREFIX}/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 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv )
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite3 sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc "${EPREFIX}"/usr)
+ $(use_with xsl xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(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 ${EPREFIX}/usr)
+ $(use_with berkdb db4 ${EPREFIX}/usr)
+ $(use_enable flatfile flatfile )
+ $(use_with gdbm gdbm ${EPREFIX}/usr)
+ $(use_enable inifile inifile )
+ $(use_with qdbm qdbm ${EPREFIX}/usr)"
+
+ # Support for the GD graphics library
+ my_conf+="
+ $(use_with truetype freetype-dir ${EPREFIX}/usr)
+ $(use_with truetype t1lib ${EPREFIX}/usr)
+ $(use_enable cjk gd-jis-conv )
+ $(use_with gd jpeg-dir ${EPREFIX}/usr)
+ $(use_with gd png-dir ${EPREFIX}/usr)
+ $(use_with xpm xpm-dir ${EPREFIX}/usr)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd ${EPREFIX}/usr)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ 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 ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock ${EPREFIX}/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 ${EPREFIX}/usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/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,${EPREFIX}/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 ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite3 pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci instantclient,${EPREFIX}/usr,${OCI8IC_PKG} )"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ 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=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/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=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}