[dev-lang/php] pull multiple build fixes from fedora for 5.6
parent
96105506f0
commit
d631e46ab4
@ -0,0 +1 @@
|
||||
DIST php-5.6.38.tar.xz 12467408 BLAKE2B d9ee47e193d80bce8a9ed6ffd3eb13e67ba6d1f597ece2803cd92fddc6245f46cdfe644d6cda12a6bb409b92c1fe748610cc5eb43dea0bf063fda81188ee8b3d SHA512 66c51a8e954b1496c0bad0a2864a2a1537dd1c1c573b553991d6d5bce85fc7bc340e56a21109bc5e9a03799e703204b980b569c95a5c0a1bddb01c8947e7a682
|
@ -0,0 +1,2 @@
|
||||
MANPATH="/usr/lib/php5/man/"
|
||||
CONFIG_PROTECT_MASK="/etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/"
|
@ -0,0 +1,12 @@
|
||||
diff -aurN a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
|
||||
--- a/ext/mbstring/php_mbregex.c 2018-03-28 17:28:58.000000000 -0400
|
||||
+++ b/ext/mbstring/php_mbregex.c 2018-04-04 12:53:23.268296387 -0400
|
||||
@@ -454,7 +454,7 @@
|
||||
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
|
||||
|
||||
found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
|
||||
- if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) {
|
||||
+ if (found == FAILURE || onig_get_options(*rc) != options || onig_get_encoding(*rc) != enc || onig_get_syntax(*rc) != syntax) {
|
||||
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
|
||||
onig_error_code_to_str(err_str, err_code, &err_info);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str);
|
@ -0,0 +1,65 @@
|
||||
--- a/ext/openssl/openssl.c 2018-04-04 14:26:34.583000000 +0000
|
||||
+++ b/ext/openssl/openssl.c 2018-04-04 14:20:16.907000000 +0000
|
||||
@@ -73,7 +73,7 @@
|
||||
#ifdef HAVE_OPENSSL_MD2_H
|
||||
#define OPENSSL_ALGO_MD2 4
|
||||
#endif
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
#define OPENSSL_ALGO_DSS1 5
|
||||
#endif
|
||||
#define OPENSSL_ALGO_SHA224 6
|
||||
@@ -560,7 +560,7 @@
|
||||
#endif
|
||||
|
||||
/* {{{ OpenSSL compatibility functions and macros */
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
#define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa
|
||||
#define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh
|
||||
#define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa
|
||||
@@ -677,7 +677,7 @@
|
||||
return M_ASN1_STRING_data(asn1);
|
||||
}
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
|
||||
static int X509_get_signature_nid(const X509 *x)
|
||||
{
|
||||
@@ -1324,7 +1324,7 @@
|
||||
mdtype = (EVP_MD *) EVP_md2();
|
||||
break;
|
||||
#endif
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
case OPENSSL_ALGO_DSS1:
|
||||
mdtype = (EVP_MD *) EVP_dss1();
|
||||
break;
|
||||
@@ -1450,7 +1450,7 @@
|
||||
#ifdef HAVE_OPENSSL_MD2_H
|
||||
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT);
|
||||
#endif
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT);
|
||||
#endif
|
||||
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_SHA224", OPENSSL_ALGO_SHA224, CONST_CS|CONST_PERSISTENT);
|
||||
@@ -3620,7 +3620,7 @@
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
/* Due to changes in OpenSSL 1.1 related to locking when decoding CSR,
|
||||
* the pub key is not changed after assigning. It means if we pass
|
||||
* a private key, it will be returned including the private part.
|
||||
@@ -3631,7 +3631,7 @@
|
||||
/* Retrieve the public key from the CSR */
|
||||
tpubkey = X509_REQ_get_pubkey(csr);
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
/* We need to free the CSR as it was duplicated */
|
||||
X509_REQ_free(csr);
|
||||
#endif
|
@ -0,0 +1,17 @@
|
||||
diff -up ext/recode/config9.m4.recode ext/recode/config9.m4
|
||||
--- ext/recode/config9.m4.recode 2008-12-02 00:30:21.000000000 +0100
|
||||
+++ ext/recode/config9.m4 2009-02-28 09:46:50.000000000 +0100
|
||||
@@ -4,13 +4,6 @@ dnl
|
||||
|
||||
dnl Check for extensions with which Recode can not work
|
||||
if test "$PHP_RECODE" != "no"; then
|
||||
- test "$PHP_IMAP" != "no" && recode_conflict="$recode_conflict imap"
|
||||
-
|
||||
- if test -n "$MYSQL_LIBNAME"; then
|
||||
- PHP_CHECK_LIBRARY($MYSQL_LIBNAME, hash_insert, [
|
||||
- recode_conflict="$recode_conflict mysql"
|
||||
- ])
|
||||
- fi
|
||||
|
||||
if test -n "$recode_conflict"; then
|
||||
AC_MSG_ERROR([recode extension can not be configured together with:$recode_conflict])
|
@ -0,0 +1,42 @@
|
||||
From d3466a04345b31dfc62d94fe994b40321a6418ec Mon Sep 17 00:00:00 2001
|
||||
From: Michael Orlitzky <michael@orlitzky.com>
|
||||
Date: Thu, 29 Sep 2016 15:43:06 -0400
|
||||
Subject: [PATCH 1/1] Zend/acinclude.m4: don't warn about >=bison-3.0.1
|
||||
versions.
|
||||
|
||||
The PHP configure script will emit a warning if it thinks your bison
|
||||
version is insufficient:
|
||||
|
||||
WARNING: This bison version is not supported for regeneration of
|
||||
the Zend/PHP parsers (found: 3.0, min: 204, excluded: 3.0).
|
||||
|
||||
However, there is an error in the test that causes it to treat all
|
||||
3.0.x versions as if they were 3.0. The result is that users get
|
||||
warned about a perfectly acceptable version of bison.
|
||||
|
||||
This patch is meant only for Gentoo, where we can require a working
|
||||
version of bison (something newer than 3.0.1). Having done so, this
|
||||
patch removes the check and the WARNING.
|
||||
|
||||
Gentoo-Bug: 593278
|
||||
PHP-Bug: 69055
|
||||
---
|
||||
Zend/acinclude.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
|
||||
index 7fa8c99..9d6cb1d 100644
|
||||
--- a/Zend/acinclude.m4
|
||||
+++ b/Zend/acinclude.m4
|
||||
@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# non-working versions, e.g. "3.0 3.2";
|
||||
# remove "none" when introducing the first incompatible bison version an
|
||||
# separate any following additions by spaces
|
||||
- bison_version_exclude="3.0"
|
||||
+ bison_version_exclude=""
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
--
|
||||
2.7.3
|
||||
|
@ -0,0 +1,169 @@
|
||||
Adapted for 5.6 from
|
||||
|
||||
From 397bedcc7c3545510a22b7db8dc6444e0a05b085 Mon Sep 17 00:00:00 2001
|
||||
From: Remi Collet <remi@php.net>
|
||||
Date: Wed, 16 Nov 2016 10:45:59 +0100
|
||||
Subject: [PATCH] Fixed bug #73512 Fails to find firebird headers
|
||||
|
||||
- use fb_config output instead of relying on hardoded path
|
||||
|
||||
diff -up ./ext/interbase/config.m4.fb_config ./ext/interbase/config.m4
|
||||
--- ./ext/interbase/config.m4.fb_config 2017-03-17 08:58:57.061708947 +0100
|
||||
+++ ./ext/interbase/config.m4 2017-03-17 09:04:53.389584385 +0100
|
||||
@@ -3,39 +3,54 @@ PHP_ARG_WITH(interbase,for InterBase sup
|
||||
install directory [/usr/interbase]])
|
||||
|
||||
if test "$PHP_INTERBASE" != "no"; then
|
||||
- if test "$PHP_INTERBASE" = "yes"; then
|
||||
- IBASE_INCDIR=/usr/interbase/include
|
||||
- IBASE_LIBDIR=/usr/interbase/lib
|
||||
+
|
||||
+ AC_PATH_PROG(FB_CONFIG, fb_config, no)
|
||||
+
|
||||
+ if test -x "$FB_CONFIG" && test "$PHP_INTERBASE" = "yes"; then
|
||||
+ AC_MSG_CHECKING(for libfbconfig)
|
||||
+ FB_CFLAGS=`$FB_CONFIG --cflags`
|
||||
+ FB_LIBDIR=`$FB_CONFIG --libs`
|
||||
+ FB_VERSION=`$FB_CONFIG --version`
|
||||
+ AC_MSG_RESULT(version $FB_VERSION)
|
||||
+ PHP_EVAL_LIBLINE($FB_LIBDIR, INTERBASE_SHARED_LIBADD)
|
||||
+ PHP_EVAL_INCLINE($FB_CFLAGS)
|
||||
+
|
||||
else
|
||||
- IBASE_INCDIR=$PHP_INTERBASE/include
|
||||
- IBASE_LIBDIR=$PHP_INTERBASE/$PHP_LIBDIR
|
||||
- fi
|
||||
+ if test "$PHP_INTERBASE" = "yes"; then
|
||||
+ IBASE_INCDIR=/usr/interbase/include
|
||||
+ IBASE_LIBDIR=/usr/interbase/lib
|
||||
+ else
|
||||
+ IBASE_INCDIR=$PHP_INTERBASE/include
|
||||
+ IBASE_LIBDIR=$PHP_INTERBASE/$PHP_LIBDIR
|
||||
+ fi
|
||||
|
||||
- PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
|
||||
- [
|
||||
- IBASE_LIBNAME=fbclient
|
||||
- ], [
|
||||
- PHP_CHECK_LIBRARY(gds, isc_detach_database,
|
||||
+ PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
|
||||
[
|
||||
- IBASE_LIBNAME=gds
|
||||
+ IBASE_LIBNAME=fbclient
|
||||
], [
|
||||
- PHP_CHECK_LIBRARY(ib_util, isc_detach_database,
|
||||
+ PHP_CHECK_LIBRARY(gds, isc_detach_database,
|
||||
[
|
||||
- IBASE_LIBNAME=ib_util
|
||||
+ IBASE_LIBNAME=gds
|
||||
], [
|
||||
- AC_MSG_ERROR([libgds, libib_util or libfbclient not found! Check config.log for more information.])
|
||||
+ PHP_CHECK_LIBRARY(ib_util, isc_detach_database,
|
||||
+ [
|
||||
+ IBASE_LIBNAME=ib_util
|
||||
+ ], [
|
||||
+ AC_MSG_ERROR([libgds, libib_util or libfbclient not found! Check config.log for more information.])
|
||||
+ ], [
|
||||
+ -L$IBASE_LIBDIR
|
||||
+ ])
|
||||
], [
|
||||
-L$IBASE_LIBDIR
|
||||
])
|
||||
], [
|
||||
-L$IBASE_LIBDIR
|
||||
])
|
||||
- ], [
|
||||
- -L$IBASE_LIBDIR
|
||||
- ])
|
||||
|
||||
- PHP_ADD_LIBRARY_WITH_PATH($IBASE_LIBNAME, $IBASE_LIBDIR, INTERBASE_SHARED_LIBADD)
|
||||
- PHP_ADD_INCLUDE($IBASE_INCDIR)
|
||||
+ PHP_ADD_LIBRARY_WITH_PATH($IBASE_LIBNAME, $IBASE_LIBDIR, INTERBASE_SHARED_LIBADD)
|
||||
+ PHP_ADD_INCLUDE($IBASE_INCDIR)
|
||||
+ fi
|
||||
+
|
||||
AC_DEFINE(HAVE_IBASE,1,[ ])
|
||||
PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared)
|
||||
PHP_SUBST(INTERBASE_SHARED_LIBADD)
|
||||
diff -up ./ext/pdo_firebird/config.m4.fb_config ./ext/pdo_firebird/config.m4
|
||||
--- ./ext/pdo_firebird/config.m4.fb_config 2017-01-19 01:17:47.000000000 +0100
|
||||
+++ ./ext/pdo_firebird/config.m4 2017-03-17 08:58:57.061708947 +0100
|
||||
@@ -8,43 +8,56 @@ if test "$PHP_PDO_FIREBIRD" != "no"; the
|
||||
AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
|
||||
fi
|
||||
|
||||
- if test "$PHP_PDO_FIREBIRD" = "yes"; then
|
||||
- FIREBIRD_INCDIR=
|
||||
- FIREBIRD_LIBDIR=
|
||||
- FIREBIRD_LIBDIR_FLAG=
|
||||
+ AC_PATH_PROG(FB_CONFIG, fb_config, no)
|
||||
+
|
||||
+ if test -x "$FB_CONFIG" && test "$PHP_PDO_FIREBIRD" = "yes"; then
|
||||
+ AC_MSG_CHECKING(for libfbconfig)
|
||||
+ FB_CFLAGS=`$FB_CONFIG --cflags`
|
||||
+ FB_LIBDIR=`$FB_CONFIG --libs`
|
||||
+ FB_VERSION=`$FB_CONFIG --version`
|
||||
+ AC_MSG_RESULT(version $FB_VERSION)
|
||||
+ PHP_EVAL_LIBLINE($FB_LIBDIR, PDO_FIREBIRD_SHARED_LIBADD)
|
||||
+ PHP_EVAL_INCLINE($FB_CFLAGS)
|
||||
+
|
||||
else
|
||||
- FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include
|
||||
- FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR
|
||||
- FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
|
||||
- fi
|
||||
+ if test "$PHP_PDO_FIREBIRD" = "yes"; then
|
||||
+ FIREBIRD_INCDIR=
|
||||
+ FIREBIRD_LIBDIR=
|
||||
+ FIREBIRD_LIBDIR_FLAG=
|
||||
+ else
|
||||
+ FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include
|
||||
+ FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR
|
||||
+ FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
|
||||
+ fi
|
||||
|
||||
- PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
|
||||
- [
|
||||
- FIREBIRD_LIBNAME=fbclient
|
||||
- ], [
|
||||
- PHP_CHECK_LIBRARY(gds, isc_detach_database,
|
||||
+ PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
|
||||
[
|
||||
- FIREBIRD_LIBNAME=gds
|
||||
+ FIREBIRD_LIBNAME=fbclient
|
||||
], [
|
||||
- PHP_CHECK_LIBRARY(ib_util, isc_detach_database,
|
||||
+ PHP_CHECK_LIBRARY(gds, isc_detach_database,
|
||||
[
|
||||
- FIREBIRD_LIBNAME=ib_util
|
||||
+ FIREBIRD_LIBNAME=gds
|
||||
], [
|
||||
- AC_MSG_ERROR([libfbclient, libgds or libib_util not found! Check config.log for more information.])
|
||||
+ PHP_CHECK_LIBRARY(ib_util, isc_detach_database,
|
||||
+ [
|
||||
+ FIREBIRD_LIBNAME=ib_util
|
||||
+ ], [
|
||||
+ AC_MSG_ERROR([libfbclient, libgds or libib_util not found! Check config.log for more information.])
|
||||
+ ], [
|
||||
+ $FIREBIRD_LIBDIR_FLAG
|
||||
+ ])
|
||||
], [
|
||||
$FIREBIRD_LIBDIR_FLAG
|
||||
])
|
||||
], [
|
||||
$FIREBIRD_LIBDIR_FLAG
|
||||
])
|
||||
- ], [
|
||||
- $FIREBIRD_LIBDIR_FLAG
|
||||
- ])
|
||||
+ PHP_ADD_LIBRARY_WITH_PATH($FIREBIRD_LIBNAME, $FIREBIRD_LIBDIR, PDO_FIREBIRD_SHARED_LIBADD)
|
||||
+ PHP_ADD_INCLUDE($FIREBIRD_INCDIR)
|
||||
+ fi
|
||||
|
||||
PHP_CHECK_PDO_INCLUDES
|
||||
|
||||
- PHP_ADD_LIBRARY_WITH_PATH($FIREBIRD_LIBNAME, $FIREBIRD_LIBDIR, PDO_FIREBIRD_SHARED_LIBADD)
|
||||
- PHP_ADD_INCLUDE($FIREBIRD_INCDIR)
|
||||
AC_DEFINE(HAVE_PDO_FIREBIRD,1,[ ])
|
||||
PHP_NEW_EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c, $ext_shared,,-I$pdo_cv_inc_path)
|
||||
PHP_SUBST(PDO_FIREBIRD_SHARED_LIBADD)
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=The PHP FastCGI Process Manager
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
PIDFile=/run/php-fpm/php-fpm-%I.pid
|
||||
ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=The PHP FastCGI Process Manager
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
PIDFile=/run/php-fpm/php-fpm-%I.pid
|
||||
ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -0,0 +1,233 @@
|
||||
--- a/ext/gd/config.m4 2018-04-24 11:09:54.000000000 -0400
|
||||
+++ b/ext/gd/config.m4 2018-05-04 15:18:49.867283889 -0400
|
||||
@@ -186,21 +186,36 @@
|
||||
AC_DEFUN([PHP_GD_FREETYPE2],[
|
||||
if test "$PHP_FREETYPE_DIR" != "no"; then
|
||||
|
||||
- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
||||
- if test -f "$i/bin/freetype-config"; then
|
||||
- FREETYPE2_DIR=$i
|
||||
- FREETYPE2_CONFIG="$i/bin/freetype-config"
|
||||
- break
|
||||
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
+ AC_MSG_CHECKING(for freetype2)
|
||||
+
|
||||
+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
|
||||
+
|
||||
+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
|
||||
+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
|
||||
+ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
|
||||
+ FREETYPE2_DIR="found"
|
||||
+
|
||||
+ AC_MSG_RESULT(from pkgconfig: version $FREETYPE2_VERSION found)
|
||||
+ else
|
||||
+
|
||||
+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
||||
+ if test -f "$i/bin/freetype-config"; then
|
||||
+ FREETYPE2_DIR=$i
|
||||
+ FREETYPE2_CONFIG="$i/bin/freetype-config"
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ if test -z "$FREETYPE2_DIR"; then
|
||||
+ AC_MSG_ERROR([freetype-config not found.])
|
||||
fi
|
||||
- done
|
||||
|
||||
- if test -z "$FREETYPE2_DIR"; then
|
||||
- AC_MSG_ERROR([freetype-config not found.])
|
||||
+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
|
||||
+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
|
||||
+ AC_MSG_RESULT(found via freetype-config)
|
||||
fi
|
||||
|
||||
- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
|
||||
- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
|
||||
-
|
||||
PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
|
||||
PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
|
||||
--- a/configure 2018-04-24 11:10:05.000000000 -0400
|
||||
+++ b/configure 2018-05-04 15:18:45.626367913 -0400
|
||||
@@ -34348,21 +34348,79 @@
|
||||
|
||||
if test "$PHP_FREETYPE_DIR" != "no"; then
|
||||
|
||||
- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
||||
- if test -f "$i/bin/freetype-config"; then
|
||||
- FREETYPE2_DIR=$i
|
||||
- FREETYPE2_CONFIG="$i/bin/freetype-config"
|
||||
- break
|
||||
+ # Extract the first word of "pkg-config", so it can be a program name with args.
|
||||
+set dummy pkg-config; ac_word=$2
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
+$as_echo_n "checking for $ac_word... " >&6; }
|
||||
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ case $PKG_CONFIG in
|
||||
+ [\\/]* | ?:[\\/]*)
|
||||
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||
+ ;;
|
||||
+ *)
|
||||
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
+for as_dir in $PATH
|
||||
+do
|
||||
+ IFS=$as_save_IFS
|
||||
+ test -z "$as_dir" && as_dir=.
|
||||
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
+ break 2
|
||||
+ fi
|
||||
+done
|
||||
+ done
|
||||
+IFS=$as_save_IFS
|
||||
+
|
||||
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
|
||||
+ ;;
|
||||
+esac
|
||||
+fi
|
||||
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
||||
+if test -n "$PKG_CONFIG"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
||||
+$as_echo "$PKG_CONFIG" >&6; }
|
||||
+else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
+$as_echo "no" >&6; }
|
||||
+fi
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
|
||||
+$as_echo_n "checking for freetype2... " >&6; }
|
||||
+
|
||||
+
|
||||
+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
|
||||
+
|
||||
+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
|
||||
+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
|
||||
+ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
|
||||
+ FREETYPE2_DIR="found"
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE2_VERSION found" >&5
|
||||
+$as_echo "from pkgconfig: version $FREETYPE2_VERSION found" >&6; }
|
||||
+ else
|
||||
+
|
||||
+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
||||
+ if test -f "$i/bin/freetype-config"; then
|
||||
+ FREETYPE2_DIR=$i
|
||||
+ FREETYPE2_CONFIG="$i/bin/freetype-config"
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ if test -z "$FREETYPE2_DIR"; then
|
||||
+ as_fn_error $? "freetype-config not found." "$LINENO" 5
|
||||
fi
|
||||
- done
|
||||
|
||||
- if test -z "$FREETYPE2_DIR"; then
|
||||
- as_fn_error $? "freetype-config not found." "$LINENO" 5
|
||||
+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
|
||||
+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
|
||||
+$as_echo "found via freetype-config" >&6; }
|
||||
fi
|
||||
|
||||
- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
|
||||
- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
|
||||
-
|
||||
|
||||
for ac_i in $FREETYPE2_CFLAGS; do
|
||||
case $ac_i in
|
||||
@@ -36019,21 +36076,78 @@
|
||||
|
||||
if test "$PHP_FREETYPE_DIR" != "no"; then
|
||||
|
||||
- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
||||
- if test -f "$i/bin/freetype-config"; then
|
||||
- FREETYPE2_DIR=$i
|
||||
- FREETYPE2_CONFIG="$i/bin/freetype-config"
|
||||
- break
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
|
||||
+$as_echo_n "checking for freetype2... " >&6; }
|
||||
+ # Extract the first word of "pkg-config", so it can be a program name with args.
|
||||
+set dummy pkg-config; ac_word=$2
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
+$as_echo_n "checking for $ac_word... " >&6; }
|
||||
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ case $PKG_CONFIG in
|
||||
+ [\\/]* | ?:[\\/]*)
|
||||
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||
+ ;;
|
||||
+ *)
|
||||
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
+for as_dir in $PATH
|
||||
+do
|
||||
+ IFS=$as_save_IFS
|
||||
+ test -z "$as_dir" && as_dir=.
|
||||
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
+ break 2
|
||||
+ fi
|
||||
+done
|
||||
+ done
|
||||
+IFS=$as_save_IFS
|
||||
+
|
||||
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
|
||||
+ ;;
|
||||
+esac
|
||||
+fi
|
||||
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
||||
+if test -n "$PKG_CONFIG"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
||||
+$as_echo "$PKG_CONFIG" >&6; }
|
||||
+else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
+$as_echo "no" >&6; }
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
|
||||
+
|
||||
+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
|
||||
+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
|
||||
+ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE_VERSON found" >&5
|
||||
+$as_echo "from pkgconfig: version $FREETYPE_VERSON found" >&6; }
|
||||
+ else
|
||||
+
|
||||
+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
||||
+ if test -f "$i/bin/freetype-config"; then
|
||||
+ FREETYPE2_DIR=$i
|
||||
+ FREETYPE2_CONFIG="$i/bin/freetype-config"
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ if test -z "$FREETYPE2_DIR"; then
|
||||
+ as_fn_error $? "freetype-config not found." "$LINENO" 5
|
||||
fi
|
||||
- done
|
||||
|
||||
- if test -z "$FREETYPE2_DIR"; then
|
||||
- as_fn_error $? "freetype-config not found." "$LINENO" 5
|
||||
+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
|
||||
+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
|
||||
+$as_echo "found via freetype-config" >&6; }
|
||||
fi
|
||||
|
||||
- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
|
||||
- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
|
||||
-
|
||||
|
||||
for ac_i in $FREETYPE2_CFLAGS; do
|
||||
case $ac_i in
|
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>php-bugs@gentoo.org</email>
|
||||
<name>PHP</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="argon2">Enable password hashing algorithm from <pkg>app-crypt/argon2</pkg></flag>
|
||||
<flag name="cli">Enable CLI SAPI</flag>
|
||||
<flag name="coverage">
|
||||
Include gcov symbols for test coverage and lcov reports. Only
|
||||
useful for extension developers, and requires GCC.
|
||||
</flag>
|
||||
<flag name="embed">Enable embed SAPI </flag>
|
||||
<flag name="enchant">Add supports Enchant spelling library. </flag>
|
||||
<flag name="fileinfo"> Add fileinfo extension support</flag>
|
||||
<flag name="filter">Add filter extension support</flag>
|
||||
<flag name="fpm">Enable the FastCGI Process Manager SAPI</flag>
|
||||
<flag name="gd">Adds support for gd (bundled with PHP)</flag>
|
||||
<flag name="hash">Enable the hash extension</flag>
|
||||
<flag name="json">Enable JSON support</flag>
|
||||
<flag name="ldap-sasl">Add SASL support for the PHP LDAP extension</flag>
|
||||
<flag name="libmysqlclient">
|
||||
Use libmyslclient driver for mysql, mysqli, PDO_Mysql (not recommended)
|
||||
</flag>
|
||||
<flag name="lmdb">Enable support for <pkg>dev-db/lmdb</pkg> db backend</flag>
|
||||
<flag name="intl">
|
||||
Enables the intl extension for extended internalization support
|
||||
</flag>
|
||||
<flag name="opcache">
|
||||
Enables built-in opcode cache, replacing pecl-apc et al.
|
||||
</flag>
|
||||
<flag name="pdo">Enable the bundled PDO extensions</flag>
|
||||
<flag name="phar">
|
||||
Enables the phar extension to provide phar archive support
|
||||
</flag>
|
||||
<flag name="phpdbg">
|
||||
Enable the PHP Debug Command Line SAPI (like gdb for php)
|
||||
</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>
|
||||
<flag name="xmlwriter">Enable XMLWriter support</flag>
|
||||
<flag name="xslt">Enable the XSL extension</flag>
|
||||
<flag name="vpx">Enable webp support for GD in php-5.x</flag>
|
||||
<flag name="webp">Enable webp support for GD in php-7.x</flag>
|
||||
<flag name="zip">Enable ZIP file support</flag>
|
||||
<flag name="zip-encryption">Enable ZIP file encryption from <pkg>dev-libs/libzip</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
@ -0,0 +1,783 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools flag-o-matic eapi7-ver systemd
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://secure.php.net/"
|
||||
SRC_URI="https://php.net/distributions/${P}.tar.xz"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
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
|
||||
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
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+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
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
COMMON_DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib:0=
|
||||
) )
|
||||
coverage? ( dev-util/lcov )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib:0=
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
|
||||
intl? ( >=dev-libs/icu-62.1:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
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/libmysqlclient:= )
|
||||
mysqli? ( virtual/libmysqlclient:= )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl: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:0= )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
vpx? ( media-libs/libvpx:0= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib:0=
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib:0= )
|
||||
zlib? ( sys-libs/zlib:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
vpx? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
recode? ( !imap !mysql !mysqli !libmysqlclient )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
sharedmem? ( !threads )
|
||||
"
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
||||
-i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" php.ini
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,production}
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}/php-${SLOT}-no-bison-warnings.patch"
|
||||
eapply "${FILESDIR}/5.6-mbstring-oniguruma-6.8.patch"
|
||||
eapply "${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
|
||||
# build fixes from fedora SRPM from remi
|
||||
eapply "${FILESDIR}/php-5.3.0-recode.patch"
|
||||
eapply "${FILESDIR}/php-5.6.30-interbase.patch"
|
||||
eapply "${FILESDIR}/php-5.6.31-openssl11.patch"
|
||||
eapply "${FILESDIR}/php-5.6.37-icu62.patch"
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# 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 \
|
||||
|| 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 \
|
||||
|| 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
|
||||
|
||||
eapply_user
|
||||
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable coverage gcov)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${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 elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
||||
$(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_enable opcache opcache)
|
||||
$(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 sqlite 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)
|
||||
$(use_with xslt 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
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(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
|
||||
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")
|
||||
)
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# 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"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# 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")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_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
|
||||
our_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"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_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" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
|