commit:     c6fd6c07c3c92aa7d27816749383c77ab025e07d
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 19 16:35:41 2018 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Jan 20 05:01:15 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6fd6c07

dev-lang/php: new revisions to fix shared memory and threads support.

Our PHP ebuilds used the "sharedmem" flag to conflate two ./configure
flags, namely --enable-shmop and --with-mm. The former is the "shared
memory" extension, and the latter enables the dev-libs/mm backend for
session storage. This commit separates the two:

  * The old USE=sharedmem enables the shared memory extension
  * The new USE=session-mm enables the dev-libs/mm session backend

The nascent session-mm flag depends on USE=session being set.

Additionally, we had a REQUIRED_USE constraint prohibiting USE=sharedmem
from being set at the same time as USE=threads. This turns out to be due
to an incompatibility between the --with-mm and --enable-maintainer-zts
flags, the latter of which is toggled by USE=threads. So in the new
revisions, we have a REQUIRED_USE constraint that blocks USE=threads
when USE=session-mm is set.

Thanks are due to Xiami who reported and fixed all of these issues in
bug 644922.

Reported-by: Xiami <i <AT> f2light.com>
Closes: https://bugs.gentoo.org/644922
Package-Manager: Portage-2.3.13, Repoman-2.3.3

 dev-lang/php/metadata.xml                          |  7 +++-
 .../php/{php-7.2.1.ebuild => php-7.1.13-r1.ebuild} | 38 ++++++++--------------
 .../php/{php-7.2.1.ebuild => php-7.2.1-r1.ebuild}  |  8 ++---
 3 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
index efe0a57aaa9..cca331a3fa1 100644
--- a/dev-lang/php/metadata.xml
+++ b/dev-lang/php/metadata.xml
@@ -38,7 +38,12 @@
     <flag name="phpdbg">
       Enable the PHP Debug Command Line SAPI (like gdb for php)
     </flag>
-    <flag name="sodium">Enable support for crypto through libsodium</flag>
+    <flag name="session-mm">
+      Include <pkg>dev-libs/mm</pkg> support for session storage
+    </flag>
+    <flag name="sodium">
+      Enable support for crypto through <pkg>dev-libs/libsodium</pkg>
+    </flag>
     <flag name="tokyocabinet">
       Enable support for <pkg>dev-db/tokyocabinet</pkg> db backend</flag>
     <flag name="xmlreader">Enable XMLReader support</flag>

diff --git a/dev-lang/php/php-7.2.1.ebuild b/dev-lang/php/php-7.1.13-r1.ebuild
similarity index 94%
copy from dev-lang/php/php-7.2.1.ebuild
copy to dev-lang/php/php-7.1.13-r1.ebuild
index ec498c6c441..d86a5f9bccb 100644
--- a/dev-lang/php/php-7.2.1.ebuild
+++ b/dev-lang/php/php-7.1.13-r1.ebuild
@@ -28,17 +28,17 @@ IUSE="${IUSE}
        ${SAPIS/cli/+cli}
        threads"
 
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
-       coverage +ctype curl debug
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
+       coverage crypt +ctype curl debug
        enchant exif +fileinfo +filter firebird
        flatfile ftp gd gdbm gmp +hash +iconv imap inifile
-       intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
+       intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
        mhash mssql mysql mysqli nls
        oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
-       readline recode selinux +session sharedmem
-       +simplexml snmp soap sockets sodium spell sqlite ssl
-       sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx 
webp
-       +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
+       readline recode selinux +session session-mm sharedmem
+       +simplexml snmp soap sockets spell sqlite ssl
+       sysvipc systemd test tidy +tokenizer truetype unicode wddx webp
+       +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
 
 # The supported (that is, autodetected) versions of BDB are listed in
 # the ./configure script. Other versions *work*, but we need to stick to
@@ -49,7 +49,6 @@ COMMON_DEPEND="
        acl? ( sys-apps/acl )
        apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
                <www-servers/apache-2.4[threads=] ) )
