summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-10-09 09:39:53 +0200
committerRemi Collet <remi@remirepo.net>2020-10-09 09:39:53 +0200
commit829f911bce8ecf4b596ffcf22964d5213de9ec4e (patch)
treea22f69ccaa533bfc3ca0d3a304767b3fcb16feb9
parent9b1b7e9bcc8043d512f0fe24bae4d6d0236277fa (diff)
update to 0.4.0
enable apcu serializer with PHP 7+
-rw-r--r--PHPINFO3
-rw-r--r--REFLECTION6
-rw-r--r--php-lz4.spec26
3 files changed, 31 insertions, 4 deletions
diff --git a/PHPINFO b/PHPINFO
index c88ffed..28325ee 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,5 +2,6 @@
lz4
LZ4 support => enabled
-Extension Version => 0.3.7
+Extension Version => 0.4.0
LZ4 Version => 1.9.2
+LZ4 APCu serializer ABI => 0
diff --git a/REFLECTION b/REFLECTION
index dfaad14..708ed72 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,8 @@
-Extension [ <persistent> extension #82 lz4 version 0.3.7 ] {
+Extension [ <persistent> extension #82 lz4 version 0.4.0 ] {
+
+ - Dependencies {
+ Dependency [ apcu (Optional) ]
+ }
- Constants [3] {
Constant [ int LZ4_CLEVEL_MIN ] { 3 }
diff --git a/php-lz4.spec b/php-lz4.spec
index 856900c..34bb95b 100644
--- a/php-lz4.spec
+++ b/php-lz4.spec
@@ -13,13 +13,16 @@
%global pkg_name %{name}
%endif
+# To build with PHP 5.x use --without apcu
+%bcond_without apcu
+
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
%global with_liblz4 1
%else
%global with_liblz4 0
%endif
-%global gh_commit eba37043ec2bbceabb4134e46ef301f10827d3d7
+%global gh_commit ec815d0e0919a3aa79e5423e3d97393f86bef82f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner kjdev
%global gh_project php-ext-lz4
@@ -30,7 +33,7 @@
Summary: LZ4 Extension for PHP
Name: %{?sub_prefix}php-lz4
-Version: 0.3.7
+Version: 0.4.0
%if 0%{?gh_date:1}
Release: 1%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
@@ -44,7 +47,12 @@ Source0: %{pkg_name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
BuildRequires: %{?dtsprefix}gcc
+%if %{with apcu}
+BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-pecl-apcu-devel
+%else
BuildRequires: %{?scl_prefix}php-devel
+%endif
%if %{?with_liblz4}
BuildRequires: lz4-devel >= 1.9
%else
@@ -160,6 +168,16 @@ cd NTS
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if "%{php_version}" > "7.0"
+: Check that apcu is aware of snappy serializer
+%{__php} --no-php-ini \
+ --define extension=apcu.so \
+ --define apc.enabled=1 \
+ --define apc.enable_cli=1 \
+ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
+ --ri apcu | grep '%{pecl_name}'
+%endif
+
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
@@ -199,6 +217,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Oct 9 2020 Remi Collet <remi@remirepo.net> - 0.4.0-1
+- update to 0.4.0
+- enable apcu serializer with PHP 7+
+
* Fri Oct 2 2020 Remi Collet <remi@remirepo.net> - 0.3.7-1
- update to 0.3.7
- drop patch merged upstream