summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-08-08 09:48:17 +0200
committerRemi Collet <fedora@famillecollet.com>2013-08-08 09:48:17 +0200
commitab3100ff33db0d9606060d9535d8d42019028832 (patch)
treefcb53677e76edb8cc566392d0218ad495e97b6b4
parent534a8dc1cd5a62b16bec018770de0dc49336a06b (diff)
php 5.5: improve system libzip patch
-rw-r--r--php-5.5.2-system-libzip.patch (renamed from php-5.5.0-system-libzip.patch)68
-rw-r--r--php55.spec8
2 files changed, 45 insertions, 31 deletions
diff --git a/php-5.5.0-system-libzip.patch b/php-5.5.2-system-libzip.patch
index 409af5d..e453411 100644
--- a/php-5.5.0-system-libzip.patch
+++ b/php-5.5.2-system-libzip.patch
@@ -1,6 +1,6 @@
-diff -up php5.5-201304181030/ext/zip/config.m4.systzip php5.5-201304181030/ext/zip/config.m4
---- php5.5-201304181030/ext/zip/config.m4.systzip 2012-12-05 11:40:39.000000000 +0100
-+++ php5.5-201304181030/ext/zip/config.m4 2013-04-18 13:17:32.144550036 +0200
+diff -up php-5.5.2RC1/ext/zip/config.m4.systzip php-5.5.2RC1/ext/zip/config.m4
+--- php-5.5.2RC1/ext/zip/config.m4.systzip 2013-07-31 10:41:15.000000000 +0200
++++ php-5.5.2RC1/ext/zip/config.m4 2013-08-08 09:24:07.577567241 +0200
@@ -13,65 +13,116 @@ fi
PHP_ARG_WITH(pcre-dir, pcre install prefix,
[ --with-pcre-dir ZIP: pcre install prefix], no, no)
@@ -175,17 +175,10 @@ diff -up php5.5-201304181030/ext/zip/config.m4.systzip php5.5-201304181030/ext/z
dnl so we always include the known-good working hack.
PHP_ADD_MAKEFILE_FRAGMENT
-diff -up php5.5-201304181030/ext/zip/php_zip.c.systzip php5.5-201304181030/ext/zip/php_zip.c
---- php5.5-201304181030/ext/zip/php_zip.c.systzip 2013-04-10 22:36:34.000000000 +0200
-+++ php5.5-201304181030/ext/zip/php_zip.c 2013-04-18 13:23:29.997871990 +0200
-@@ -30,8 +30,233 @@
- #include "ext/pcre/php_pcre.h"
- #include "ext/standard/php_filestat.h"
- #include "php_zip.h"
-+
-+#if defined(HAVE_LIBZIP)
-+#include <zip.h>
-+
+diff -up php-5.5.2RC1/ext/zip/libzip-missing-0.10.h.systzip php-5.5.2RC1/ext/zip/libzip-missing-0.10.h
+--- php-5.5.2RC1/ext/zip/libzip-missing-0.10.h.systzip 2013-08-08 09:34:53.338910267 +0200
++++ php-5.5.2RC1/ext/zip/libzip-missing-0.10.h 2013-08-08 09:26:21.244072278 +0200
+@@ -0,0 +1,219 @@
+/* Copied from libzip 0.10 */
+
+/* state of change of a file in zip archive */
@@ -405,6 +398,23 @@ diff -up php5.5-201304181030/ext/zip/php_zip.c.systzip php5.5-201304181030/ext/z
+}
+
+
+diff -up php-5.5.2RC1/ext/zip/php_zip.c.systzip php-5.5.2RC1/ext/zip/php_zip.c
+--- php-5.5.2RC1/ext/zip/php_zip.c.systzip 2013-07-31 10:41:15.000000000 +0200
++++ php-5.5.2RC1/ext/zip/php_zip.c 2013-08-08 09:33:59.367735224 +0200
+@@ -30,8 +30,20 @@
+ #include "ext/pcre/php_pcre.h"
+ #include "ext/standard/php_filestat.h"
+ #include "php_zip.h"
++
++#if defined(HAVE_LIBZIP)
++#include <zip.h>
++
++#if LIBZIP_VERSION_MAJOR == 0 && LIBZIP_VERSION_MINOR == 10
++#include "libzip-missing-0.10.h"
++#else
++#error "Only libzip 0.10 supported for now"
++#endif
++
+#else
#include "lib/zip.h"
#include "lib/zipint.h"
@@ -412,7 +422,7 @@ diff -up php5.5-201304181030/ext/zip/php_zip.c.systzip php5.5-201304181030/ext/z
/* zip_open is a macro for renaming libzip zipopen, so we need to use PHP_NAMED_FUNCTION */
static PHP_NAMED_FUNCTION(zif_zip_open);
-@@ -1631,6 +1856,10 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
+@@ -1631,6 +1643,10 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
}
idx = zip_stat(intern, s, 0, &sb);
@@ -423,7 +433,7 @@ diff -up php5.5-201304181030/ext/zip/php_zip.c.systzip php5.5-201304181030/ext/z
if (idx >= 0) {
RETVAL_FALSE;
} else {
-@@ -1853,6 +2082,10 @@ static ZIPARCHIVE_METHOD(addFromString)
+@@ -1853,6 +1869,10 @@ static ZIPARCHIVE_METHOD(addFromString)
}
cur_idx = zip_name_locate(intern, (const char *)name, 0);
@@ -434,7 +444,7 @@ diff -up php5.5-201304181030/ext/zip/php_zip.c.systzip php5.5-201304181030/ext/z
/* TODO: fix _zip_replace */
if (cur_idx >= 0) {
if (zip_delete(intern, cur_idx) == -1) {
-@@ -2877,5 +3110,9 @@ static PHP_MINFO_FUNCTION(zip)9
+@@ -2877,5 +2897,9 @@ static PHP_MINFO_FUNCTION(zip)
php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
- php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION);
+#if defined(HAVE_LIBZIP)
@@ -445,9 +455,9 @@ diff -up php5.5-201304181030/ext/zip/php_zip.c.systzip php5.5-201304181030/ext/z
php_info_print_table_end();
}
-diff -up php5.5-201304181030/ext/zip/php_zip.h.systzip php5.5-201304181030/ext/zip/php_zip.h
---- php5.5-201304181030/ext/zip/php_zip.h.systzip 2013-01-01 11:36:17.000000000 +0100
-+++ php5.5-201304181030/ext/zip/php_zip.h 2013-04-18 13:17:32.147550046 +0200
+diff -up php-5.5.2RC1/ext/zip/php_zip.h.systzip php-5.5.2RC1/ext/zip/php_zip.h
+--- php-5.5.2RC1/ext/zip/php_zip.h.systzip 2013-07-31 10:41:15.000000000 +0200
++++ php-5.5.2RC1/ext/zip/php_zip.h 2013-08-08 09:24:07.579567249 +0200
@@ -28,7 +28,11 @@ extern zend_module_entry zip_module_entr
#include "TSRM.h"
#endif
@@ -460,9 +470,9 @@ diff -up php5.5-201304181030/ext/zip/php_zip.h.systzip php5.5-201304181030/ext/z
#define PHP_ZIP_VERSION_STRING "1.11.0"
-diff -up php5.5-201304181030/ext/zip/tests/bug38943.phpt.systzip php5.5-201304181030/ext/zip/tests/bug38943.phpt
---- php5.5-201304181030/ext/zip/tests/bug38943.phpt.systzip 2012-12-05 11:40:39.000000000 +0100
-+++ php5.5-201304181030/ext/zip/tests/bug38943.phpt 2013-04-18 13:17:32.147550046 +0200
+diff -up php-5.5.2RC1/ext/zip/tests/bug38943.phpt.systzip php-5.5.2RC1/ext/zip/tests/bug38943.phpt
+--- php-5.5.2RC1/ext/zip/tests/bug38943.phpt.systzip 2013-07-31 10:41:15.000000000 +0200
++++ php-5.5.2RC1/ext/zip/tests/bug38943.phpt 2013-08-08 09:24:07.579567249 +0200
@@ -27,7 +27,7 @@ array(1) {
[0]=>
int(1)
@@ -472,9 +482,9 @@ diff -up php5.5-201304181030/ext/zip/tests/bug38943.phpt.systzip php5.5-20130418
["test":"myZip":private]=>
int(0)
["testp"]=>
-diff -up php5.5-201304181030/ext/zip/tests/pecl12414.phpt.systzip php5.5-201304181030/ext/zip/tests/pecl12414.phpt
---- php5.5-201304181030/ext/zip/tests/pecl12414.phpt.systzip 2012-12-05 11:40:39.000000000 +0100
-+++ php5.5-201304181030/ext/zip/tests/pecl12414.phpt 2013-04-18 13:17:32.148550050 +0200
+diff -up php-5.5.2RC1/ext/zip/tests/pecl12414.phpt.systzip php-5.5.2RC1/ext/zip/tests/pecl12414.phpt
+--- php-5.5.2RC1/ext/zip/tests/pecl12414.phpt.systzip 2013-07-31 10:41:15.000000000 +0200
++++ php-5.5.2RC1/ext/zip/tests/pecl12414.phpt 2013-08-08 09:24:07.579567249 +0200
@@ -5,6 +5,8 @@ Bug #12414 ( extracting files from damag
/*$ */
if(!extension_loaded('zip')) die('skip');
@@ -484,9 +494,9 @@ diff -up php5.5-201304181030/ext/zip/tests/pecl12414.phpt.systzip php5.5-2013041
--FILE--
<?php
$filename = 'MYLOGOV2.GFX';
-diff -up php5.5-201304181030/ext/zip/zip_stream.c.systzip php5.5-201304181030/ext/zip/zip_stream.c
---- php5.5-201304181030/ext/zip/zip_stream.c.systzip 2012-12-05 11:40:39.000000000 +0100
-+++ php5.5-201304181030/ext/zip/zip_stream.c 2013-04-18 13:17:32.149550054 +0200
+diff -up php-5.5.2RC1/ext/zip/zip_stream.c.systzip php-5.5.2RC1/ext/zip/zip_stream.c
+--- php-5.5.2RC1/ext/zip/zip_stream.c.systzip 2013-07-31 10:41:15.000000000 +0200
++++ php-5.5.2RC1/ext/zip/zip_stream.c 2013-08-08 09:24:07.580567252 +0200
@@ -6,7 +6,11 @@
#if HAVE_ZIP
#ifdef ZEND_ENGINE_2
diff --git a/php55.spec b/php55.spec
index 2634a64..94d4dde 100644
--- a/php55.spec
+++ b/php55.spec
@@ -87,7 +87,7 @@ Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: 5.5.2
%if 0%{?snapdate:1}%{?rcver:1}
-Release: 0.1.%{?snapdate}%{?rcver}%{?dist}
+Release: 0.2.%{?snapdate}%{?rcver}%{?dist}
%else
Release: 2%{?dist}
%endif
@@ -138,7 +138,7 @@ Patch42: php-5.3.1-systzdata-v10.patch
# See http://bugs.php.net/53436
Patch43: php-5.4.0-phpize.patch
# Use system libzip instead of bundled one
-Patch44: php-5.5.0-system-libzip.patch
+Patch44: php-5.5.2-system-libzip.patch
# Use -lldap_r for OpenLDAP
Patch45: php-5.4.8-ldap_r.patch
# Make php_config.h constant across builds
@@ -175,6 +175,7 @@ BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++
BuildRequires: libtool-ltdl-devel
%if %{with_libzip}
BuildRequires: libzip-devel >= 0.10
+BuildRequires: libzip-devel < 0.11
%endif
%if %{with_dtrace}
BuildRequires: systemtap-sdt-devel
@@ -1812,6 +1813,9 @@ fi
%changelog
+* Thu Aug 8 2013 Remi Collet <remi@fedoraproject.org> - 5.5.2-0.2.RC1
+- improve system libzip patch
+
* Thu Aug 1 2013 Remi Collet <remi@fedoraproject.org> - 5.5.2-0.1.RC1
- 5.5.2RC1