summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION17
-rw-r--r--php-lz4.spec111
3 files changed, 66 insertions, 66 deletions
diff --git a/PHPINFO b/PHPINFO
index 2859b99..1f30730 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,6 +2,6 @@
lz4
LZ4 support => enabled
-Extension Version => 0.4.3
-LZ4 Version => 1.9.3
+Extension Version => 0.5.0
+LZ4 Version => 1.10.0
LZ4 APCu serializer ABI => 0
diff --git a/REFLECTION b/REFLECTION
index 88f7553..e8ffbd2 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,13 +1,14 @@
-Extension [ <persistent> extension #83 lz4 version 0.4.3 ] {
+Extension [ <persistent> extension #92 lz4 version 0.5.0 ] {
- Dependencies {
Dependency [ apcu (Optional) ]
}
- - Constants [3] {
- Constant [ int LZ4_CLEVEL_MIN ] { 3 }
+ - Constants [4] {
+ Constant [ int LZ4_CLEVEL_MIN ] { 2 }
Constant [ int LZ4_CLEVEL_MAX ] { 12 }
- Constant [ int LZ4_VERSION ] { 10903 }
+ Constant [ int LZ4_VERSION_NUMBER ] { 11000 }
+ Constant [ string LZ4_VERSION_TEXT ] { 1.10.0 }
}
- Functions {
@@ -15,16 +16,16 @@ Extension [ <persistent> extension #83 lz4 version 0.4.3 ] {
- Parameters [3] {
Parameter #0 [ <required> $data ]
- Parameter #1 [ <optional> $level ]
- Parameter #2 [ <optional> $extra ]
+ Parameter #1 [ <optional> $level = <default> ]
+ Parameter #2 [ <optional> $extra = <default> ]
}
}
Function [ <internal:lz4> function lz4_uncompress ] {
- Parameters [3] {
Parameter #0 [ <required> $data ]
- Parameter #1 [ <optional> $max ]
- Parameter #2 [ <optional> $offset ]
+ Parameter #1 [ <optional> $max = <default> ]
+ Parameter #2 [ <optional> $offset = <default> ]
}
}
}
diff --git a/php-lz4.spec b/php-lz4.spec
index 1b4a1c8..a5b77ea 100644
--- a/php-lz4.spec
+++ b/php-lz4.spec
@@ -1,18 +1,18 @@
# remirepo spec file for php-lz4
#
-# Copyright (c) 2016-2021 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2016-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
%scl_package php-lz4
%else
%global pkg_name %{name}
%endif
+%bcond_without tests
# To build with PHP 5.x use --without apcu
%bcond_without apcu
@@ -22,23 +22,22 @@
%bcond_with liblz4
%endif
-%global gh_commit 554722c1068a7db15f87a49ab14abae33d4db83d
+%global gh_commit 83c6409ae7a98c91ce7419e9028f49ce6bf94863
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner kjdev
%global gh_project php-ext-lz4
-#global gh_date 20160608
%global pecl_name lz4
+%global pie_vend kjdev
+%global pie_proj lz4
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
+%global sources %{gh_project}-%{gh_commit}
+%global _configure ../%{sources}/configure
Summary: LZ4 Extension for PHP
-Name: %{?sub_prefix}php-lz4
-Version: 0.4.3
-%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
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-%endif
+Name: %{?scl_prefix}php-lz4
+Version: 0.5.0
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
@@ -48,7 +47,7 @@ Source1: makesrc.sh
BuildRequires: %{?dtsprefix}gcc
%if %{with apcu}
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel >= 5.6
BuildRequires: %{?scl_prefix}php-pecl-apcu-devel
%else
BuildRequires: %{?scl_prefix}php-devel
@@ -56,24 +55,13 @@ BuildRequires: %{?scl_prefix}php-devel
%if %{with liblz4}
BuildRequires: lz4-devel >= 1.9
%else
-Provides: bundled(lz4) = 1.9.3
+Provides: bundled(lz4) = 1.10.0
%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}}
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-%{pecl_name} <= %{version}
-%endif
-%endif
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
@@ -84,9 +72,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-mv %{gh_project}-%{gh_commit} NTS
-cd NTS
+cd %{sources}
%if %{with liblz4}
# Use the system library
rm -r lz4
@@ -94,15 +81,15 @@ rm -r lz4
# Sanity check, really often broken
extver=$(sed -n '/#define LZ4_EXT_VERSION/{s/.* "//;s/".*$//;p}' php_lz4.h)
-if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
- : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-dev}.
+if test "x${extver}" != "x%{version}"; then
+ : Error: Upstream extension version is ${extver}, expecting %{version}.
exit 1
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Drop in the bit of configuration
@@ -115,28 +102,33 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config \
+ --with-php-config=%{__phpconfig} \
%if %{with liblz4}
--with-lz4-includedir=/usr \
%endif
--with-libdir=%{_lib} \
--enable-lz4
-make %{?_smp_mflags}
+
+%make_build
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config \
+ --with-php-config=%{__ztsphpconfig} \
%if %{with liblz4}
--with-lz4-includedir=/usr \
%endif
--with-libdir=%{_lib} \
--enable-lz4
-make %{?_smp_mflags}
+
+%make_build
%endif
@@ -144,19 +136,19 @@ make %{?_smp_mflags}
%{?dtsenable}
# Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
# Install the ZTS stuff
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
%check
-cd NTS
+cd %{sources}
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
@@ -172,34 +164,27 @@ cd NTS
--ri apcu | grep '%{pecl_name}'
%endif
+%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php --show-diff || : ignore
+%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
-
-: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-NO_INTERACTION=1 \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php --show-diff
%endif
%files
-%{!?_licensedir:%global license %%doc}
-%license NTS/LICENSE
-%doc NTS/CREDITS
-%doc NTS/README.md
+%license %{sources}/LICENSE
+%doc %{sources}/CREDITS
+%doc %{sources}/README.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -211,6 +196,20 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 0.5.0-2
+- rebuild for 8.5.0alpha3
+
+* Tue Jul 15 2025 Remi Collet <remi@remirepo.net> - 0.5.0-1
+- update to 0.5.0
+- re-license spec file to CECILL-2.1
+
+* Fri Nov 8 2024 Remi Collet <remi@remirepo.net> - 0.4.4-1
+- update to 0.4.4 (no change)
+- update bundled libliz4 to 0.10.0
+
+* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 0.4.3-2
+- build out of sources tree
+
* Mon Jan 25 2021 Remi Collet <remi@remirepo.net> - 0.4.3-1
- update to 0.4.3