[packages/php/dev-7.0] up to 7.0.0 snapshot from php-src master

glen glen at pld-linux.org
Mon Jul 13 14:21:23 CEST 2015


commit f4ee12ea3d15ec70f1f958f0cdfbf66877fc7800
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun May 24 22:10:21 2015 +0300

    up to 7.0.0 snapshot from php-src master
    
    - use 7.0 as version suffix
    - updated patches
    - extensions removed: mssql, sybase_ct, ereg, mysql
    - sapis removed: apache 1.3, milter
    - extensions broken: opcache, phpdbg
    - somewhy shared php common is not built
    - libvpx2.patch applied upstream

 libvpx2.patch                        | 41 ---------------
 mysql-lib-ver-mismatch.patch         | 11 -----
 pcre-shared.patch                    | 32 ++++++------
 php-fcgi-error_log-no-newlines.patch | 10 ++--
 php-fpm-config.patch                 | 30 ++++-------
 php-ini.patch                        | 15 +++---
 php-pldlogo.patch                    | 16 +++---
 php-sapi-ini-file.patch              | 24 +++++----
 php-silent-session-cleanup.patch     |  8 +--
 php-zlib-for-getimagesize.patch      | 12 ++---
 php.spec                             | 96 +++++++++++++++++++-----------------
 skip-tests.sh                        | 46 +----------------
 spl-shared.patch                     |  8 +--
 13 files changed, 126 insertions(+), 223 deletions(-)
---
diff --git a/php.spec b/php.spec
index 6783f86..04ce7ab 100644
--- a/php.spec
+++ b/php.spec
@@ -130,18 +130,18 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine	with_filter
 %endif
 
-%define		rel	1
+%define		rel	0.1
 %define		orgname	php
-%define		ver_suffix 56
+%define		ver_suffix 7.0
 %define		php_suffix %{!?with_default_php:%{ver_suffix}}
 Summary:	PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):	Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):	Język skryptowy PHP
 Summary(pt_BR.UTF-8):	A linguagem de script PHP
-Summary(ru.UTF-8):	PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
-Summary(uk.UTF-8):	PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
+Summary(ru.UTF-8):	PHP Версии 7 - язык препроцессирования HTML-файлов, выполняемый на сервере
+Summary(uk.UTF-8):	PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:		%{orgname}%{php_suffix}
-Version:	5.6.9
+Version:	7.0.0
 Release:	%{rel}
 Epoch:		4
 # All files licensed under PHP version 3.01, except
@@ -149,8 +149,9 @@ Epoch:		4
 # TSRM is licensed under BSD
 License:	PHP 3.01 and Zend and BSD
 Group:		Libraries
-Source0:	http://www.php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5:	f6b90cd0503310c38e9573bae1eb38c7
+#Source0:	http://www.php.net/distributions/%{orgname}-%{version}.tar.xz
+Source0:	https://github.com/php/php-src/archive/master/%{orgname}-%{version}.tar.gz
+# Source0-md5:	a50ad24a755dd225d0f1ee674c3dbe1f
 Source2:	%{orgname}-mod_%{orgname}.conf
 Source3:	%{orgname}-cgi-fcgi.ini
 Source4:	%{orgname}-apache.ini
@@ -185,9 +186,9 @@ Patch29:	%{orgname}-fcgi-graceful.patch
 Patch31:	%{orgname}-fcgi-error_log-no-newlines.patch
 Patch34:	%{orgname}-libtool.patch
 Patch35:	%{orgname}-tds.patch
-Patch36:	%{orgname}-mysql-charsetphpini.patch
-Patch37:	%{orgname}-mysqli-charsetphpini.patch
-Patch38:	%{orgname}-pdo_mysql-charsetphpini.patch
+#Patch36:	%{orgname}-mysql-charsetphpini.patch
+#Patch37:	%{orgname}-mysqli-charsetphpini.patch
+#Patch38:	%{orgname}-pdo_mysql-charsetphpini.patch
 Patch39:	%{orgname}-use-prog_sendmail.patch
 Patch41:	%{orgname}-fpm-config.patch
 Patch42:	%{orgname}-fpm-shared.patch
@@ -209,7 +210,6 @@ Patch66:	php-db.patch
 Patch67:	mysql-lib-ver-mismatch.patch
 Patch69:	fpm-conf-split.patch
 Patch70:	mysqlnd-ssl.patch
-Patch71:	libvpx2.patch
 URL:		http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:	Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:	aspell-devel >= 2:0.50.0}
@@ -296,10 +296,10 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		_sysconfdir			%{php_sysconfdir}
 
 # must be in sync with source. extra check ensuring that it is so is done in %%build
-%define		php_api_version		20131106
-%define		zend_module_api		20131226
-%define		zend_extension_api	220131226
-%define		php_pdo_api_version	20080721
+%define		php_api_version		20131218
+%define		zend_module_api		20141001
+%define		zend_extension_api	320140815
+%define		php_pdo_api_version	20150127
 
 # Extension versions
 %define		bz2ver		1.0
