]> gitweb.michael.orlitzky.com - mjo-overlay.git/blobdiff - dev-lang/php/php-5.6.4-r1.ebuild
Use "+=" consistently for appending to $my_conf.
[mjo-overlay.git] / dev-lang / php / php-5.6.4-r1.ebuild
index 7526e6a651392e7a0e7b93aec78646711a9ebbc3..f7a181aae946f88a7da6ff584ed3fd785d03d02c 100644 (file)
@@ -69,12 +69,14 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
        flatfile ftp gd gdbm gmp +hash +iconv imap inifile
        intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
        mssql mysql libmysqlclient mysqli nls
-       oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
-       readline recode selinux +session sharedmem
-       +simplexml snmp soap sockets spell sqlite ssl
+       oci8-instant-client odbc +opcache pcntl pdo pdo-dblib pdo-mysql pdo-oci
+       pdo-odbc pdo-pgsql pdo-sqlite +phar +posix postgres qdbm readline recode
+       selinux +session sharedmem +simplexml snmp soap sockets spell sqlite ssl
        sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
        +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
 
+# See REQUIRED_USE for an explanation of why we duplicate dependencies
+# for USE=pdo-foo.
 DEPEND="
        >=app-admin/eselect-php-0.7.1-r3[apache2?,fpm?]
        >=dev-libs/libpcre-8.32[unicode]
@@ -111,11 +113,17 @@ DEPEND="
        mssql? ( dev-db/freetds[mssql] )
        libmysqlclient? (
                mysql? ( virtual/mysql )
-               mysqli? ( >=virtual/mysql-4.1 )
+               mysqli? ( virtual/mysql )
        )
        nls? ( sys-devel/gettext )
        oci8-instant-client? ( dev-db/oracle-instantclient-basic )
        odbc? ( >=dev-db/unixODBC-1.8.13 )
+       pdo-dblib? ( dev-db/freetds[mssql] )
+       pdo-oci? ( dev-db/oracle-instantclient-basic )
+       pdo-odbc? ( >=dev-db/unixODBC-1.8.13 )
+       pdo-mysql? ( virtual/mysql )
+       pdo-pgsql? ( dev-db/postgresql )
+       pdo-sqlite? ( >=dev-db/sqlite-3.7.6.3 )
        postgres? ( dev-db/postgresql )
        qdbm? ( dev-db/qdbm )
        readline? ( sys-libs/readline )
@@ -155,6 +163,13 @@ DEPEND="
 
 php="=${CATEGORY}/${PF}"
 
+# All of the pdo-foo USE flags could require USE=foo, but this has an
+# unwanted side effect. USE=mysql, for example, also enables the old
+# deprecated mysql database driver. We would like it to be possible to
+# install pdo-mysql without the deprecated mysql driver, so we don't
+# require USE=mysql with USE=pdo-mysql. This means that we have to
+# reproduce the mysql? (...) dependencies for pdo-mysql in (R)DEPEND
+# above.
 REQUIRED_USE="
        truetype? ( gd )
        vpx? ( gd )
@@ -175,9 +190,15 @@ REQUIRED_USE="
        libmysqlclient? ( || (
                mysql
                mysqli
-               pdo
+               pdo-mysql
        ) )
 
+       pdo-dblib? ( pdo )
+       pdo-oci? ( pdo )
+       pdo-odbc? ( pdo )
+       pdo-mysql? ( pdo )
+       pdo-pgsql? ( pdo )
+       pdo-sqlite? ( pdo )
        qdbm? ( !gdbm )
        readline? ( !libedit )
        recode? ( !imap !mysql !mysqli )
