summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-20 10:03:43 +0100
committerRemi Collet <remi@remirepo.net>2017-11-20 10:03:43 +0100
commitf86450ef9560f14ba475c206d84d55617a40f649 (patch)
treee13f0923032450495e5b34eda667afbcf222f344
parente76afa40f98223942a0e09a36caa43d7e3096b00 (diff)
test build: add upstream patch for libzip 1.3.1
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-zip.spec23
2 files changed, 19 insertions, 6 deletions
diff --git a/REFLECTION b/REFLECTION
index 184b060..8ec0a4d 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #163 zip version 1.15.1 ] {
+Extension [ <persistent> extension #171 zip version 1.15.1 ] {
- Functions {
Function [ <internal:zip> function zip_open ] {
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index c65aa32..92b0bbf 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -21,23 +21,34 @@
%endif
#global prever dev
+# Ensure we use save version as minor version may introduce new symbols
+%global buildver %(pkg-config --silence-errors --modversion libzip 2>/dev/null || echo 65536)
+
Summary: A ZIP archive management extension
Summary(fr): Une extension de gestion des ZIP
Name: %{?scl_prefix}php-pecl-zip
Version: 1.15.1
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/zip
Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Patch0: %{pecl_name}-upstream.patch
+
BuildRequires: %{?scl_prefix}php-devel
# Version 1.2.0 for encryption support
BuildRequires: pkgconfig(libzip) >= 1.2.0
BuildRequires: zlib-devel
BuildRequires: %{?scl_prefix}php-pear
+%if 0%{?fedora} >= 26
+Requires: libzip%{?_isa} >= %{buildver}
+%else
+Requires: libzip5%{?_isa} >= %{buildver}
+%endif
+
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
@@ -107,6 +118,7 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{version}%{?prever} NTS
cd NTS
+%patch0 -p1
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php5/php_zip.h)
@@ -185,8 +197,7 @@ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
NO_INTERACTION=1 \
TEST_PHP_EXECUTABLE=%{_bindir}/php \
-%{_bindir}/php -n \
- run-tests.php --show-diff
+%{_bindir}/php -n run-tests.php --show-diff
%if %{with_zts}
cd ../ZTS
@@ -200,8 +211,7 @@ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
NO_INTERACTION=1 \
TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
-%{_bindir}/zts-php -n \
- run-tests.php --show-diff
+%{_bindir}/zts-php -n run-tests.php --show-diff
%endif
@@ -240,6 +250,9 @@ fi
%changelog
+* Mon Nov 20 2017 Remi Collet <remi@remirepo.net> - 1.15.1-4
+- add upstream patch for libzip 1.3.1
+
* Tue Oct 3 2017 Remi Collet <remi@remirepo.net> - 1.15.1-3
- F27: release bump