@@ -307,11 +307,11 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		fileinfover	1.0.5
 %define		hashver		1.0
 %define		intlver		1.1.0
-%define		jsonver		1.2.1
-%define		opcachever	7.0.4-dev
+%define		jsonver		1.4.0
+%define		opcachever	7.0.6-dev
 %define		pharver		2.0.2
 %define		sqlite3ver	0.7-dev
-%define		zipver		1.12.5
+%define		zipver		1.13.0dev
 %define		phpdbgver	0.4.0
 
 %define		_zend_zts		%{!?with_zts:0}%{?with_zts:1}
@@ -1989,11 +1989,16 @@ compression support to PHP.
 Moduł PHP umożliwiający używanie kompresji zlib.
 
 %prep
+%if 0
 %setup -q -n %{orgname}-%{version}%{?subver}
+%else
+%setup -qc -n %{orgname}-%{version}
+mv php-src-*/* .
+%endif
 cp -p php.ini-production php.ini
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+#%patch2 -p1 NEEDS PORTING
 %patch3 -p1
 %patch5 -p1
 %patch6 -p1
@@ -2017,9 +2022,9 @@ cp -p php.ini-production php.ini
 %patch34 -p1
 %endif
 %{?with_sybase_ct:%patch35 -p1}
-%patch36 -p1
-%patch37 -p1
-%patch38 -p1
+#%patch36 -p1
+#%patch37 -p1
+#%patch38 -p1
 %patch39 -p1
 %if %{with fpm}
 %if 0
@@ -2034,7 +2039,7 @@ diff -u %{orgname}-%{version}/sapi/fpm/php-fpm.conf.in{.orig,} > %{PATCH69}
 diff -u /dev/null %{orgname}-%{version}/sapi/fpm/php-fpm.conf-d.in >> %{PATCH69}
 exit 1
 %else
-%patch69 -p1
+#%patch69 -p1
 %endif
 %patch41 -p1
 %patch42 -p1
@@ -2059,7 +2064,6 @@ exit 1
 %patch66 -p1
 %patch67 -p1
 %patch70 -p1
-%patch71 -p1
 
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
 
@@ -2197,7 +2201,7 @@ if test "$ver" != "%{jsonver}"; then
 	: Update the jsonver macro and rebuild.
 	exit 1
 fi
-ver=$(sed -n '/#define PHP_ZENDOPCACHE_VERSION /{s/.* "//;s/".*$//;p}' ext/opcache/ZendAccelerator.h)
+ver=$(awk '/#define PHP_ZENDOPCACHE_VERSION/ {print $3}' ext/opcache/ZendAccelerator.h | xargs)
 if test "$ver" != "%{opcachever}"; then
 	: Error: Upstream Zend Opcache version is now ${ver}, expecting %{opcachever}.
 	: Update the opcachever macro and rebuild.
@@ -2221,7 +2225,7 @@ if test "$ver" != "%{enchantver}"; then
 	: Update the enchantver macro and rebuild.
 	exit 1
 fi
-ver=$(awk '/#define PHP_HASH_EXTVER/ {print $3}' ext/hash/php_hash.h | xargs)
+ver=$(awk '/#define PHP_HASH_VERSION/ {print $3}' ext/hash/php_hash.h | xargs)
 if test "$ver" != "%{hashver}"; then
 	: Error: Upstream HASH version is now ${ver}, expecting %{hashver}.
 	: Update the hashver macro and rebuild.
@@ -2446,11 +2450,11 @@ cp -af Makefile.cli Makefile
 	MYSQLND_SHARED_LIBADD="-lssl -lcrypto"
 
 %if %{with apache1}
-%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp5.la -f Makefile.apxs1
+%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp7.la -f Makefile.apxs1
 %endif
 
 %if %{with apache2}
-%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache2handler/libphp5.la -f Makefile.apxs2
+%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache2handler/libphp7.la -f Makefile.apxs2
 %endif
 
 %if %{with litespeed}
@@ -2458,7 +2462,7 @@ cp -af Makefile.cli Makefile
 %endif
 
 %if %{with embed}
-%{__make} -f Makefile.embed libphp5.la
+%{__make} -f Makefile.embed libphp7.la
 %endif
 
 %if %{with phpdbg}
@@ -2591,16 +2595,16 @@ v=$(echo %{version} | cut -d. -f1-2)
 
 # install Apache1 DSO module
 %if %{with apache1}
-libtool --mode=install install -p sapi/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache1
-mv $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5{,-$v}.so
-ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.so
+libtool --mode=install install -p sapi/apache/libphp7.la $RPM_BUILD_ROOT%{_libdir}/apache1
+mv $RPM_BUILD_ROOT%{_libdir}/apache1/libphp7{,-$v}.so
+ln -s libphp7-$v.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp7.so
 %endif
 
 # install Apache2 DSO module
 %if %{with apache2}
-libtool --mode=install install -p sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache
-mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp5{,-$v}.so
-ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so
+libtool --mode=install install -p sapi/apache2handler/libphp7.la $RPM_BUILD_ROOT%{_libdir}/apache
+mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp7{,-$v}.so
+ln -s libphp7-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp7.so
 %endif
 
 # install litespeed sapi
@@ -2634,7 +2638,7 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir}/fpm.d,%{_sbindir}}
 libtool --mode=install install -p sapi/fpm/php-fpm $RPM_BUILD_ROOT%{_sbindir}/%{name}-fpm
 cp -p sapi/fpm/php-fpm.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}-fpm.8
 cp -p sapi/fpm/php-fpm.conf $RPM_BUILD_ROOT%{_sysconfdir}
-cp -p sapi/fpm/php-fpm.conf-d $RPM_BUILD_ROOT%{_sysconfdir}/fpm.d/www.conf
+cp -p sapi/fpm/www.conf $RPM_BUILD_ROOT%{_sysconfdir}/fpm.d
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-fpm
 install -d $RPM_BUILD_ROOT/etc/logrotate.d
@@ -2655,7 +2659,7 @@ cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
 # we could use install-headers from Makefile.embed, but that would reinstall all headers
 # install-sapi installs to wrong dir, so just do it all manually
 install -d $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
-install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}
+install -p libs/libphp7.so $RPM_BUILD_ROOT%{_libdir}
 cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
 %endif
 
@@ -2672,13 +2676,13 @@ cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
 %if %{with apache1}
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php.conf
 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache.ini
-%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.la
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache1/libphp7.la
 %endif
 
 %if %{with apache2}
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd/conf.d/70_mod_php.conf
 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache2handler.ini
-%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp7.la
 %endif
 
 # ensure that paths are correct for current php version and arch
@@ -2914,8 +2918,8 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/apache/conf.d/*_mod_php.conf
 %dir %{_sysconfdir}/apache.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache.ini
-%attr(755,root,root) %{_libdir}/apache1/libphp5.so
-%attr(755,root,root) %{_libdir}/apache1/libphp5-*.*.so
+%attr(755,root,root) %{_libdir}/apache1/libphp7.so
+%attr(755,root,root) %{_libdir}/apache1/libphp7-*.*.so
 %endif
 
 %if %{with apache2}
@@ -2924,8 +2928,8 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/conf.d/*_mod_php.conf
 %dir %{_sysconfdir}/apache2handler.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
-%attr(755,root,root) %{_libdir}/apache/libphp5.so
-%attr(755,root,root) %{_libdir}/apache/libphp5-*.*.so
+%attr(755,root,root) %{_libdir}/apache/libphp7.so
+%attr(755,root,root) %{_libdir}/apache/libphp7-*.*.so
 %endif
 
 %if %{with litespeed}
@@ -2946,7 +2950,7 @@ fi
 %if %{with embed}
 %files embedded
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libphp5.so
+%attr(755,root,root) %{_libdir}/libphp7.so
 %endif
 
 %files cli
@@ -2993,7 +2997,7 @@ fi
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
-%attr(755,root,root) %{_libdir}/libphp_common-*.so
+#%attr(755,root,root) %{_libdir}/libphp_common-*.so
 %dir %{php_extensiondir}
 
 %doc ext/session/mod_files.sh
@@ -3003,7 +3007,7 @@ fi
 %doc CODING_STANDARDS README.{EXT_SKEL,PARAMETER_PARSING_API,SELF-CONTAINED-EXTENSIONS,STREAMS,SUBMITTING_PATCH,TESTING,TESTING2,UNIX-BUILD-SYSTEM,input_filter}
 %attr(755,root,root) %{_bindir}/phpize
 %attr(755,root,root) %{_bindir}/php-config
-%attr(755,root,root) %{_libdir}/libphp_common.so
+#%attr(755,root,root) %{_libdir}/libphp_common.so
 %{_libdir}/libphp_common.la
 %{_includedir}/php
 %{_libdir}/%{name}/build
diff --git a/libvpx2.patch b/libvpx2.patch
deleted file mode 100644
index 9f0bd9f..0000000
--- a/libvpx2.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Fix build with latest libvpx 1.4.0
-These new constants exist at least since 1.0.0
-Compatibility ones have been droped in 1.4.0
-
-https://github.com/libgd/libgd/commit/d41eb72cd4545c394578332e5c102dee69e02ee8
-
-From d242f958dfca03640356ea29f624005a895f64a0 Mon Sep 17 00:00:00 2001
-From: Ole Markus With <olemarkus at olemarkus.org>
-Date: Sun, 24 May 2015 09:19:09 +0200
-Subject: [PATCH] Fix for bug #69479: GD fails to build with newer libvpx
-
----
- ext/gd/libgd/webpimg.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/ext/gd/libgd/webpimg.c b/ext/gd/libgd/webpimg.c
-index 1f1c023..9d801a2 100644
---- a/ext/gd/libgd/webpimg.c
-+++ b/ext/gd/libgd/webpimg.c
-@@ -706,14 +706,14 @@ static WebPResult VPXEncode(const uint8* Y,
-     codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
-     codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
- 
--    vpx_img_wrap(&img, IMG_FMT_I420,
-+    vpx_img_wrap(&img, VPX_IMG_FMT_I420,
-                  y_width, y_height, 16, (uint8*)(Y));
--    img.planes[PLANE_Y] = (uint8*)(Y);
--    img.planes[PLANE_U] = (uint8*)(U);
--    img.planes[PLANE_V] = (uint8*)(V);
--    img.stride[PLANE_Y] = y_stride;
--    img.stride[PLANE_U] = uv_stride;
--    img.stride[PLANE_V] = uv_stride;
-+    img.planes[VPX_PLANE_Y] = (uint8*)(Y);
-+    img.planes[VPX_PLANE_U] = (uint8*)(U);
-+    img.planes[VPX_PLANE_V] = (uint8*)(V);
-+    img.stride[VPX_PLANE_Y] = y_stride;
-+    img.stride[VPX_PLANE_U] = uv_stride;
-+    img.stride[VPX_PLANE_V] = uv_stride;
- 
-     res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
- 
diff --git a/mysql-lib-ver-mismatch.patch b/mysql-lib-ver-mismatch.patch
index d49d195..81d9261 100644
--- a/mysql-lib-ver-mismatch.patch
+++ b/mysql-lib-ver-mismatch.patch
@@ -9,14 +9,3 @@
  	if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
  		php_error_docref(NULL TSRMLS_CC, E_NOTICE,
  						"Headers and client library minor version mismatch. Headers:%d Library:%ld",
---- php-5.3.27/ext/mysql/php_mysql.c~	2013-11-20 00:19:11.000000000 +0200
-+++ php-5.3.27/ext/mysql/php_mysql.c	2013-11-20 00:20:01.719956531 +0200
-@@ -704,7 +704,7 @@
- 	zend_bool free_host=0, new_link=0;
- 	long connect_timeout;
- 
--#if !defined(MYSQL_USE_MYSQLND)
-+#if 0 && !defined(MYSQL_USE_MYSQLND)
- 	if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
- 		php_error_docref(NULL TSRMLS_CC, E_NOTICE,
- 						"Headers and client library minor version mismatch. Headers:%d Library:%ld",
diff --git a/pcre-shared.patch b/pcre-shared.patch
index 642207d..73da09d 100644
--- a/pcre-shared.patch
+++ b/pcre-shared.patch
@@ -1,5 +1,5 @@
---- php-5.5.0alpha6/ext/pcre/config0.m4~	2013-03-19 18:08:15.000000000 +0200
-+++ php-5.5.0alpha6/ext/pcre/config0.m4	2013-03-19 18:09:26.732804962 +0200
+--- php-7.0/ext/pcre/config0.m4~	2015-05-24 14:39:04.000000000 +0300
++++ php-7.0/ext/pcre/config0.m4	2015-05-24 14:53:49.980250297 +0300
 @@ -11,7 +11,7 @@
  
    if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
@@ -27,35 +27,35 @@
      
      AC_DEFINE(HAVE_PCRE, 1, [ ])
      PHP_ADD_INCLUDE($PCRE_INCDIR)
--    PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
-+    PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared)
+-    PHP_NEW_EXTENSION(pcre, php_pcre.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
++    PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
      PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
 +    EXTRA_LIBS="$EXTRA_LIBS -lpcre"
    else
      AC_MSG_CHECKING([for PCRE library to use])
      AC_MSG_RESULT([bundled])
-@@ -61,7 +61,7 @@
-     				 pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
-     				 pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
-     PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I at ext_srcdir@/pcrelib"
+@@ -61,7 +62,7 @@
+     				 pcrelib/pcre_version.c pcrelib/pcre_xclass.c \
+     				 pcrelib/pcre_jit_compile.c"
+     PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I at ext_srcdir@/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
 -    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
 +    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,$PHP_PCRE_CFLAGS)
      PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
      PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
      AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
---- php-5.3.1/ext/pcre/php_pcre.h	2009-11-30 20:59:04.046581246 +0200
-+++ php-5.3.1.pcre/ext/pcre/php_pcre.h	2009-11-30 21:38:06.435493243 +0000
+--- php-7.0/ext/pcre/php_pcre.h~	2015-05-21 17:57:06.000000000 +0300
++++ php-7.0/ext/pcre/php_pcre.h	2015-05-24 14:56:27.528425546 +0300
 @@ -34,7 +34,12 @@
  #endif
  
- PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC);
+ PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int limit, int *replace_count);
 +#if COMPILE_DL_PCRE
 +#define pcre_get_compiled_regex pcre_get_compiled_regex_p
-+extern PHPAPI pcre* (*pcre_get_compiled_regex)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
++extern PHPAPI pcre* (*pcre_get_compiled_regex)(zend_string *regex, pcre_extra **extra, int *options);
 +#else
- PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
+ PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options);
 +#endif
- PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC);
+ PHPAPI pcre* pcre_get_compiled_regex_ex(zend_string *regex, pcre_extra **extra, int *preg_options, int *coptions);
  
  extern zend_module_entry pcre_module_entry;
 --- php-5.3.1/ext/pcre/php_pcre.c	2009-11-30 21:10:01.370473754 +0200
@@ -66,7 +66,7 @@
  
 +#if COMPILE_DL_PCRE
 +#undef pcre_get_compiled_regex
-+PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC);
++PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options);
 +#endif
 +
  #include "ext/standard/php_string.h"
@@ -99,7 +99,7 @@
  
 +#if COMPILE_DL_PCRE
 +// will be visible in here
-+PHPAPI pcre* (*pcre_get_compiled_regex_p)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
++PHPAPI pcre* (*pcre_get_compiled_regex_p)(zend_string *regex, pcre_extra **extra, int *options);
 +#endif
 +
  #define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
diff --git a/php-fcgi-error_log-no-newlines.patch b/php-fcgi-error_log-no-newlines.patch
index cedf82c..83c4509 100644
--- a/php-fcgi-error_log-no-newlines.patch
+++ b/php-fcgi-error_log-no-newlines.patch
@@ -1,14 +1,14 @@
---- php-5.6.6/sapi/cgi/cgi_main.c~	2015-02-27 18:09:34.000000000 +0200
-+++ php-5.6.6/sapi/cgi/cgi_main.c	2015-02-27 18:11:26.296171361 +0200
-@@ -737,12 +737,8 @@
+--- php-7.0/sapi/cgi/cgi_main.c~	2015-05-21 23:12:23.000000000 +0300
++++ php-7.0/sapi/cgi/cgi_main.c	2015-05-21 23:13:24.947976867 +0300
+@@ -701,12 +701,8 @@
  		request = (fcgi_request*) SG(server_context);
  		if (request) {
- 			int ret, len = strlen(message);
+ 			int ret, len = (int)strlen(message);
 -			char *buf = malloc(len+2);
  
 -			memcpy(buf, message, len);
 -			memcpy(buf + len, "\n", sizeof("\n"));
--			ret = fcgi_write(request, FCGI_STDERR, buf, len + 1);
+-			ret = fcgi_write(request, FCGI_STDERR, buf, (int)(len + 1));
 -			free(buf);
 +			ret = fcgi_write(request, FCGI_STDERR, message, len);
  			if (ret < 0) {
diff --git a/php-fpm-config.patch b/php-fpm-config.patch
index 69a9371..dbd931a 100644
--- a/php-fpm-config.patch
+++ b/php-fpm-config.patch
@@ -17,20 +17,8 @@
  
  ; syslog_facility is used to specify what type of program is logging the
  ; message. This lets syslogd specify that messages from different facilities
-@@ -115,3 +115,11 @@
- ; ports and different management options.  The name of the pool will be
- ; used in logs and stats. There is no limitation on the number of pools which
- ; FPM can handle. Your system will tell you anyway :)
-+
-+; Include one or more files. If glob(3) exists, it is used to include a bunch of
-+; files from a glob(3) pattern. This directive can be used everywhere in the
-+; file.
-+; Relative path can also be used. They will be prefixed by:
-+;  - the global prefix if it's been set (-p argument)
-+;  - @prefix@ otherwise
-+include=/etc/php/fpm.d/*.conf
---- php-5.6.5/sapi/fpm/php-fpm.conf-d.in~	2015-02-04 19:26:16.000000000 +0200
-+++ php-5.6.5/sapi/fpm/php-fpm.conf-d.in	2015-02-04 19:27:25.275218535 +0200
+--- php-5.6.5/sapi/fpm/www.conf.in~	2015-02-04 19:26:16.000000000 +0200
++++ php-5.6.5/sapi/fpm/www.conf.in	2015-02-04 19:27:25.275218535 +0200
 @@ -32,7 +32,7 @@
  ;                            specific port;
  ;   '/path/to/unix/socket' - to listen on a unix socket.
@@ -82,16 +70,18 @@
  
  			ths = document.getElementsByTagName("th");
  			for (var i=0; i<ths.length; i++) {
---- php-5.6.2/sapi/fpm/Makefile.frag~	2014-10-27 08:18:59.000000000 +0200
-+++ php-5.6.2/sapi/fpm/Makefile.frag	2014-10-27 08:19:37.524436179 +0200
-@@ -12,8 +12,8 @@
+--- php7.0-7.0/sapi/fpm/Makefile.frag~	2015-05-21 17:57:06.000000000 +0300
++++ php7.0-7.0/sapi/fpm/Makefile.frag	2015-05-23 11:01:51.383332821 +0300
+@@ -11,9 +11,9 @@
+ 	@$(INSTALL) -m 0755 $(SAPI_FPM_PATH) $(INSTALL_ROOT)$(sbindir)/$(program_prefix)php-fpm$(program_suffix)$(EXEEXT)
  
  	@echo "Installing PHP FPM config:        $(INSTALL_ROOT)$(sysconfdir)/" && \
- 	$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/fpm.d || :
+-	$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d || :
 -	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default || :
--	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf.default || :
+-	@$(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default || :
++	$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/fpm.d || :
 +	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf || :
-+	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf || :
++	@$(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf || :
  
  	@echo "Installing PHP FPM man page:      $(INSTALL_ROOT)$(mandir)/man8/"
  	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8
diff --git a/php-ini.patch b/php-ini.patch
index 8017a55..92cf571 100644
--- a/php-ini.patch
+++ b/php-ini.patch
@@ -1,5 +1,5 @@
---- php-5.6.0beta1/php.ini~	2014-04-21 21:38:01.000000000 +0300
-+++ php-5.6.0beta1/php.ini	2014-04-21 21:51:47.379819417 +0300
+--- php-7.0/php.ini~	2015-05-21 23:06:55.000000000 +0300
++++ php-7.0/php.ini	2015-05-21 23:08:25.125742768 +0300
 @@ -82,6 +82,20 @@
  ; much more verbose when it comes to errors. We recommending using the
  ; development version only in development environments as errors shown to
@@ -111,14 +111,14 @@
  ;;;;;;;;;;;;;;;;
  ; File Uploads ;
  ;;;;;;;;;;;;;;;;
-@@ -884,49 +837,8 @@
+@@ -825,48 +825,8 @@
  ; If you only provide the name of the extension, PHP will look for it in its
  ; default extension directory.
  ;
 -; Windows Extensions
 -; Note that ODBC support is built in, so no dll is needed for it.
--; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
--; extension folders as well as the separate PECL DLL download (PHP 5).
+-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
+-; extension folders as well as the separate PECL DLL download (PHP 5+).
 -; Be sure to appropriately set the extension_dir directive.
 -;
 -;extension=php_bz2.dll
@@ -154,12 +154,11 @@
 -;extension=php_soap.dll
 -;extension=php_sockets.dll
 -;extension=php_sqlite3.dll
--;extension=php_sybase_ct.dll
 -;extension=php_tidy.dll
 -;extension=php_xmlrpc.dll
 -;extension=php_xsl.dll
-+; Ideally in PLD Linux you should install appropriate php-<extension> or
-+; php-pecl-<extension> package.
++; Ideally in PLD Linux you should install appropriate php7.0-<extension> or
++; php7.0-pecl-<extension> package.
  
  ;;;;;;;;;;;;;;;;;;;
  ; Module Settings ;
diff --git a/php-pldlogo.patch b/php-pldlogo.patch
index a43cc08..58c42ee 100644
--- a/php-pldlogo.patch
+++ b/php-pldlogo.patch
@@ -1,9 +1,10 @@
---- php-5.5.0alpha1/ext/standard/info.c~	2012-11-13 22:00:16.000000000 +0200
-+++ php-5.5.0alpha1/ext/standard/info.c	2012-11-18 23:37:48.607735302 +0200
-@@ -794,6 +794,18 @@
- 			zend_html_puts(zend_version, strlen(zend_version) TSRMLS_CC);
+--- php-7.0/ext/standard/info.c~	2015-05-21 17:57:06.000000000 +0300
++++ php-7.0/ext/standard/info.c	2015-05-21 22:56:10.367595637 +0300
+@@ -651,6 +651,20 @@
+ 			php_info_print_table_row(2, "PHP Version", PHP_VERSION);
  		}
  		php_info_print_box_end();
++
 +		/* PLD Linux */
 +		php_info_print_box_start(0);
 +		if (!sapi_module.phpinfo_as_text) {
@@ -16,9 +17,10 @@
 +		else
 +			php_info_print("\nMore information at http://www.pld-linux.org/.\n");
 +		php_info_print_box_end();
- 		efree(php_uname);
- 	}
- 
++
+ 		php_info_print_table_start();
+ 		php_info_print_table_row(2, "System", php_uname->val);
+ 		php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__);
 --- php-5.6.0beta1/ext/standard/info.h~	2014-04-10 08:11:48.000000000 +0300
 +++ php-5.6.0beta1/ext/standard/info.h	2014-04-21 21:37:12.184288611 +0300
 @@ -54,6 +54,7 @@
