summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-05-21 13:58:20 +0200
committerRemi Collet <remi@remirepo.net>2019-05-21 13:58:20 +0200
commit80ec9ea59d88682892c6d4414ec2edf86020740c (patch)
tree0d4dbcf854b4c84f15f894a92dc47803303281b1
parentbcdc89c86ea8958208879f36338d929514b4427e (diff)
- update to 7.4.0-dev
- drop interbase extension and sub-package - move pdo_firebird extension in pdo-firebird sub-package - drop wddx extension - add ffi extension in new ffi sub-package - use pkgconfig dependencies for ext using PHP_CHECK_MODULE
-rw-r--r--php-7.2.4-dlopen.patch30
-rw-r--r--php-7.3.3-pdooci.patch269
-rw-r--r--php-7.4.0-phpize.patch (renamed from php-7.3.0-phpize.patch)12
-rw-r--r--php-7.4.0-recode.patch (renamed from php-5.3.0-recode.patch)12
-rw-r--r--php.spec230
5 files changed, 136 insertions, 417 deletions
diff --git a/php-7.2.4-dlopen.patch b/php-7.2.4-dlopen.patch
deleted file mode 100644
index 3c76474..0000000
--- a/php-7.2.4-dlopen.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -up php-7.2.4RC1/sapi/litespeed/lsapilib.c.dlopen php-7.2.4RC1/sapi/litespeed/lsapilib.c
---- php-7.2.4RC1/sapi/litespeed/lsapilib.c.dlopen 2018-03-13 12:40:25.330885880 +0100
-+++ php-7.2.4RC1/sapi/litespeed/lsapilib.c 2018-03-13 12:41:35.797251042 +0100
-@@ -755,7 +755,7 @@ static int (*fp_lve_leave)(struct liblve
- static int (*fp_lve_jail)( struct passwd *, char *) = NULL;
- static int lsapi_load_lve_lib(void)
- {
-- s_liblve = dlopen("liblve.so.0", RTLD_LAZY);
-+ s_liblve = dlopen("liblve.so.0", RTLD_NOW);
- if (s_liblve)
- {
- fp_lve_is_available = dlsym(s_liblve, "lve_is_available");
-diff -up php-7.2.4RC1/Zend/zend_portability.h.dlopen php-7.2.4RC1/Zend/zend_portability.h
---- php-7.2.4RC1/Zend/zend_portability.h.dlopen 2018-03-13 12:33:38.000000000 +0100
-+++ php-7.2.4RC1/Zend/zend_portability.h 2018-03-13 12:40:25.330885880 +0100
-@@ -144,11 +144,11 @@
- # endif
-
- # if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
--# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
-+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
- # elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__)
--# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
-+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND)
- # else
--# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
-+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL)
- # endif
- # define DL_UNLOAD dlclose
- # if defined(DLSYM_NEEDS_UNDERSCORE)
diff --git a/php-7.3.3-pdooci.patch b/php-7.3.3-pdooci.patch
deleted file mode 100644
index bd54849..0000000
--- a/php-7.3.3-pdooci.patch
+++ /dev/null
@@ -1,269 +0,0 @@
-diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c
-index f2c43b9a69..79733c2c57 100644
---- a/ext/pdo_oci/oci_statement.c
-+++ b/ext/pdo_oci/oci_statement.c
-@@ -2,7 +2,7 @@
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
-- | Copyright (c) 1997-2018 The PHP Group |
-+ | Copyright (c) The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
-@@ -525,7 +525,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */
- pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data;
- OCIParam *param = NULL;
- text *colname;
-- ub2 dtype, data_size, scale, precis;
-+ ub2 dtype, data_size, precis;
- ub4 namelen;
- struct pdo_column_data *col = &stmt->columns[colno];
- zend_bool dyn = FALSE;
-@@ -541,10 +541,6 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */
- STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_DATA_SIZE",
- (param, OCI_DTYPE_PARAM, &data_size, 0, OCI_ATTR_DATA_SIZE, S->err));
-
-- /* scale ? */
-- STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_SCALE",
-- (param, OCI_DTYPE_PARAM, &scale, 0, OCI_ATTR_SCALE, S->err));
--
- /* precision ? */
- STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_PRECISION",
- (param, OCI_DTYPE_PARAM, &precis, 0, OCI_ATTR_PRECISION, S->err));
-@@ -553,7 +549,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */
- STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_NAME",
- (param, OCI_DTYPE_PARAM, &colname, &namelen, OCI_ATTR_NAME, S->err));
-
-- col->precision = scale;
-+ col->precision = precis;
- col->maxlen = data_size;
- col->name = zend_string_init((char *)colname, namelen, 0);
-
-@@ -598,7 +594,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */
- S->cols[colno].datalen = 1024;
- #endif
- } else if (dtype == SQLT_BIN) {
-- S->cols[colno].datalen = (ub4) col->maxlen * 2; // raw characters to hex digits
-+ S->cols[colno].datalen = (ub4) col->maxlen * 2; /* raw characters to hex digits */
- } else {
- S->cols[colno].datalen = (ub4) (col->maxlen * S->H->max_char_width);
- }
-@@ -793,20 +789,207 @@ static int oci_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, size_t *len
- }
- } /* }}} */
-
-+
-+static int oci_stmt_col_meta(pdo_stmt_t *stmt, zend_long colno, zval *return_value) /* {{{ */
-+{
-+ pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data;
-+ OCIParam *param = NULL;
-+ ub2 dtype, precis;
-+ sb1 scale;
-+ zval flags;
-+ ub1 isnull, charset_form;
-+ if (!S->stmt) {
-+ return FAILURE;
-+ }
-+ if (colno >= stmt->column_count) {
-+ /* error invalid column */
-+ return FAILURE;
-+ }
-+
-+ array_init(return_value);
-+ array_init(&flags);
-+
-+ /* describe the column */
-+ STMT_CALL(OCIParamGet, (S->stmt, OCI_HTYPE_STMT, S->err, (dvoid*)&param, colno+1));
-+
-+ /* column data type */
-+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_DATA_TYPE",
-+ (param, OCI_DTYPE_PARAM, &dtype, 0, OCI_ATTR_DATA_TYPE, S->err));
-+
-+ /* column precision */
-+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_PRECISION",
-+ (param, OCI_DTYPE_PARAM, &precis, 0, OCI_ATTR_PRECISION, S->err));
-+
-+ /* column scale */
-+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_SCALE",
-+ (param, OCI_DTYPE_PARAM, &scale, 0, OCI_ATTR_SCALE, S->err));
-+
-+ /* string column charset form */
-+ if (dtype == SQLT_CHR || dtype == SQLT_VCS || dtype == SQLT_AFC || dtype == SQLT_CLOB) {
-+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_CHARSET_FORM",
-+ (param, OCI_DTYPE_PARAM, &charset_form, 0, OCI_ATTR_CHARSET_FORM, S->err));
-+ }
-+
-+
-+ if (dtype) {
-+ /* if there is a declared type */
-+ switch (dtype) {
-+#ifdef SQLT_TIMESTAMP
-+ case SQLT_TIMESTAMP:
-+ add_assoc_string(return_value, "oci:decl_type", "TIMESTAMP");
-+ add_assoc_string(return_value, "native_type", "TIMESTAMP");
-+ break;
-+#endif
-+#ifdef SQLT_TIMESTAMP_TZ
-+ case SQLT_TIMESTAMP_TZ:
-+ add_assoc_string(return_value, "oci:decl_type", "TIMESTAMP WITH TIMEZONE");
-+ add_assoc_string(return_value, "native_type", "TIMESTAMP WITH TIMEZONE");
-+ break;
-+#endif
-+#ifdef SQLT_TIMESTAMP_LTZ
-+ case SQLT_TIMESTAMP_LTZ:
-+ add_assoc_string(return_value, "oci:decl_type", "TIMESTAMP WITH LOCAL TIMEZONE");
-+ add_assoc_string(return_value, "native_type", "TIMESTAMP WITH LOCAL TIMEZONE");
-+ break;
-+#endif
-+#ifdef SQLT_INTERVAL_YM
-+ case SQLT_INTERVAL_YM:
-+ add_assoc_string(return_value, "oci:decl_type", "INTERVAL YEAR TO MONTH");
-+ add_assoc_string(return_value, "native_type", "INTERVAL YEAR TO MONTH");
-+ break;
-+#endif
-+#ifdef SQLT_INTERVAL_DS
-+ case SQLT_INTERVAL_DS:
-+ add_assoc_string(return_value, "oci:decl_type", "INTERVAL DAY TO SECOND");
-+ add_assoc_string(return_value, "native_type", "INTERVAL DAY TO SECOND");
-+ break;
-+#endif
-+ case SQLT_DAT:
-+ add_assoc_string(return_value, "oci:decl_type", "DATE");
-+ add_assoc_string(return_value, "native_type", "DATE");
-+ break;
-+ case SQLT_FLT :
-+ case SQLT_NUM:
-+ /* if the precision is nonzero and scale is -127 then it is a FLOAT */
-+ if (scale == -127 && precis != 0) {
-+ add_assoc_string(return_value, "oci:decl_type", "FLOAT");
-+ add_assoc_string(return_value, "native_type", "FLOAT");
-+ } else {
-+ add_assoc_string(return_value, "oci:decl_type", "NUMBER");
-+ add_assoc_string(return_value, "native_type", "NUMBER");
-+ }
-+ break;
-+ case SQLT_LNG:
-+ add_assoc_string(return_value, "oci:decl_type", "LONG");
-+ add_assoc_string(return_value, "native_type", "LONG");
-+ break;
-+ case SQLT_BIN:
-+ add_assoc_string(return_value, "oci:decl_type", "RAW");
-+ add_assoc_string(return_value, "native_type", "RAW");
-+ break;
-+ case SQLT_LBI:
-+ add_assoc_string(return_value, "oci:decl_type", "LONG RAW");
-+ add_assoc_string(return_value, "native_type", "LONG RAW");
-+ break;
-+ case SQLT_CHR:
-+ case SQLT_VCS:
-+ if (charset_form == SQLCS_NCHAR) {
-+ add_assoc_string(return_value, "oci:decl_type", "NVARCHAR2");
-+ add_assoc_string(return_value, "native_type", "NVARCHAR2");
-+ } else {
-+ add_assoc_string(return_value, "oci:decl_type", "VARCHAR2");
-+ add_assoc_string(return_value, "native_type", "VARCHAR2");
-+ }
-+ break;
-+ case SQLT_AFC:
-+ if (charset_form == SQLCS_NCHAR) {
-+ add_assoc_string(return_value, "oci:decl_type", "NCHAR");
-+ add_assoc_string(return_value, "native_type", "NCHAR");
-+ } else {
-+ add_assoc_string(return_value, "oci:decl_type", "CHAR");
-+ add_assoc_string(return_value, "native_type", "CHAR");
-+ }
-+ break;
-+ case SQLT_BLOB:
-+ add_assoc_string(return_value, "oci:decl_type", "BLOB");
-+ add_next_index_string(&flags, "blob");
-+ add_assoc_string(return_value, "native_type", "BLOB");
-+ break;
-+ case SQLT_CLOB:
-+ if (charset_form == SQLCS_NCHAR) {
-+ add_assoc_string(return_value, "oci:decl_type", "NCLOB");
-+ add_assoc_string(return_value, "native_type", "NCLOB");
-+ } else {
-+ add_assoc_string(return_value, "oci:decl_type", "CLOB");
-+ add_assoc_string(return_value, "native_type", "CLOB");
-+ }
-+ add_next_index_string(&flags, "blob");
-+ break;
-+ case SQLT_BFILE:
-+ add_assoc_string(return_value, "oci:decl_type", "BFILE");
-+ add_next_index_string(&flags, "blob");
-+ add_assoc_string(return_value, "native_type", "BFILE");
-+ break;
-+ case SQLT_RDD:
-+ add_assoc_string(return_value, "oci:decl_type", "ROWID");
-+ add_assoc_string(return_value, "native_type", "ROWID");
-+ break;
-+ case SQLT_BFLOAT:
-+ case SQLT_IBFLOAT:
-+ add_assoc_string(return_value, "oci:decl_type", "BINARY_FLOAT");
-+ add_assoc_string(return_value, "native_type", "BINARY_FLOAT");
-+ break;
-+ case SQLT_BDOUBLE:
-+ case SQLT_IBDOUBLE:
-+ add_assoc_string(return_value, "oci:decl_type", "BINARY_DOUBLE");
-+ add_assoc_string(return_value, "native_type", "BINARY_DOUBLE");
-+ break;
-+ default:
-+ add_assoc_long(return_value, "oci:decl_type", dtype);
-+ add_assoc_string(return_value, "native_type", "UNKNOWN");
-+ }
-+ } else {
-+ /* if the column is NULL */
-+ add_assoc_long(return_value, "oci:decl_type", 0);
-+ add_assoc_string(return_value, "native_type", "NULL");
-+ }
-+
-+ /* column can be null */
-+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_IS_NULL",
-+ (param, OCI_DTYPE_PARAM, &isnull, 0, OCI_ATTR_IS_NULL, S->err));
-+
-+ if (isnull) {
-+ add_next_index_string(&flags, "nullable");
-+ } else {
-+ add_next_index_string(&flags, "not_null");
-+ }
-+
-+ /* PDO type */
-+ switch (dtype) {
-+ case SQLT_BFILE:
-+ case SQLT_BLOB:
-+ case SQLT_CLOB:
-+ add_assoc_long(return_value, "pdo_type", PDO_PARAM_LOB);
-+ break;
-+ default:
-+ add_assoc_long(return_value, "pdo_type", PDO_PARAM_STR);
-+ }
-+
-+ add_assoc_long(return_value, "scale", scale);
-+ add_assoc_zval(return_value, "flags", &flags);
-+
-+ OCIDescriptorFree(param, OCI_DTYPE_PARAM);
-+ return SUCCESS;
-+} /* }}} */
-+
- const struct pdo_stmt_methods oci_stmt_methods = {
- oci_stmt_dtor,
- oci_stmt_execute,
- oci_stmt_fetch,
- oci_stmt_describe,
- oci_stmt_get_col,
-- oci_stmt_param_hook
-+ oci_stmt_param_hook,
-+ NULL, /* set_attr */
-+ NULL, /* get_attr */
-+ oci_stmt_col_meta
- };
--
--/*
-- * Local variables:
-- * tab-width: 4
-- * c-basic-offset: 4
-- * End:
-- * vim600: noet sw=4 ts=4 fdm=marker
-- * vim<600: noet sw=4 ts=4
-- */
diff --git a/php-7.3.0-phpize.patch b/php-7.4.0-phpize.patch
index 0114617..b6958b3 100644
--- a/php-7.3.0-phpize.patch
+++ b/php-7.4.0-phpize.patch
@@ -1,8 +1,8 @@
-diff -up php-7.3.0RC4/scripts/phpize.in.headers php-7.3.0RC4/scripts/phpize.in
---- php-7.3.0RC4/scripts/phpize.in.headers 2018-10-23 11:32:20.000000000 +0200
-+++ php-7.3.0RC4/scripts/phpize.in 2018-10-23 13:35:55.382870481 +0200
-@@ -162,6 +162,15 @@ phpize_autotools()
- $PHP_AUTOHEADER || exit 1
+diff -up ./scripts/phpize.in.headers ./scripts/phpize.in
+--- ./scripts/phpize.in.headers 2019-05-20 11:11:06.000000000 +0200
++++ ./scripts/phpize.in 2019-05-20 16:22:43.182043588 +0200
+@@ -169,6 +169,15 @@ phpize_autotools()
+ mv config.h.in.tmp config.h.in
}
+phpize_check_headers()
@@ -17,7 +17,7 @@ diff -up php-7.3.0RC4/scripts/phpize.in.headers php-7.3.0RC4/scripts/phpize.in
# Main script
case "$1" in
-@@ -180,12 +189,15 @@ case "$1" in
+@@ -187,12 +196,15 @@ case "$1" in
# Version
--version|-v)
diff --git a/php-5.3.0-recode.patch b/php-7.4.0-recode.patch
index 86f75a5..d60c703 100644
--- a/php-5.3.0-recode.patch
+++ b/php-7.4.0-recode.patch
@@ -1,8 +1,7 @@
-diff -up php-5.3.0beta1/ext/recode/config9.m4.recode php-5.3.0beta1/ext/recode/config9.m4
---- php-5.3.0beta1/ext/recode/config9.m4.recode 2008-12-02 00:30:21.000000000 +0100
-+++ php-5.3.0beta1/ext/recode/config9.m4 2009-02-28 09:46:50.000000000 +0100
-@@ -4,13 +4,6 @@ dnl
-
+diff -up ./ext/recode/config9.m4.recode ./ext/recode/config9.m4
+--- ./ext/recode/config9.m4.recode 2019-05-21 12:19:27.614484934 +0200
++++ ./ext/recode/config9.m4 2019-05-21 12:20:41.534895969 +0200
+@@ -1,13 +1,5 @@
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"
@@ -12,6 +11,7 @@ diff -up php-5.3.0beta1/ext/recode/config9.m4.recode php-5.3.0beta1/ext/recode/c
- 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])
+ fi
diff --git a/php.spec b/php.spec
index 475cf2e..6f1ccfb 100644
--- a/php.spec
+++ b/php.spec
@@ -32,7 +32,7 @@
%global _hardened_build 1
# version used for php embedded library soname
-%global embed_version 7.3
+%global embed_version 7.4
# Ugly hack. Harcoded values to avoid relocation.
%global _httpd_mmn %(cat %{_root_includedir}/httpd/.mmn 2>/dev/null || echo 0)
@@ -116,7 +116,6 @@
%endif
%global with_zip 0
-%global with_libzip 1
%if 0%{?fedora} < 18 && 0%{?rhel} < 7
@@ -125,14 +124,19 @@
%global db_devel libdb-devel
%endif
-%global upver 7.3.6
-%global rcver RC1
-%global lower RC1
+%global gh_commit 5f1d76a2c410fb5ea0c40fe570402bbef30b87d6
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_date 20190520
+%global gh_owner php
+%global gh_project php-src
+%global upver 7.4.0
+#global rcver dev
+%global lower DEV
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
-Version: %{upver}%{?rcver:~%{lower}}
-Release: 2%{?dist}
+Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}}
+Release: 1%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -143,7 +147,11 @@ License: PHP and Zend and BSD and MIT and ASL 1.0 and NCSA
Group: Development/Languages
URL: http://www.php.net/
+%if 0%{?gh_date}
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{upver}-%{gh_short}.tar.gz
+%else
Source0: http://www.php.net/distributions/php-%{upver}%{?rcver}.tar.xz
+%endif
Source1: php.conf
Source2: php.ini
Source3: macros.php
@@ -165,23 +173,20 @@ Source52: 20-oci8.ini
Patch1: php-7.1.7-httpd.patch
Patch5: php-7.2.0-includedir.patch
Patch6: php-5.6.3-embed.patch
-Patch7: php-5.3.0-recode.patch
+Patch7: php-7.4.0-recode.patch
Patch8: php-7.2.0-libdb.patch
Patch9: php-7.0.7-curl.patch
# Functional changes
-Patch40: php-7.2.4-dlopen.patch
Patch42: php-7.3.3-systzdata-v18.patch
# See http://bugs.php.net/53436
-Patch43: php-7.3.0-phpize.patch
+Patch43: php-7.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
Patch45: php-7.2.3-ldap_r.patch
# Make php_config.h constant across builds
Patch46: php-7.2.4-fixheader.patch
# drop "Configure command" from phpinfo output
Patch47: php-5.6.3-phpinfo.patch
-# backport PDOStatement::getColumnMeta from 7.4
-Patch48: php-7.3.3-pdooci.patch
# RC Patch
Patch91: php-7.2.0-oci8conf.patch
@@ -196,25 +201,25 @@ Patch300: php-7.0.10-datetests.patch
# WIP
-BuildRequires: bzip2-devel, curl-devel >= 7.9, %{db_devel}
+BuildRequires: bzip2-devel
+BuildRequires: pkgconfig(libcurl) >= 7.15.5
+BuildRequires: %{db_devel}
BuildRequires: httpd-devel >= 2.0.46-1, pam-devel
%if %{with_httpd2410}
# to ensure we are using httpd with filesystem feature (see #1081453)
BuildRequires: httpd-filesystem
%endif
-BuildRequires: %{?dtsprefix}libstdc++-devel, openssl-devel
-%if %{with_sqlite3}
-# For SQLite3 extension
-BuildRequires: sqlite-devel >= 3.6.0
-%else
-# Enough for pdo_sqlite
-BuildRequires: sqlite-devel >= 3.0.0
-%endif
-BuildRequires: zlib-devel, smtpdaemon, libedit-devel
+BuildRequires: %{?dtsprefix}libstdc++-devel
+# no pkgconfig to avoid compat-openssl10
+BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: pkgconfig(sqlite3) >= 3.7.4
+BuildRequires: pkgconfig(zlib) >= 1.2.0.4
+BuildRequires: smtpdaemon
+BuildRequires: pkgconfig(libedit)
%if %{with_libpcre}
-BuildRequires: pcre2-devel >= 10.30
+BuildRequires: pkgconfig(libpcre2-8) >= 10.30
%else
-Provides: Provides: bundled(pcre2) = 10.32
+Provides: bundled(pcre2) = 10.32
%endif
BuildRequires: bzip2
BuildRequires: perl
@@ -230,6 +235,7 @@ BuildRequires: %{?dtsprefix}systemtap-sdt-devel
BuildRequires: libargon2-devel
%if 0%{?gh_date}
BuildRequires: bison
+BuildRequires: re2c
%endif
# used for tests
BuildRequires: /bin/ps
@@ -300,7 +306,7 @@ BuildRequires: libacl-devel
Requires(pre): %{_root_sbindir}/useradd
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
%if %{with_systemd}
-BuildRequires: systemd-devel
+BuildRequires: pkgconfig(libsystemd) >= 209
%{?systemd_requires}
# This is actually needed for the %%triggerun script but Requires(triggerun)
# is not valid. We can use %%post because this particular %%triggerun script
@@ -413,7 +419,7 @@ Requires: krb5-devel%{?_isa}
Requires: libargon2-devel%{?_isa}
Requires: libedit-devel%{?_isa}
Requires: libxml2-devel%{?_isa}
-Requires: openssl-devel%{?_isa}
+Requires: openssl-devel%{?_isa} >= 1.0.1
%if %{with_libpcre}
Requires: pcre2-devel%{?_isa} >= 10.30
%endif
@@ -448,7 +454,10 @@ Group: Development/Languages
# All files licensed under PHP version 3.01
License: PHP
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
-BuildRequires: krb5-devel, openssl-devel, libc-client-devel
+BuildRequires: pkgconfig(krb5)
+BuildRequires: pkgconfig(krb5-gssapi)
+BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: libc-client-devel
%description imap
The %{?scl_prefix}php-imap module will add IMAP (Internet Message Access Protocol)
@@ -462,7 +471,9 @@ Group: Development/Languages
# All files licensed under PHP version 3.01
License: PHP
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
-BuildRequires: cyrus-sasl-devel, openldap-devel, openssl-devel
+BuildRequires: cyrus-sasl-devel
+BuildRequires: openldap-devel
+BuildRequires: openssl-devel >= 1.0.1
%description ldap
The %{?scl_prefix}php-ldap package adds Lightweight Directory Access Protocol (LDAP)
@@ -518,7 +529,9 @@ License: PHP
Requires: %{?scl_prefix}php-pdo%{?_isa} = %{version}-%{release}
Provides: %{?scl_prefix}php_database
Provides: %{?scl_prefix}php-pdo_pgsql, %{?scl_prefix}php-pdo_pgsql%{?_isa}
-BuildRequires: krb5-devel, openssl-devel, postgresql-devel
+BuildRequires: krb5-devel
+BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: postgresql-devel
%description pgsql
The %{?scl_prefix}php-pgsql package add PostgreSQL database support to PHP.
@@ -571,27 +584,27 @@ Group: Development/Languages
# All files licensed under PHP version 3.01
License: PHP
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
-BuildRequires: libxml2-devel
+BuildRequires: pkgconfig(libxml-2.0)
%description soap
The %{?scl_prefix}php-soap package contains a dynamic shared object that will add
support to PHP for using the SOAP web services protocol.
%if %{with_interbase}
-%package interbase
-Summary: A module for PHP applications that use Interbase/Firebird databases
+%package pdo-firebird
+Summary: PDO driver for Interbase/Firebird databases
Group: Development/Languages
# All files licensed under PHP version 3.01
License: PHP
BuildRequires: firebird-devel
Requires: %{?scl_prefix}php-pdo%{?_isa} = %{version}-%{release}
Provides: %{?scl_prefix}php_database
-Provides: %{?scl_prefix}php-firebird, %{?scl_prefix}php-firebird%{?_isa}
Provides: %{?scl_prefix}php-pdo_firebird, %{?scl_prefix}php-pdo_firebird%{?_isa}
-%description interbase
-The %{?scl_prefix}php-interbase package contains a dynamic shared object that will add
-database support through Interbase/Firebird to PHP.
+%description pdo-firebird
+The %{?scl_prefix}php-interbase package contains the PDO driver for
+Interbase/Firebird databases.
+
InterBase is the name of the closed-source variant of this RDBMS that was
developed by Borland/Inprise.
@@ -663,11 +676,10 @@ Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
Provides: %{?scl_prefix}php-dom, %{?scl_prefix}php-dom%{?_isa}
Provides: %{?scl_prefix}php-domxml, %{?scl_prefix}php-domxml%{?_isa}
Provides: %{?scl_prefix}php-simplexml, %{?scl_prefix}php-simplexml%{?_isa}
-Provides: %{?scl_prefix}php-wddx, %{?scl_prefix}php-wddx%{?_isa}
Provides: %{?scl_prefix}php-xmlreader, %{?scl_prefix}php-xmlreader%{?_isa}
Provides: %{?scl_prefix}php-xmlwriter, %{?scl_prefix}php-xmlwriter%{?_isa}
Provides: %{?scl_prefix}php-xsl, %{?scl_prefix}php-xsl%{?_isa}
-BuildRequires: libxslt-devel >= 1.0.18-1, libxml2-devel >= 2.4.14-1
+BuildRequires: libxslt-devel >= 1.0.18-1, pkgconfig(libxml-2.0) >= 2.7.6
%description xml
The %{?scl_prefix}php-xml package contains dynamic shared objects which add support
@@ -696,7 +708,7 @@ Group: Development/Languages
License: PHP and LGPLv2 and BSD and OpenLDAP
%if %{with_onig}
# ensure we have soname 5
-BuildRequires: oniguruma-devel >= 6.8
+BuildRequires: pkgconfig(oniguruma) >= 6.8
%else
Provides: bundled(oniguruma) = 6.9.0
%endif
@@ -719,17 +731,19 @@ License: PHP and BSD
%endif
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
# Required to build the bundled GD library
-BuildRequires: libjpeg-devel, libpng-devel, freetype-devel
-BuildRequires: libXpm-devel
+BuildRequires: pkgconfig(libjpeg)
+BuildRequires: pkgconfig(libpng)
+BuildRequires: pkgconfig(freetype2)
+BuildRequires: pkgconfig(xpm)
%if %{with_libgd}
-BuildRequires: gd-devel >= 2.1.1
+BuildRequires: pkgconfig(gdlib) >= 2.1.1
%if 0%{?fedora} <= 19 && 0%{?rhel} <= 7
Requires: gd-last%{?_isa} >= 2.1.1
%else
Requires: gd%{?_isa} >= 2.1.1
%endif
%else
-BuildRequires: libwebp-devel
+BuildRequires: pkgconfig(libwebp)
Provides: bundled(gd) = 2.0.35
%endif
@@ -792,7 +806,7 @@ support for using the tidy library to PHP.
%if %{with_freetds}
%package pdo-dblib
-Summary: PDO driver Microsoft SQL Server and Sybase databases
+Summary: PDO driver for Microsoft SQL Server and Sybase databases
Group: Development/Languages
# All files licensed under PHP version 3.01
License: PHP
@@ -838,8 +852,9 @@ Group: System Environment/Libraries
# All files licensed under PHP version 3.01
License: PHP
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
-# Upstream requires 4.0, we require 50 to ensure use of libicu-last / libicu62
-BuildRequires: libicu-devel >= 50
+BuildRequires: pkgconfig(icu-i18n) >= 50.1
+BuildRequires: pkgconfig(icu-io) >= 50.1
+BuildRequires: pkgconfig(icu-uc) >= 50.1
%description intl
@@ -853,7 +868,7 @@ Summary: Enchant spelling extension for PHP applications
License: PHP
Group: System Environment/Libraries
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
-BuildRequires: enchant-devel >= 1.2.4
+BuildRequires: pkgconfig(enchant)
%description enchant
The %{?scl_prefix}php-enchant package contains a dynamic shared object that will add
@@ -867,10 +882,7 @@ Summary: ZIP archive management extension for PHP
License: PHP
Group: System Environment/Libraries
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
-%if %{with_libzip}
-# 0.11.1 required, but 1.0.1 is bundled
-BuildRequires: pkgconfig(libzip) >= 1.0.1
-%endif
+BuildRequires: pkgconfig(libzip) >= 0.11
%description zip
The %{?scl_prefix}php-zip package provides an extension that will add
@@ -908,8 +920,26 @@ The %{?scl_prefix}php-sodium package provides a simple,
low-level PHP extension for the libsodium cryptographic library.
+%package ffi
+Summary: Foreign Function Interface
+# All files licensed under PHP version 3.0.1
+License: PHP
+Group: System Environment/Libraries
+BuildRequires: pkgconfig(libffi)
+
+Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
+
+%description ffi
+FFI is one of the features that made Python and LuaJIT very useful for fast
+prototyping. It allows calling C functions and using C data types from pure
+scripting language and therefore develop “system code” more productively.
+
+For PHP, FFI opens a way to write PHP extensions and bindings to C libraries
+in pure PHP.
+
+
%prep
-: Building %{name}-%{version}-%{release} with systemd=%{with_systemd} imap=%{with_imap} interbase=%{with_interbase} freetds=%{with_freetds} sqlite3=%{with_sqlite3} tidy=%{with_tidy} zip=%{with_zip}
+: Building %{name}-%{version}-%{release} with systemd=%{with_systemd} imap=%{with_imap} freetds=%{with_freetds} sqlite3=%{with_sqlite3} tidy=%{with_tidy} zip=%{with_zip}
%if 0%{?gh_date}
%setup -q -n %{gh_project}-%{gh_commit}
%else
@@ -925,7 +955,6 @@ low-level PHP extension for the libsodium cryptographic library.
%patch9 -p1 -b .curltls
%endif
-%patch40 -p1 -b .dlopen
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 6
%patch42 -p1 -b .systzdata
%endif
@@ -935,7 +964,6 @@ low-level PHP extension for the libsodium cryptographic library.
%endif
%patch46 -p1 -b .fixheader
%patch47 -p1 -b .phpinfo
-%patch48 -p1 -b .pdooci
%patch91 -p1 -b .remi-oci8
@@ -957,10 +985,8 @@ cp ext/gd/libgd/COPYING libgd_COPYING
%endif
cp sapi/fpm/LICENSE fpm_LICENSE
cp ext/mbstring/libmbfl/LICENSE libmbfl_LICENSE
-cp ext/mbstring/oniguruma/COPYING oniguruma_COPYING
-cp ext/mbstring/ucgendat/OPENLDAP_LICENSE ucgendat_LICENSE
cp ext/fileinfo/libmagic/LICENSE libmagic_LICENSE
-cp ext/bcmath/libbcmath/COPYING.LIB libbcmath_COPYING
+cp ext/bcmath/libbcmath/LICENSE libbcmath_LICENSE
cp ext/date/lib/LICENSE.rst timelib_LICENSE
# Multiple builds for multiple SAPIs
@@ -1096,16 +1122,13 @@ exit 1
# Set build date from https://reproducible-builds.org/specs/source-date-epoch/
export SOURCE_DATE_EPOCH=$(date +%s -r NEWS)
-# aclocal workaround - to be improved
-cat $(aclocal --print-ac-dir)/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >>aclocal.m4
-
# Force use of system libtool:
libtoolize --force --copy
cat $(aclocal --print-ac-dir)/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >build/libtool.m4
%if 0%{?gh_date}
# Bison files
-./genfiles
+scripts/dev/genfiles
%endif
# Regenerate configure scripts (patches change config.m4's)
@@ -1132,7 +1155,7 @@ mkdir Zend && cp ../Zend/zend_{language,ini}_{parser,scanner}.[ch] Zend
# Always static:
# date, filter, libxml, reflection, spl: not supported
# hash: for PHAR_SIG_SHA256 and PHAR_SIG_SHA512
-# session: dep on hash, used by soap and wddx
+# session: dep on hash, used by soap
# pcre: used by filter, zip
# pcntl, readline: only used by CLI sapi
# openssl: for PHAR_SIG_OPENSSL
@@ -1140,6 +1163,7 @@ mkdir Zend && cp ../Zend/zend_{language,ini}_{parser,scanner}.[ch] Zend
ln -sf ../configure
%configure \
+ --enable-rtld-now \
--cache-file=../config.cache \
--with-libdir=%{_lib} \
--with-config-file-path=%{_sysconfdir} \
@@ -1149,20 +1173,20 @@ ln -sf ../configure
--disable-rpath \
--without-pear \
--with-exec-dir=%{_bindir} \
- --with-freetype-dir=%{_root_prefix} \
- --with-png-dir=%{_root_prefix} \
- --with-xpm-dir=%{_root_prefix} \
+ --with-freetype \
+ --with-png \
+ --with-xpm \
--without-gdbm \
- --with-jpeg-dir=%{_root_prefix} \
+ --with-jpeg \
--with-openssl \
--with-system-ciphers \
%if %{with_libpcre}
- --with-pcre-regex=%{_root_prefix} \
+ --with-external-pcre \
%endif
--with-zlib \
--with-layout=GNU \
--with-kerberos \
- --with-libxml-dir=%{_root_prefix} \
+ --with-libxml \
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 6
--with-system-tzdata \
%endif
@@ -1196,15 +1220,12 @@ build --libdir=%{_libdir}/php \
--with-imap=shared --with-imap-ssl \
%endif
--enable-mbstring=shared \
-%if %{with_onig}
- --with-onig=%{_root_prefix} \
-%endif
--enable-mbregex \
%if %{with_libgd}
- --with-gd=shared,%{_root_prefix} \
+ --enable-gd=shared \
+ --with-external-gd \
%else
- --with-gd=shared \
- --with-webp-dir=%{_root_prefix} \
+ --enable-gd=shared \
%endif
--with-gmp=shared \
--enable-calendar=shared \
@@ -1230,35 +1251,30 @@ build --libdir=%{_libdir}/php \
--with-pdo-oci=shared,instantclient,%{_root_libdir}/oracle/%{oraclever}/client64/lib,%{oraclever} \
%endif
%if %{with_interbase}
- --with-interbase=shared \
--with-pdo-firebird=shared \
%endif
--enable-dom=shared \
--with-pgsql=shared \
--enable-simplexml=shared \
--enable-xml=shared \
- --enable-wddx=shared \
--with-snmp=shared,%{_root_prefix} \
--enable-soap=shared \
--with-xsl=shared,%{_root_prefix} \
--enable-xmlreader=shared --enable-xmlwriter=shared \
- --with-curl=shared,%{_root_prefix} \
+ --with-curl=shared \
--enable-pdo=shared \
--with-pdo-odbc=shared,unixODBC,%{_root_prefix} \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,%{_root_prefix} \
- --with-pdo-sqlite=shared,%{_root_prefix} \
+ --with-pdo-sqlite=shared \
%if %{with_sqlite3}
- --with-sqlite3=shared,%{_root_prefix} \
+ --with-sqlite3=shared \
%else
--without-sqlite3 \
%endif
--enable-json=shared \
%if %{with_zip}
- --enable-zip=shared \
-%if %{with_libzip}
- --with-libzip \
-%endif
+ --with-zip=shared \
%endif
--without-readline \
--with-libedit \
@@ -1275,25 +1291,26 @@ build --libdir=%{_libdir}/php \
--enable-posix=shared \
--with-unixODBC=shared,%{_root_prefix} \
--enable-intl=shared \
- --with-icu-dir=%{_root_prefix} \
%if %{with_enchant}
- --with-enchant=shared,%{_root_prefix} \
+ --with-enchant=shared \
%endif
%if %{with_recode}
--with-recode=shared,%{_root_prefix} \
%endif
--enable-fileinfo=shared \
+ --with-ffi=shared \
--with-sodium=shared
popd
-without_shared="--without-gd \
+without_shared="--disable-gd \
--disable-dom --disable-dba --without-unixODBC \
--disable-opcache \
--disable-json \
+ --without-ffi \
--disable-xmlreader --disable-xmlwriter \
--without-sodium \
--without-sqlite3 --disable-phar --disable-fileinfo \
- --without-pspell --disable-wddx \
+ --without-pspell \
--without-curl --disable-posix --disable-xml \
--disable-simplexml --disable-exif --without-gettext \
--without-iconv --disable-ftp --without-bz2 --disable-ctype \
@@ -1305,7 +1322,7 @@ pushd build-apache
build --with-apxs2=%{_httpd_apxs} \
--libdir=%{_libdir}/php \
%if %{with_lsws}
- --with-litespeed \
+ --enable-litespeed \
%endif
--without-mysqli \
--disable-pdo \
@@ -1345,7 +1362,7 @@ export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
export SKIP_ONLINE_TESTS=1
export SKIP_IO_CAPTURE_TESTS=1
unset TZ LANG LC_ALL
-if ! make test; then
+if ! make test TESTS=%{?_smp_mflags}; then
set +x
for f in $(find .. -name \*.diff -type f -print); do
if ! grep -q XFAIL "${f/.diff/.phpt}"
@@ -1376,7 +1393,7 @@ make -C build-fpm install-fpm \
make -C build-cgi install \
INSTALL_ROOT=$RPM_BUILD_ROOT
-# Install the default configuration file and icons
+# Install the default configuration file
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
@@ -1388,8 +1405,6 @@ install -m 755 -d $RPM_BUILD_ROOT%{_httpd_moddir}
install -m 755 build-apache/libs/libphp7.so $RPM_BUILD_ROOT%{_httpd_moddir}
# Apache config fragment
-install -m 755 -d $RPM_BUILD_ROOT%{_httpd_contentdir}/icons
-install -m 644 php.gif $RPM_BUILD_ROOT%{_httpd_contentdir}/icons/%{name}.gif
%if %{?scl:1}0
sed -e 's/libphp7/lib%{scl}/' %{SOURCE9} >modconf
install -m 755 -d $RPM_BUILD_ROOT%{_root_httpd_moddir}
@@ -1534,11 +1549,12 @@ for mod in pgsql odbc ldap snmp xmlrpc \
oci8 pdo_oci \
%endif
%if %{with_interbase}
- interbase pdo_firebird \
+ pdo_firebird \
%endif
%if %{with_enchant}
enchant \
%endif
+ ffi \
phar fileinfo intl \
%if %{with_tidy}
tidy \
@@ -1553,7 +1569,7 @@ for mod in pgsql odbc ldap snmp xmlrpc \
zip \
%endif
sodium \
- pspell curl wddx xml \
+ pspell curl xml \
posix shmop sysvshm sysvsem sysvmsg
do
# for extension load order
@@ -1561,7 +1577,7 @@ do
opcache)
# Zend extensions
ini=10-${mod}.ini;;
- pdo_*|mysqli|wddx|xmlreader|xmlrpc)
+ pdo_*|mysqli|xmlreader|xmlrpc)
# Extensions with dependencies on 20-*
ini=30-${mod}.ini;;
*)
@@ -1584,7 +1600,7 @@ EOF
done
# The dom, xsl and xml* modules are all packaged in php-xml
-cat files.dom files.xsl files.xml{reader,writer} files.wddx \
+cat files.dom files.xsl files.xml{reader,writer} \
files.simplexml >> files.xml
# mysqlnd
@@ -1598,9 +1614,6 @@ cat files.pdo_odbc >> files.odbc
%if %{with_oci8}
cat files.pdo_oci >> files.oci8
%endif
-%if %{with_interbase}
-cat files.pdo_firebird >> files.interbase
-%endif
# sysv* and posix in packaged in php-process
cat files.shmop files.sysv* files.posix > files.process
@@ -1724,10 +1737,9 @@ fi
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
%config(noreplace) %{_httpd_modconfdir}/15-%{name}.conf
%endif
-%{_httpd_contentdir}/icons/%{name}.gif
%files common -f files.common
-%doc CODING_STANDARDS CREDITS EXTENSIONS NEWS README*
+%doc EXTENSIONS NEWS UPGRADING* README.REDIST.BINS *md docs
%license LICENSE TSRM_LICENSE
%license libmagic_LICENSE
%license timelib_LICENSE
@@ -1757,7 +1769,6 @@ fi
%{_mandir}/man1/phar.1*
%{_mandir}/man1/phar.phar.1*
%{_mandir}/man1/phpize.1*
-%doc sapi/cgi/README* sapi/cli/README
%if 0%{?scl:1}
%{_root_bindir}/%{scl}
%{_root_bindir}/%{scl}-cgi
@@ -1837,8 +1848,6 @@ fi
%files xmlrpc -f files.xmlrpc
%files mbstring -f files.mbstring
%license libmbfl_LICENSE
-%license oniguruma_COPYING
-%license ucgendat_LICENSE
%files gd -f files.gd
%if ! %{with_libgd}
%license libgd_README
@@ -1846,7 +1855,7 @@ fi
%endif
%files soap -f files.soap
%files bcmath -f files.bcmath
-%license libbcmath_COPYING
+%license libbcmath_LICENSE
%files gmp -f files.gmp
%files dba -f files.dba
%files pdo -f files.pdo
@@ -1863,7 +1872,7 @@ fi
%files recode -f files.recode
%endif
%if %{with_interbase}
-%files interbase -f files.interbase
+%files pdo-firebird -f files.pdo_firebird
%endif
%if %{with_enchant}
%files enchant -f files.enchant
@@ -1879,9 +1888,18 @@ fi
%endif
%files json -f files.json
%files sodium -f files.sodium
+%files ffi -f files.ffi
%changelog
+* Mon May 20 2019 Remi Collet <remi@remirepo.net> - 7.4.0~DEV.20190520-1
+- update to 7.4.0-dev
+- drop interbase extension and sub-package
+- move pdo_firebird extension in pdo-firebird sub-package
+- drop wddx extension
+- add ffi extension in new ffi sub-package
+- use pkgconfig dependencies for ext using PHP_CHECK_MODULE
+
* Wed May 15 2019 Remi Collet <remi@remirepo.net> - 7.3.6~RC1-2
- update to 7.3.6RC1 (new tag)