@@ -342,68 +363,82 @@ src_configure() {
        #                             extension           USE flag        shared
        my_conf+="
        $(use_enable bcmath bcmath )
-       $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+       $(use_with   bzip2 bz2 "${EPREFIX}"/usr)
        $(use_enable calendar calendar )
+       $(use_with   crypt mcrypt "${EPREFIX}"/usr)
        $(use_enable ctype ctype )
-       $(use_with curl curl "${EPREFIX}"/usr)
-       $(use_enable xml dom )
-       $(use_with enchant enchant "${EPREFIX}"/usr)
+       $(use_with   curl curl "${EPREFIX}"/usr)
+       $(use_enable debug debug )
+       $(use_with   enchant enchant "${EPREFIX}"/usr)
        $(use_enable exif exif )
        $(use_enable fileinfo fileinfo )
        $(use_enable filter filter )
+       $(use_with   firebird interbase "${EPREFIX}"/usr)
        $(use_enable ftp ftp )
-       $(use_with nls gettext "${EPREFIX}"/usr)
-       $(use_with gmp gmp "${EPREFIX}"/usr)
+       $(use_with   gmp gmp "${EPREFIX}"/usr)
        $(use_enable hash hash )
-       $(use_with mhash mhash "${EPREFIX}"/usr)
-       $(use_with iconv iconv $(use elibc_glibc || echo "${EPREFIX}"/usr))
+       $(use_with   iconv iconv $(use elibc_glibc || echo "${EPREFIX}"/usr))
+       $(use_with   imap imap "${EPREFIX}"/usr)
        $(use_enable intl intl )
+       $(use_with   iodbc iodbc "${EPREFIX}"/usr)
        $(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_with   kerberos kerberos "${EPREFIX}"/usr)
+       $(use_with   ldap ldap "${EPREFIX}"/usr)
+       $(use_with   ldap-sasl ldap-sasl "${EPREFIX}"/usr)
+       $(use_with   libedit libedit "${EPREFIX}"/usr)
+       $(use_with   mhash mhash "${EPREFIX}"/usr)
+       $(use_with   mssql mssql "${EPREFIX}"/usr)
+       $(use_with   nls gettext "${EPREFIX}"/usr)
+       $(use_with   oci8-instant-client oci8)
+       $(use_with   odbc unixODBC "${EPREFIX}"/usr)
+       $(use_enable opcache opcache )
        $(use_enable pcntl pcntl )
-       $(use_enable phar phar )
        $(use_enable pdo pdo )
-       $(use_enable opcache opcache )
-       $(use_with postgres pgsql "${EPREFIX}"/usr)
+       $(use_with   pdo-dblib pdo-dblib )
+       $(use_with   pdo-oci pdo-oci )
+       $(use_with   pdo-odbc pdo-odbc unixODBC,"${EPREFIX}"/usr)
+       $(use_with   pdo-pgsql pdo-pgsql )
+       $(use_with   pdo-sqlite pdo-sqlite "${EPREFIX}"/usr)
+       $(use_enable phar phar )
        $(use_enable posix posix )
-       $(use_with spell pspell "${EPREFIX}"/usr)
-       $(use_with recode recode "${EPREFIX}"/usr)
-       $(use_enable simplexml simplexml )
+       $(use_with   postgres pgsql "${EPREFIX}"/usr)
+       $(use_with   spell pspell "${EPREFIX}"/usr)
+       $(use_with   readline readline "${EPREFIX}"/usr)
+       $(use_with   recode recode "${EPREFIX}"/usr)
        $(use_enable sharedmem shmop )
-       $(use_with snmp snmp "${EPREFIX}"/usr)
+       $(use_enable simplexml simplexml )
+       $(use_with   snmp snmp "${EPREFIX}"/usr)
        $(use_enable soap soap )
        $(use_enable sockets sockets )
-       $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
-       $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+       $(use_with   sqlite sqlite3 "${EPREFIX}"/usr)
+       $(use_with   ssl openssl "${EPREFIX}"/usr)
+       $(use_with   ssl openssl-dir "${EPREFIX}"/usr)
+       $(use_with   sybase-ct sybase-ct "${EPREFIX}"/usr)
+       $(use_with   systemd fpm-systemd)
        $(use_enable sysvipc sysvmsg )
        $(use_enable sysvipc sysvsem )
        $(use_enable sysvipc sysvshm )
-       $(use_with systemd fpm-systemd)
-       $(use_with tidy tidy "${EPREFIX}"/usr)
+       $(use_with   tidy tidy "${EPREFIX}"/usr)
        $(use_enable tokenizer tokenizer )
+       $(use_enable unicode mbstring )
+       $(use_with   unicode onig "${EPREFIX}"/usr)
        $(use_enable wddx wddx )
+       $(use_enable xml dom )
+       $(use_enable xml libxml )
+       $(use_with   xml libxml-dir "${EPREFIX}"/usr)
        $(use_enable xml xml )
        $(use_enable xmlreader xmlreader )
+       $(use_with   xmlrpc xmlrpc)
        $(use_enable xmlwriter xmlwriter )
-       $(use_with xmlrpc xmlrpc)
-       $(use_with xslt xsl "${EPREFIX}"/usr)
+       $(use_with   xslt xsl "${EPREFIX}"/usr)
        $(use_enable zip zip )
-       $(use_with zlib zlib "${EPREFIX}"/usr)
-       $(use_enable debug debug )"
+       $(use_with   zlib zlib "${EPREFIX}"/usr)"
 
        # DBA support
        if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
                || use qdbm ; then
-               my_conf="${my_conf} --enable-dba${shared}"
+               my_conf+=" --enable-dba${shared}"
        fi
 
        # DBA drivers support
@@ -428,25 +463,9 @@ src_configure() {
        my_conf+="
        $(use_with gd gd)"
 
-       # IMAP support
+       # IMAP SSL 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)"
+               my_conf+=" $(use_with ssl imap-ssl ${EPREFIX}/usr)"
        fi
 
        # MySQL support
@@ -458,49 +477,14 @@ src_configure() {
        my_conf+=" $(use_with mysql mysql $mysqllib)"
        my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
 
-       local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
-       if use mysql ; then
-               my_conf+="${mysqlsock}"
-       elif use mysqli ; then
-               my_conf+="${mysqlsock}"
-       fi
+       # MySQL PDO support
+       my_conf+=" $(use_with pdo-mysql pdo-mysql ${mysqllib})"
 
-       # ODBC support
-       if use odbc ; then
-               my_conf+="
-               $(use_with odbc unixODBC ${EPREFIX}/usr)"
+       # If MySQL is enabled in any way, pass --with-mysql-sock to ./configure.
+       if use mysql || use mysqli || use pdo-mysql ; then
+               my_conf+=" --with-mysql-sock=${EPREFIX}/var/run/mysqld/mysqld.sock"
        fi
 
-       if use iodbc ; then
-               my_conf+="
-               $(use_with iodbc iodbc ${EPREFIX}/usr)"
-       fi
-
-       # Oracle support
-       if use oci8-instant-client ; then
-               my_conf+="
-               $(use_with oci8-instant-client oci8)"
-       fi
-
-       # PDO support
-       if use pdo ; then
-               my_conf+="
-               $(use_with mssql pdo-dblib )
-               $(use_with mysql pdo-mysql ${mysqllib})
-               $(use_with postgres pdo-pgsql )
-               $(use_with sqlite 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)"
-               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+="
@@ -511,12 +495,12 @@ src_configure() {
        fi
 
        # Use pic for shared modules such as apache2's mod_php
-       my_conf="${my_conf} --with-pic"
+       my_conf+=" --with-pic"
 
        # 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"
+       my_conf+=" --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
 
        # Catch CFLAGS problems
        # Fixes bug #14067.
@@ -524,7 +508,7 @@ src_configure() {
        replace-cpu-flags "k6*" "i586"
 
        # Support user-passed configuration parameters
-       my_conf="${my_conf} ${EXTRA_ECONF:-}"
+       my_conf+=" ${EXTRA_ECONF:-}"
 
        # Support the Apache2 extras, they must be set globally for all
        # SAPIs to work correctly, especially for external PHP extensions