summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-30 12:25:24 +0200
committerRemi Collet <remi@remirepo.net>2020-09-30 12:25:24 +0200
commit0156868cf50cba11b2646bc50d5313801d0715c0 (patch)
treeea6acf65318209840dcd2c7fc1422180a1100541
parentca8c6e848d16ed9d812991c6187b769898f3de7b (diff)
rebuild for PHP 8.0.0RC1
add patch from https://github.com/kjdev/php-ext-zstd/pull/35
-rw-r--r--35.patch36
-rw-r--r--php-zstd.spec20
2 files changed, 50 insertions, 6 deletions
diff --git a/35.patch b/35.patch
new file mode 100644
index 0000000..b14fd66
--- /dev/null
+++ b/35.patch
@@ -0,0 +1,36 @@
+From 729d8401bfba37a3ee558cd051a1a525b5301dbd Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 30 Sep 2020 12:22:49 +0200
+Subject: [PATCH] relax tests for 8.0.0R1C
+
+---
+ tests/002_b.phpt | 2 +-
+ tests/005_b.phpt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/002_b.phpt b/tests/002_b.phpt
+index ed0172d..8c4c329 100644
+--- a/tests/002_b.phpt
++++ b/tests/002_b.phpt
+@@ -29,7 +29,7 @@ try {
+ ===Done===
+ --EXPECTF--
+ *** Testing zstd_compress() function with Zero arguments ***
+-ArgumentCountError: zstd_compress() expects at least 1 parameter, 0 given in %s:%d
++ArgumentCountError: zstd_compress() expects at least 1 %s, 0 given in %s:%d
+ Stack trace:
+ #0 %s(%d): zstd_compress()
+ #1 {main}
+diff --git a/tests/005_b.phpt b/tests/005_b.phpt
+index afd9d19..dca21eb 100644
+--- a/tests/005_b.phpt
++++ b/tests/005_b.phpt
+@@ -33,7 +33,7 @@ try {
+ ===DONE===
+ --EXPECTF--
+ *** Testing zstd_uncompress() function with Zero arguments ***
+-ArgumentCountError: zstd_uncompress() expects exactly 1 parameter, 0 given in %s:%d
++ArgumentCountError: zstd_uncompress() expects exactly 1 %s, 0 given in %s:%d
+ Stack trace:
+ #0 %s(%d): zstd_uncompress()
+ #1 {main}
diff --git a/php-zstd.spec b/php-zstd.spec
index e9411c2..b770ef2 100644
--- a/php-zstd.spec
+++ b/php-zstd.spec
@@ -32,7 +32,7 @@
Summary: Zstandard extension
Name: %{?sub_prefix}php-%{pecl_name}
Version: 0.9.0
-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;')}}
%if %{?with_libzstd}
License: MIT
%else
@@ -42,6 +42,8 @@ License: MIT and BSD
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/kjdev/php-ext-zstd/pull/35.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -64,15 +66,15 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
%if "%{php_version}" > "7.2"
Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -107,6 +109,8 @@ mv %{pecl_name}-%{version} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
+%patch0 -p1 -b .pr
+
cp zstd/LICENSE LICENSE-libzstd
%if %{?with_libzstd}
@@ -202,7 +206,7 @@ cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
@@ -214,7 +218,7 @@ cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
@@ -250,6 +254,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
%changelog
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 0.9.0-4
+- rebuild for PHP 8.0.0RC1
+- add patch from https://github.com/kjdev/php-ext-zstd/pull/35
+
* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 0.9.0-3
- rebuild for PHP 8.0.0beta3