summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-01-31 09:18:30 +0100
committerRemi Collet <remi@remirepo.net>2018-01-31 09:18:30 +0100
commit6a4963ba98f3149ae1d9cc26ce66425a6e0d0db5 (patch)
treeb8f30d9ea0365a44043d0accca14869fe963c0a9
parenta2be5154bc7213de1462cf4d366ef10f578841cb (diff)
v0.4.12
-rw-r--r--7.patch177
-rw-r--r--REFLECTION2
-rw-r--r--php-zstd.spec17
3 files changed, 10 insertions, 186 deletions
diff --git a/7.patch b/7.patch
deleted file mode 100644
index 3bc5393..0000000
--- a/7.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From 049d21d1865db4355a4b8598aa705ba2c3f3e7f1 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 30 Jan 2018 09:24:02 +0100
-Subject: [PATCH 1/3] fix build warning [-Wunused-variable]
-
----
- zstd.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/zstd.c b/zstd.c
-index c382c83..2257280 100644
---- a/zstd.c
-+++ b/zstd.c
-@@ -294,7 +294,6 @@ ZEND_FUNCTION(zstd_uncompress_dict)
-
- ZEND_MINFO_FUNCTION(zstd)
- {
-- char buffer[128];
- php_info_print_table_start();
- php_info_print_table_row(2, "Zstd support", "enabled");
- php_info_print_table_row(2, "Extension Version", PHP_ZSTD_EXT_VERSION);
-
-From 1bec6a0eb38159148e447b8126745d85a3a222e1 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 30 Jan 2018 09:26:19 +0100
-Subject: [PATCH 2/3] add --with-libzstd option to use system library
-
----
- .gitignore | 2 ++
- config.m4 | 35 +++++++++++++++++++++++++++++------
- 2 files changed, 31 insertions(+), 6 deletions(-)
-
-diff --git a/.gitignore b/.gitignore
-index b732353..c4bbefa 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -22,3 +22,5 @@ run-tests.php
- /build
- /include
- /modules
-+ltmain.sh.backup
-+tmp-php.ini
-diff --git a/config.m4 b/config.m4
-index 5a117e1..de86242 100644
---- a/config.m4
-+++ b/config.m4
-@@ -24,16 +24,39 @@ fi
- PHP_ARG_ENABLE(zstd, whether to enable zstd support,
- [ --enable-zstd Enable zstd support])
-
-+PHP_ARG_WITH(libzstd, whether to use system zstd library,
-+[ --with-libzsd Use system zstd library], no, no)
-+
- if test "$PHP_ZSTD" != "no"; then
-
-- ZSTD_COMMON_SOURCES="zstd/lib/common/entropy_common.c zstd/lib/common/error_private.c zstd/lib/common/fse_decompress.c zstd/lib/common/pool.c zstd/lib/common/threading.c zstd/lib/common/xxhash.c zstd/lib/common/zstd_common.c"
-- ZSTD_COMPRESS_SOURCES="zstd/lib/compress/fse_compress.c zstd/lib/compress/huf_compress.c zstd/lib/compress/zstd_compress.c zstd/lib/compress/zstdmt_compress.c"
-- ZSTD_DECOMPRESS_SOURCES="zstd/lib/decompress/huf_decompress.c zstd/lib/decompress/zstd_decompress.c"
-+ if test "$PHP_LIBZSTD" != "no"; then
-+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
-- PHP_ADD_INCLUDE(zstd/lib/common)
-- PHP_ADD_INCLUDE(zstd/lib)
-+ AC_MSG_CHECKING(for libzstd)
-+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libzstd; then
-+ if $PKG_CONFIG libzstd --atleast-version 1; then
-+ LIBZSTD_CFLAGS=`$PKG_CONFIG libzstd --cflags`
-+ LIBZSTD_LIBDIR=`$PKG_CONFIG libzstd --libs`
-+ LIBZSTD_VERSON=`$PKG_CONFIG libzstd --modversion`
-+ AC_MSG_RESULT(from pkgconfig: version $LIBZSTD_VERSON)
-+ else
-+ AC_MSG_ERROR(system libzstd is too old)
-+ fi
-+ else
-+ AC_MSG_ERROR(pkg-config not found)
-+ fi
-+ PHP_EVAL_LIBLINE($LIBZSTD_LIBDIR, ZSTD_SHARED_LIBADD)
-+ PHP_EVAL_INCLINE($LIBZSTD_CFLAGS)
-+ else
-+ ZSTD_COMMON_SOURCES="zstd/lib/common/entropy_common.c zstd/lib/common/error_private.c zstd/lib/common/fse_decompress.c zstd/lib/common/pool.c zstd/lib/common/threading.c zstd/lib/common/xxhash.c zstd/lib/common/zstd_common.c"
-+ ZSTD_COMPRESS_SOURCES="zstd/lib/compress/fse_compress.c zstd/lib/compress/huf_compress.c zstd/lib/compress/zstd_compress.c zstd/lib/compress/zstdmt_compress.c"
-+ ZSTD_DECOMPRESS_SOURCES="zstd/lib/decompress/huf_decompress.c zstd/lib/decompress/zstd_decompress.c"
-
-+ PHP_ADD_INCLUDE(zstd/lib/common)
-+ PHP_ADD_INCLUDE(zstd/lib)
-+ fi
- PHP_NEW_EXTENSION(zstd, zstd.c $ZSTD_COMMON_SOURCES $ZSTD_COMPRESS_SOURCES $ZSTD_DECOMPRESS_SOURCES, $ext_shared)
-+ PHP_SUBST(ZSTD_SHARED_LIBADD)
-
- ifdef([PHP_INSTALL_HEADERS],
- [
-@@ -45,7 +68,7 @@ fi
-
- dnl coverage
- PHP_ARG_ENABLE(coverage, whether to enable coverage support,
--[ --enable-coverage Enable coverage support], no, no)
-+[ --enable-coverage Enable coverage support], no, no)
-
- if test "$PHP_COVERAGE" != "no"; then
- EXTRA_CFLAGS="--coverage"
-
-From 297f3761d19189c1abc4ad5975013fb459bf796d Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 30 Jan 2018 09:27:01 +0100
-Subject: [PATCH 3/3] relax test (few char diff across libzstd versions)
-
----
- tests/008.phpt | 44 ++++++++++++++++++++++----------------------
- tests/dictionary.phpt | 2 +-
- 2 files changed, 23 insertions(+), 23 deletions(-)
-
-diff --git a/tests/008.phpt b/tests/008.phpt
-index 7b74976..0ab3666 100644
---- a/tests/008.phpt
-+++ b/tests/008.phpt
-@@ -30,28 +30,28 @@ check_compress($data, 0);
- *** Data size ***
- 3547
- *** Compression Level ***
--1 -- 1874 -- true
--2 -- 1847 -- true
--3 -- 1840 -- true
--4 -- 1815 -- true
--5 -- 1805 -- true
--6 -- 1803 -- true
--7 -- 1803 -- true
--8 -- 1803 -- true
--9 -- 1803 -- true
--10 -- 1803 -- true
--11 -- 1800 -- true
--12 -- 1796 -- true
--13 -- 1796 -- true
--14 -- 1796 -- true
--15 -- 1796 -- true
--16 -- 1796 -- true
--17 -- 1796 -- true
--18 -- 1796 -- true
--19 -- 1796 -- true
--20 -- 1796 -- true
--21 -- 1796 -- true
--22 -- 1796 -- true
-+1 -- 1%d -- true
-+2 -- 1%d -- true
-+3 -- 1%d -- true
-+4 -- 1%d -- true
-+5 -- 1%d -- true
-+6 -- 1%d -- true
-+7 -- 1%d -- true
-+8 -- 1%d -- true
-+9 -- 1%d -- true
-+10 -- 1%d -- true
-+11 -- 1%d -- true
-+12 -- 1%d -- true
-+13 -- 1%d -- true
-+14 -- 1%d -- true
-+15 -- 1%d -- true
-+16 -- 1%d -- true
-+17 -- 1%d -- true
-+18 -- 1%d -- true
-+19 -- 1%d -- true
-+20 -- 1%d -- true
-+21 -- 1%d -- true
-+22 -- 1%d -- true
- *** Invalid Compression Level ***
-
- Warning: zstd_compress: compression level (100) must be within 1..22 in %s on line %d
-diff --git a/tests/dictionary.phpt b/tests/dictionary.phpt
-index c5c2ab6..b3455b6 100644
---- a/tests/dictionary.phpt
-+++ b/tests/dictionary.phpt
-@@ -24,5 +24,5 @@ check_compress_dict($data, $dictionary);
- *** Data size ***
- 3547
- *** Dictionary Compression ***
--142 -- 1924 -- true
-+142 -- 1%d -- true
- ===Done===
diff --git a/REFLECTION b/REFLECTION
index 0e32f52..2181386 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #176 zstd version 0.4.11 ] {
+Extension [ <persistent> extension #176 zstd version 0.4.12 ] {
- Functions {
Function [ <internal:zstd> function zstd_compress ] {
diff --git a/php-zstd.spec b/php-zstd.spec
index 8a88b43..585db05 100644
--- a/php-zstd.spec
+++ b/php-zstd.spec
@@ -6,6 +6,10 @@
#
# Please, preserve the changelog entries
#
+
+# we don't want -z defs linker flag
+%undefine _strict_symbol_defs_build
+
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-zstd
@@ -19,8 +23,7 @@
%global with_libzstd 0
%endif
-
-%global gh_commit 8ca4cf45c200bcfa80469703d2f3a2ab46918a45
+%global gh_commit 8cd85458b188bcaec89e4a5ca8bc4f641149a02d
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner kjdev
%global gh_project php-ext-zstd
@@ -31,7 +34,7 @@
Summary: Zstd Extension for PHP
Name: %{?sub_prefix}php-%{pecl_name}
-Version: 0.4.11
+Version: 0.4.12
%if 0%{?gh_date:1}
Release: 0.3.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
@@ -49,9 +52,6 @@ Source0: %{pkg_name}-%{version}-%{gh_short}.tgz
# retrieve a recursive git snapshot with submodule
Source1: makesrc.sh
-# https://github.com/kjdev/php-ext-zstd/pull/7
-Patch0: https://patch-diff.githubusercontent.com/raw/kjdev/php-ext-zstd/pull/7.patch
-
BuildRequires: %{?scl_prefix}php-devel
%if %{?with_libzstd}
BuildRequires: libzstd-devel >= 1.3
@@ -112,8 +112,6 @@ These are the files needed to compile programs using %{name}.
mv %{gh_project}-%{gh_commit} NTS
cd NTS
-%patch0 -p1
-
# replace symlink
rm LICENSE-zstd
mv zstd/LICENSE LICENSE-zstd
@@ -243,6 +241,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Jan 31 2018 Remi Collet <remi@remirepo.net> - 0.4.12-1
+- update to 0.4.12 (no change, PR merged upstream)
+
* Tue Jan 30 2018 Remi Collet <remi@remirepo.net> - 0.4.11-1
- new package, version 0.4.11
- add patch to build with system libzstd from