commit: 824097f4c1c36cc4afea4b45f052d1788204dde9
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 23 03:26:30 2016 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Jan 23 03:27:11 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=824097f4
dev-lang/php: revision the 5.6 and 7.0 series to set --localstatedir.
The php-fpm.conf file uses the @localstatedir <AT> passed to ./configure
as its default prefix for some settings. The econf default for
localstatedir is ${EPREFIX}/var/lib, but php-fpm.conf is expecting
${EPREFIX}/var, so we pass that instead. This ensures that the default
log location (e.g. /var/log) actually exists.
Gentoo-Bug: 572002
Package-Manager: portage-2.2.26
.../php/{php-7.0.2.ebuild => php-5.6.17-r1.ebuild} | 73 +++++++++++++---------
.../php/{php-7.0.2.ebuild => php-7.0.2-r1.ebuild} | 5 +-
2 files changed, 46 insertions(+), 32 deletions(-)
diff --git a/dev-lang/php/php-7.0.2.ebuild b/dev-lang/php/php-5.6.17-r1.ebuild
similarity index 93%
copy from dev-lang/php/php-7.0.2.ebuild
copy to dev-lang/php/php-5.6.17-r1.ebuild
index 76a0c13..8addecc 100644
--- a/dev-lang/php/php-7.0.2.ebuild
+++ b/dev-lang/php/php-5.6.17-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -12,7 +12,7 @@ function php_get_uri ()
{
case "${1}" in
"php-pre")
- echo "http://downloads.php.net/ab/${2}"
+ echo "http://downloads.php.net/dsp/${2}"
;;
"php")
echo "http://www.php.net/distributions/${2}"
@@ -56,7 +56,7 @@ LICENSE="PHP-3"
S="${WORKDIR}/${PHP_P}"
# We can build the following SAPIs in the given order
-SAPIS="embed cli cgi fpm apache2 phpdbg"
+SAPIS="embed cli cgi fpm apache2"
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
IUSE="${IUSE}
@@ -68,15 +68,15 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
enchant exif frontbase +fileinfo +filter firebird
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
- mysql mysqli nls
+ 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
- sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
+ sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
DEPEND="
- >=app-eselect/eselect-php-0.8.2[apache2?,fpm?]
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
>=dev-libs/libpcre-8.32[unicode]
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
<www-servers/apache-2.4[threads=] ) )"
@@ -117,6 +117,11 @@ DEPEND="${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 ) )
+ mssql? ( dev-db/freetds[mssql] )
+ libmysqlclient? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
nls? ( sys-devel/gettext )
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
odbc? ( >=dev-db/unixODBC-1.8.13 )
@@ -131,9 +136,11 @@ DEPEND="${DEPEND}
spell? ( >=app-text/aspell-0.50 )
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
ssl? ( dev-libs/openssl:0 )
+ sybase-ct? ( dev-db/freetds )
tidy? ( app-text/htmltidy )
truetype? (
=media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
!gd? (
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
)
@@ -174,15 +181,18 @@ REQUIRED_USE="
ldap-sasl? ( ldap )
mhash? ( hash )
phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
qdbm? ( !gdbm )
readline? ( !libedit )
- recode? ( !imap !mysqli )
+ recode? ( !imap !mysql !mysqli )
sharedmem? ( !threads )
- mysql? ( || ( mysqli pdo ) )
-
- || ( cli cgi fpm apache2 embed phpdbg )"
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
RDEPEND="${DEPEND}"
@@ -253,11 +263,9 @@ php_install_ini() {
# SAPI-specific handling
if [[ "${sapi}" == "fpm" ]] ; then
- einfo "Installing FPM config files php-fpm.conf and www.conf"
+ einfo "Installing FPM config file php-fpm.conf"
insinto "${PHP_INI_DIR#${EPREFIX}}"
doins sapi/fpm/php-fpm.conf
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
- doins sapi/fpm/www.conf
fi
dodoc php.ini-development
@@ -280,6 +288,14 @@ src_prepare() {
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 \
+ || die
+
# 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 \
@@ -299,16 +315,6 @@ src_prepare() {
# http://bugs.php.net/bug.php?id=48795, bug #343481
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
fi
-
- # In php-7.x, the FPM pool configuration files have been split off
- # of the main config. By default the pool config files go in
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
- # we'll install the pool configuration file "www.conf" there.
- php_set_ini_dir fpm
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
- sapi/fpm/php-fpm.conf.in \
- || die 'failed to move the include directory in php-fpm.conf'
}
src_configure() {
@@ -317,12 +323,15 @@ src_configure() {
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
local our_conf=(
--prefix="${PHP_DESTDIR}"
--mandir="${PHP_DESTDIR}/man"
--infodir="${PHP_DESTDIR}/info"
--libdir="${PHP_DESTDIR}/lib"
--with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
--without-pear
$(use_enable threads maintainer-zts)
)
@@ -353,6 +362,7 @@ src_configure() {
$(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")
@@ -370,6 +380,7 @@ src_configure() {
$(use_enable soap soap)
$(use_enable sockets sockets)
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
$(use_enable sysvipc sysvmsg)
$(use_enable sysvipc sysvsem)
$(use_enable sysvipc sysvshm)
@@ -406,14 +417,13 @@ src_configure() {
# Support for the GD graphics library
our_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")
+ $(use_with vpx vpx-dir "${EPREFIX}/usr")
)
- if use vpx; then
- our_conf+=( --with-vpx-dir="${EPREFIX}/usr" )
- fi
# enable gd last, so configure can pick up the previous settings
our_conf+=( $(use_with gd gd) )
@@ -439,7 +449,10 @@ src_configure() {
# MySQL support
local mysqllib="mysqlnd"
local mysqlilib="mysqlnd"
+ use libmysqlclient && mysqllib="${EPREFIX}/usr"
+ use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
+ our_conf+=( $(use_with mysql mysql "${mysqllib}") )
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
@@ -459,6 +472,7 @@ src_configure() {
# PDO support
if use pdo ; then
our_conf+=(
+ $(use_with mssql pdo-dblib)
$(use_with mysql pdo-mysql "${mysqllib}")
$(use_with postgres pdo-pgsql)
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
@@ -521,7 +535,7 @@ src_configure() {
for sapi in $SAPIS ; do
case "$sapi" in
- cli|cgi|embed|fpm|phpdbg)
+ cli|cgi|embed|fpm)
if [[ "${one_sapi}" == "${sapi}" ]] ;
then
sapi_conf+=( "--enable-${sapi}"
)
else
@@ -602,7 +616,7 @@ src_install() {
# We're specifically not using emake
install-sapi as libtool
# may cause unnecessary relink failures (see
bug #351266)
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
- newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ newins ".libs/libphp5$(get_libname)" \
"libphp${PHP_MV}$(get_libname)"
keepdir "/usr/$(get_libdir)/apache2/modules"
else
@@ -622,9 +636,6 @@ src_install() {
embed)
source="libs/libphp${PHP_MV}$(get_libname)"
;;
- phpdbg)
- source="sapi/phpdbg/phpdbg"
- ;;
*)
die "unhandled sapi in
src_install"
;;
diff --git a/dev-lang/php/php-7.0.2.ebuild b/dev-lang/php/php-7.0.2-r1.ebuild
similarity index 99%
rename from dev-lang/php/php-7.0.2.ebuild
rename to dev-lang/php/php-7.0.2-r1.ebuild
index 76a0c13..45daa6d 100644
--- a/dev-lang/php/php-7.0.2.ebuild
+++ b/dev-lang/php/php-7.0.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -317,12 +317,15 @@ src_configure() {
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
local our_conf=(
--prefix="${PHP_DESTDIR}"
--mandir="${PHP_DESTDIR}/man"
--infodir="${PHP_DESTDIR}/info"
--libdir="${PHP_DESTDIR}/lib"
--with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
--without-pear
$(use_enable threads maintainer-zts)
)