summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--88.patch25
-rw-r--r--php-zstd.spec29
2 files changed, 46 insertions, 8 deletions
diff --git a/88.patch b/88.patch
new file mode 100644
index 0000000..8ff964a
--- /dev/null
+++ b/88.patch
@@ -0,0 +1,25 @@
+From 96d5dcea944a188e9a388bf19ed81ee41f1a990c Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 30 Jul 2025 12:06:59 +0200
+Subject: [PATCH] use Zend/zend_smart_string.h
+
+---
+ zstd.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/zstd.c b/zstd.c
+index 5479ba5..8ad068f 100644
+--- a/zstd.c
++++ b/zstd.c
+@@ -30,7 +30,11 @@
+ #include <php_ini.h>
+ #include <ext/standard/file.h>
+ #include <ext/standard/info.h>
++#if PHP_VERSION_ID < 70200
+ #include <ext/standard/php_smart_string.h>
++#else
++#include "Zend/zend_smart_string.h"
++#endif
+ #if defined(HAVE_APCU_SUPPORT)
+ #include <ext/standard/php_var.h>
+ #include <ext/apcu/apc_serializer.h>
diff --git a/php-zstd.spec b/php-zstd.spec
index 95d194e..ea26c29 100644
--- a/php-zstd.spec
+++ b/php-zstd.spec
@@ -1,8 +1,8 @@
# remirepo spec file for php-zstd
#
-# Copyright (c) 2018-2024 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2018-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
@@ -16,6 +16,8 @@
%global zstdver 1.5.6
%global pecl_name zstd
+%global pie_vend kjdev
+%global pie_proj zstd
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
%global buildver %(pkg-config --silence-errors --modversion libzstd 2>/dev/null || echo 65536)
@@ -25,7 +27,7 @@
Summary: Zstandard extension
Name: %{?scl_prefix}php-%{pecl_name}
Version: 0.14.0
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%if %{with libzstd}
License: MIT
%else
@@ -35,6 +37,8 @@ License: MIT AND BSD-3-Clause
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
+Patch0: 88.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
%if %{with apcu}
@@ -51,10 +55,12 @@ Provides: bundled(libzstd) = %{zstdver}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
@@ -80,6 +86,8 @@ These are the files needed to compile programs using %{name}.
sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
cd %{sources}
+%patch -P0 -p1 -b .pr88
+
%if %{with libzstd}
# Use the system library
rm -r zstd
@@ -241,6 +249,11 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%changelog
+* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 0.14.0-2
+- fix for PHP 8.5.0alpha3 using patch from
+ https://github.com/kjdev/php-ext-zstd/pull/88
+- re-license spec file to CECILL-2.1
+
* Wed Nov 6 2024 Remi Collet <remi@remirepo.net> - 0.14.0-1
- update to 0.14.0