diff --git a/php-sapi-ini-file.patch b/php-sapi-ini-file.patch
index d42f15b..9579ef8 100644
--- a/php-sapi-ini-file.patch
+++ b/php-sapi-ini-file.patch
@@ -1,6 +1,6 @@
---- php-5.5.21/main/php_ini.c	2015-01-21 12:23:27.000000000 +0200
-+++ php-5.5.21/main/php_ini.c	2015-02-25 01:40:21.335354971 +0200
-@@ -378,12 +378,19 @@
+--- php-7.0/main/php_ini.c~	2015-05-21 22:56:59.000000000 +0300
++++ php-7.0/main/php_ini.c	2015-05-21 23:01:21.580419532 +0300
+@@ -379,12 +379,19 @@
  }
  /* }}} */
  
@@ -11,7 +11,7 @@
 +
  /* {{{ php_init_config
   */
- int php_init_config(TSRMLS_D)
+ int php_init_config(void)
  {
  	char *php_ini_file_name = NULL;
  	char *php_ini_search_path = NULL;
@@ -51,23 +51,27 @@
  		if (!fh.handle.fp) {
  			const char *fmt = "php-%s.ini";
  			char *ini_fname;
-@@ -572,13 +600,10 @@
+@@ -594,15 +601,12 @@
  			if (fh.handle.fp) {
- 				fh.filename = php_ini_opened_path;
+ 				fh.filename = opened_path->val;
  			}
 -		}
  
 -		/* If still no ini file found, search for php.ini file in search path */
 -		if (!fh.handle.fp) {
--			fh.handle.fp = php_fopen_with_path("php.ini", "r", php_ini_search_path, &php_ini_opened_path TSRMLS_CC);
+-			fh.handle.fp = php_fopen_with_path("php.ini", "r", php_ini_search_path, &opened_path);
 -			if (fh.handle.fp) {
--				fh.filename = php_ini_opened_path;
+-				fh.filename = opened_path->val;
+-			}
+-		}
 +			// restore previous value, so php_ini_loaded_file() works as expected
 +			if (php_ini_loaded_file) {
 +				php_ini_opened_path = php_ini_loaded_file;
- 			}
- 		}
++ 			}
++ 		}
  	}