-       argon2? ( app-crypt/argon2:= )
        berkdb? ( || (  sys-libs/db:5.3
                                        sys-libs/db:5.1
                                        sys-libs/db:4.8
@@ -59,6 +58,7 @@ COMMON_DEPEND="
        bzip2? ( app-arch/bzip2:0= )
        cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
        coverage? ( dev-util/lcov )
+       crypt? ( >=dev-libs/libmcrypt-2.4 )
        curl? ( >=net-misc/curl-7.10.5 )
        enchant? ( app-text/enchant )
        firebird? ( dev-db/firebird )
@@ -73,7 +73,6 @@ COMMON_DEPEND="
        ldap? ( >=net-nds/openldap-1.2.11 )
        ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
        libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
-       lmdb? ( dev-db/lmdb:= )
        mssql? ( dev-db/freetds[mssql] )
        nls? ( sys-devel/gettext )
        oci8-instant-client? ( dev-db/oracle-instantclient-basic )
@@ -82,11 +81,10 @@ COMMON_DEPEND="
        qdbm? ( dev-db/qdbm )
        readline? ( sys-libs/readline:0= )
        recode? ( app-text/recode )
-       sharedmem? ( dev-libs/mm )
+       session-mm? ( dev-libs/mm )
        simplexml? ( >=dev-libs/libxml2-2.6.8 )
        snmp? ( >=net-analyzer/net-snmp-5.2 )
        soap? ( >=dev-libs/libxml2-2.6.8 )
-       sodium? ( dev-libs/libsodium:= )
        spell? ( >=app-text/aspell-0.50 )
        sqlite? ( >=dev-db/sqlite-3.7.6.3 )
        ssl? (
@@ -94,7 +92,6 @@ COMMON_DEPEND="
                libressl? ( dev-libs/libressl:0= )
        )
        tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
-       tokyocabinet? ( dev-db/tokyocabinet )
        truetype? ( =media-libs/freetype-2* )
        unicode? ( dev-libs/oniguruma:= )
        wddx? ( >=dev-libs/libxml2-2.6.8 )
@@ -106,7 +103,6 @@ COMMON_DEPEND="
        xpm? ( x11-libs/libXpm )
        xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
        zip? ( sys-libs/zlib:0= )
-       zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
        zlib? ( sys-libs/zlib:0= )
 "
 
@@ -145,9 +141,8 @@ REQUIRED_USE="
        qdbm? ( !gdbm )
        readline? ( !libedit )
        recode? ( !imap !mysqli !mysql )
-       sharedmem? ( !threads )
+       session-mm? ( session !threads )
        mysql? ( || ( mysqli pdo ) )
-       zip-encryption? ( zip )
 "
 
 PHP_MV="$(get_major_version)"
@@ -243,7 +238,6 @@ src_configure() {
 
        our_conf+=(
                $(use_with acl fpm-acl)
-               $(use_with argon2 password-argon2 "${EPREFIX}/usr")
                $(use_enable bcmath bcmath)
                $(use_with bzip2 bz2 "${EPREFIX}/usr")
                $(use_enable calendar calendar)
@@ -269,6 +263,7 @@ src_configure() {
                $(use_enable xml libxml)
                $(use_with xml libxml-dir "${EPREFIX}/usr")
                $(use_enable unicode mbstring)
+               $(use_with crypt mcrypt "${EPREFIX}/usr")
                $(use_with unicode onig "${EPREFIX}/usr")
                $(use_with ssl openssl "${EPREFIX}/usr")
                $(use_with ssl openssl-dir "${EPREFIX}/usr")
@@ -285,7 +280,6 @@ src_configure() {
                $(use_with snmp snmp "${EPREFIX}/usr")
                $(use_enable soap soap)
                $(use_enable sockets sockets)
-               $(use_with sodium sodium "${EPREFIX}/usr")
                $(use_with sqlite sqlite3 "${EPREFIX}/usr")
                $(use_enable sysvipc sysvmsg)
                $(use_enable sysvipc sysvsem)
@@ -300,14 +294,13 @@ src_configure() {
                $(use_with xmlrpc xmlrpc)
                $(use_with xslt xsl "${EPREFIX}/usr")
                $(use_enable zip zip)
-               $(use_with zip-encryption libzip "${EPREFIX}/usr")
                $(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 || use lmdb || use tokyocabinet ; then
+               || use qdbm ; then
                our_conf+=( "--enable-dba${shared}" )
        fi
 
@@ -319,7 +312,6 @@ src_configure() {
                $(use_with gdbm gdbm "${EPREFIX}/usr")
                $(use_enable inifile inifile)
                $(use_with qdbm qdbm "${EPREFIX}/usr")
-               $(use_with lmdb lmdb "${EPREFIX}/usr")
        )
 
        # Support for the GD graphics library
@@ -396,7 +388,7 @@ src_configure() {
 
        # Session support
        if use session ; then
-               our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+               our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
        else
                our_conf+=( $(use_enable session session) )
        fi
@@ -407,13 +399,9 @@ src_configure() {
        # we use the system copy of pcre
        # --with-pcre-regex affects ext/pcre
        # --with-pcre-dir affects ext/filter and ext/zip
-       # --with-pcre-valgrind cannot be enabled with system pcre
-       # Many arches don't support pcre-jit
        our_conf+=(
                --with-pcre-regex="${EPREFIX}/usr"
                --with-pcre-dir="${EPREFIX}/usr"
-               --without-pcre-valgrind
-               --without-pcre-jit
        )
 
        # Catch CFLAGS problems

diff --git a/dev-lang/php/php-7.2.1.ebuild b/dev-lang/php/php-7.2.1-r1.ebuild
similarity index 99%
rename from dev-lang/php/php-7.2.1.ebuild
rename to dev-lang/php/php-7.2.1-r1.ebuild
index ec498c6c441..7a3dc1d3e71 100644
--- a/dev-lang/php/php-7.2.1.ebuild
+++ b/dev-lang/php/php-7.2.1-r1.ebuild
@@ -35,7 +35,7 @@ IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
        intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
        mhash mssql mysql mysqli nls
        oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
-       readline recode selinux +session sharedmem
+       readline recode selinux +session session-mm sharedmem
        +simplexml snmp soap sockets sodium spell sqlite ssl
        sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx 
webp
        +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
@@ -82,7 +82,7 @@ COMMON_DEPEND="
        qdbm? ( dev-db/qdbm )
        readline? ( sys-libs/readline:0= )
        recode? ( app-text/recode )
-       sharedmem? ( dev-libs/mm )
+       session-mm? ( dev-libs/mm )
        simplexml? ( >=dev-libs/libxml2-2.6.8 )
        snmp? ( >=net-analyzer/net-snmp-5.2 )
        soap? ( >=dev-libs/libxml2-2.6.8 )
@@ -145,7 +145,7 @@ REQUIRED_USE="
        qdbm? ( !gdbm )
        readline? ( !libedit )
        recode? ( !imap !mysqli !mysql )
-       sharedmem? ( !threads )
+       session-mm? ( session !threads )
        mysql? ( || ( mysqli pdo ) )
        zip-encryption? ( zip )
 "
@@ -396,7 +396,7 @@ src_configure() {
 
        # Session support
        if use session ; then
-               our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+               our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
        else
                our_conf+=( $(use_enable session session) )
        fi

Reply via email to