+ 
+ 	if (free_ini_search_path) {
 @@ -597,6 +622,10 @@
  
  		{
diff --git a/php-silent-session-cleanup.patch b/php-silent-session-cleanup.patch
index 5833736..2fdf68e 100644
--- a/php-silent-session-cleanup.patch
+++ b/php-silent-session-cleanup.patch
@@ -1,10 +1,10 @@
---- php-5.3.0/ext/session/mod_files.c~	2009-05-18 18:10:09.000000000 +0200
-+++ php-5.3.0/ext/session/mod_files.c	2009-08-07 08:41:53.029357590 +0200
-@@ -217,7 +217,6 @@
+--- php-7.0/ext/session/mod_files.c~	2015-05-21 17:57:06.000000000 +0300
++++ php-7.0/ext/session/mod_files.c	2015-05-23 11:18:54.466402493 +0300
+@@ -286,7 +286,6 @@
  
  	dir = opendir(dirname);
  	if (!dir) {
--		php_error_docref(NULL TSRMLS_CC, E_NOTICE, "ps_files_cleanup_dir: opendir(%s) failed: %s (%d)", dirname, strerror(errno), errno);
+-		php_error_docref(NULL, E_NOTICE, "ps_files_cleanup_dir: opendir(%s) failed: %s (%d)", dirname, strerror(errno), errno);
  		return (0);
  	}
  
diff --git a/php-zlib-for-getimagesize.patch b/php-zlib-for-getimagesize.patch
index 9a2bc9d..50a3ec3 100644
--- a/php-zlib-for-getimagesize.patch
+++ b/php-zlib-for-getimagesize.patch
@@ -2,8 +2,8 @@ make compressed .swf parsing possible,
 link core php with -lz for getimagesize()
 see also http://bugs.php.net/bug.php?id=29611
 
---- php-4.4.1/ext/standard/image.c	2005-07-27 14:22:36.000000000 +0300
-+++ /tmp/image.c	2006-01-06 19:14:00.000000000 +0200
+--- php-7.0/ext/standard/image.c~	2015-05-21 23:10:45.000000000 +0300
++++ php-7.0/ext/standard/image.c	2015-05-21 23:11:22.424948534 +0300
 @@ -31,7 +31,7 @@
  #endif
  #include "php_image.h"
@@ -31,12 +31,12 @@ see also http://bugs.php.net/bug.php?id=29611
  /* {{{ php_handle_swc
   */
  static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC)
-@@ -1267,7 +1290,7 @@
- 			result = php_handle_swf(stream TSRMLS_CC);
+@@ -1321,7 +1321,7 @@
+ 			result = php_handle_swf(stream);
  			break;
  		case IMAGE_FILETYPE_SWC:
 -#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 +#if HAVE_ZLIB
- 			result = php_handle_swc(stream TSRMLS_CC);
+ 			result = php_handle_swc(stream);
  #else
- 			php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled.");
+ 			php_error_docref(NULL, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled");
diff --git a/skip-tests.sh b/skip-tests.sh
index 8d76b12..da4aedb 100644
--- a/skip-tests.sh
+++ b/skip-tests.sh
@@ -2,7 +2,7 @@
 # timezone_location_get: Test that timezone_location_get returns a correct array of information
 mv ext/date/tests/timezone_location_get.phpt{,.skip}
 # DBA DB4 magic_quotes_runtime Test (info: DB4 handler used)
-mv ext/dba/tests/dba_db4_010.phpt{,.skip}
+#mv ext/dba/tests/dba_db4_010.phpt{,.skip}
 # DBA TCADB handler test
 mv ext/dba/tests/dba_tcadb.phpt{,.skip}
 # enchant_broker_describe() function
@@ -11,50 +11,6 @@ $x86 && mv ext/enchant/tests/broker_describe.phpt{,.skip}
 $x86 && mv ext/enchant/tests/broker_request_dict.phpt{,.skip}
 # bug #13181, leaving a context frees the broker resources
 $x86 && mv ext/enchant/tests/bug13181.phpt{,.skip}
-# Test ereg() function : basic functionality (with $regs)
-mv ext/ereg/tests/ereg_basic_001.phpt{,.skip}
-# Test ereg() function : basic functionality  (without $regs)
-mv ext/ereg/tests/ereg_basic_002.phpt{,.skip}
-# Test ereg() function : error conditions - test bad regular expressions
-mv ext/ereg/tests/ereg_error_002.phpt{,.skip}
-# Test ereg_replace() function : basic functionality
-mv ext/ereg/tests/ereg_replace_basic_001.phpt{,.skip}
-# Test ereg_replace() function : error conditions - bad regular expressions
-mv ext/ereg/tests/ereg_replace_error_002.phpt{,.skip}
-# Test ereg_replace() function : usage variations - unexpected type arg 1
-mv ext/ereg/tests/ereg_replace_variation_001.phpt{,.skip}
-# Test ereg() function : usage variations  - unexpected type arg 1
-mv ext/ereg/tests/ereg_variation_001.phpt{,.skip}
-# Test eregi() function : basic functionality (with $regs)
-mv ext/ereg/tests/eregi_basic_001.phpt{,.skip}
-# Test eregi() function : basic functionality  (without $regs)
-mv ext/ereg/tests/eregi_basic_002.phpt{,.skip}
-# Test eregi() function : error conditions - test bad regular expressions
-mv ext/ereg/tests/eregi_error_002.phpt{,.skip}
-# Test ereg() function : basic functionality
-mv ext/ereg/tests/eregi_replace_basic_001.phpt{,.skip}
-# Test eregi_replace() function : error conditions - bad regular expressions
-mv ext/ereg/tests/eregi_replace_error_002.phpt{,.skip}
-# Test eregi_replace() function : usage variations - unexpected type arg 1
-mv ext/ereg/tests/eregi_replace_variation_001.phpt{,.skip}
-# Test eregi() function : usage variations  - unexpected type arg 1
-mv ext/ereg/tests/eregi_variation_001.phpt{,.skip}
-# Test split() function : basic functionality - test a number of simple split, specifying a limit
-mv ext/ereg/tests/split_basic_001.phpt{,.skip}
-# Test split() function : basic functionality - test a number of simple split, without specifying a limit
-mv ext/ereg/tests/split_basic_002.phpt{,.skip}
-# Test split() function : error conditions - test bad regular expressions
-mv ext/ereg/tests/split_error_002.phpt{,.skip}
-# Test split() function : usage variations  - unexpected type for arg 1
-mv ext/ereg/tests/split_variation_001.phpt{,.skip}
-# Test spliti() function : basic functionality - test a number of simple spliti, specifying a limit
-mv ext/ereg/tests/spliti_basic_001.phpt{,.skip}
-# Test spliti() function : basic functionality - test a number of simple spliti, without specifying a limit
-mv ext/ereg/tests/spliti_basic_002.phpt{,.skip}
-# Test spliti() function : error conditions - test bad regular expressions
-mv ext/ereg/tests/spliti_error_002.phpt{,.skip}
-# Test spliti() function : usage variations  - unexpected type for arg 1
-mv ext/ereg/tests/spliti_variation_001.phpt{,.skip}
 # Bug #60150 (Integer overflow during the parsing of invalid exif header)
 $ix86 mv ext/exif/tests/bug60150.phpt{,.skip}
 # Bug #52209 (INPUT_ENV returns NULL for set variables (CLI))
diff --git a/spl-shared.patch b/spl-shared.patch
index 8c10277..9aea6c4 100644
--- a/spl-shared.patch
+++ b/spl-shared.patch
@@ -1,11 +1,11 @@
---- php-5.3.1/ext/spl/config.m4~	2009-11-26 23:54:34.000000000 +0000
-+++ php-5.3.1/ext/spl/config.m4	2009-11-27 08:04:05.788823797 +0000
+--- php-7.0/ext/spl/config.m4~	2015-05-21 17:57:06.000000000 +0300
++++ php-7.0/ext/spl/config.m4	2015-05-23 11:25:19.609715006 +0300
 @@ -22,6 +22,6 @@
    CPPFLAGS=$old_CPPFLAGS
    AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
    AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
--  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no)
-+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, $ext_shared)
+-  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
++  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
    PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h])
    PHP_ADD_EXTENSION_DEP(spl, pcre, true)
 --- php-5.3.1/ext/spl/spl_iterators.c~	2009-07-04 20:31:27.000000000 +0000
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/f4ee12ea3d15ec70f1f958f0cdfbf66877fc7800



More information about the pld-cvs-commit mailing list