summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-17 10:20:32 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-17 10:20:32 +0100
commit1a8b5df2276a37c56ebd227f42f7662378fc30e6 (patch)
tree377ec140da8bb625e7be4e755ab3b83237946b9d
parent15152a09d1237d41d32d1b56c742835ed94360ab (diff)
php-lz4: 0.3.0
-rw-r--r--REFLECTION4
-rw-r--r--php-ext-lz4-pr13.patch99
-rw-r--r--php-lz4.spec20
3 files changed, 13 insertions, 110 deletions
diff --git a/REFLECTION b/REFLECTION
index 11352f0..2e3b4f2 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,11 +1,11 @@
-Extension [ <persistent> extension #99 lz4 version 0.2.7 ] {
+Extension [ <persistent> extension #101 lz4 version 0.3.0 ] {
- Functions {
Function [ <internal:lz4> function lz4_compress ] {
- Parameters [3] {
Parameter #0 [ <required> $data ]
- Parameter #1 [ <optional> $high ]
+ Parameter #1 [ <optional> $level ]
Parameter #2 [ <optional> $extra ]
}
}
diff --git a/php-ext-lz4-pr13.patch b/php-ext-lz4-pr13.patch
deleted file mode 100644
index abd2f36..0000000
--- a/php-ext-lz4-pr13.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 97c15a6c049e740c50b7013c369ab341b830e76f Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Thu, 8 Sep 2016 07:54:41 +0200
-Subject: [PATCH] test suite for 32/64 bits build
-
----
- tests/001.phpt | 1 +
- tests/003.phpt | 1 +
- tests/008.phpt | 1 +
- tests/010.phpt | 24 ++++++++++++++++++++++++
- tests/data32.txt | 1 +
- tests/data64.txt | 1 +
- 6 files changed, 29 insertions(+)
- create mode 100644 tests/010.phpt
- create mode 100644 tests/data32.txt
- create mode 100644 tests/data64.txt
-
-diff --git a/tests/001.phpt b/tests/001.phpt
-index 211c59c..5ce3879 100644
---- a/tests/001.phpt
-+++ b/tests/001.phpt
-@@ -1,6 +1,7 @@
- --TEST--
- Test lz4_compress() function : basic functionality
- --SKIPIF--
-+<?php if (PHP_INT_SIZE==4) die("skip 64bits only"); ?>
- --FILE--
- <?php
- if (!extension_loaded('lz4')) {
-diff --git a/tests/003.phpt b/tests/003.phpt
-index 23570b6..4e097f4 100644
---- a/tests/003.phpt
-+++ b/tests/003.phpt
-@@ -1,6 +1,7 @@
- --TEST--
- Test lz4_compress() function : variation
- --SKIPIF--
-+<?php if (PHP_INT_SIZE==4) die("skip 64bits only"); ?>
- --FILE--
- <?php
- if (!extension_loaded('lz4')) {
-diff --git a/tests/008.phpt b/tests/008.phpt
-index 01b54a2..6f045d1 100644
---- a/tests/008.phpt
-+++ b/tests/008.phpt
-@@ -1,6 +1,7 @@
- --TEST--
- Test lz4_uncompress() function : max size
- --SKIPIF--
-+<?php if (PHP_INT_SIZE==4) die("skip 64bits only"); ?>
- --FILE--
- <?php
- if (!extension_loaded('lz4')) {
-diff --git a/tests/010.phpt b/tests/010.phpt
-new file mode 100644
-index 0000000..ffb0906
---- /dev/null
-+++ b/tests/010.phpt
-@@ -0,0 +1,24 @@
-+--TEST--
-+Test lz4_uncompress() 32/64 bits consistency
-+--SKIPIF--
-+--FILE--
-+<?php
-+if (!extension_loaded('lz4')) {
-+ dl('lz4.' . PHP_SHLIB_SUFFIX);
-+}
-+
-+include(dirname(__FILE__) . '/data.inc');
-+
-+$enc32 = file_get_contents(dirname(__FILE__) . '/data32.txt');
-+$dec32 = lz4_uncompress(hex2bin($enc32));
-+var_dump($data === $dec32);
-+
-+$enc64 = file_get_contents(dirname(__FILE__) . '/data64.txt');
-+$dec64 = lz4_uncompress(hex2bin($enc64));
-+var_dump($data === $dec64);
-+?>
-+===Done===
-+--EXPECT--
-+bool(true)
-+bool(true)
-+===Done===
-diff --git a/tests/data32.txt b/tests/data32.txt
-new file mode 100644
-index 0000000..e1f620f
---- /dev/null
-+++ b/tests/data32.txt
-@@ -0,0 +1 @@
-+db0d0000e0546f206265206f72206e6f7420740d00f11f2c207468617420697320746865207175657374696f6e3b0a576865746865722027746973206e6f626c657220696e2500406d696e643d00f0267375666665720a54686520536c696e677320616e64204172726f7773206f66206f7574726167656f757320466f7274756e650a4f723900f00874616b652061726d7320616761696e73742061207365613400f00d74726f75626c65732c0a416e64206279206f70706f73696e672c20657600c068656d2e20546f206469652c4b00f100736c6565703b0a4e6f206d6f72653b820020627950000019000122005061792077653e0001aa00a168656172742d616368652c0000f5005074686f7573bb00f0016e61747572616c2073686f636b730a54190150666c6573681f0131686569bd00021201a06120636f6e73756d6d612f01900a4465766f75746c7971009f626520776973682764a900011354b300b02c207065726368616e6365340090647265616d2e2041798f0142657265278f01737275622c0a466f7a01236174d600a06f662064656174682077a200013c00b073206d617920636f6d652cbb01106ef300f82a686176652073687566666c6564206f66662074686973206d6f7274616c20636f696c2c0a4d75737420676976652075732070617573652e20548200626573706563740c01f20f6d616b65732063616c616d697479206f6620736f206c6f6e67206c696665aa00e077686f20776f756c642062656172b1015220776869701c025173636f726e1c02207469aa00f0035468276f7070726573736f7227732077726fe901009401b070726f7564206d616e27736a016074756d656c79310040652070616b02000401c069737072697a2764206c6f760f02d36865206c617727732064656c612e0060696e736f6c6567010092026566666963652cfa0153737075726ee901d070617469656e74206d65726974dc00b1746827756e776f72746879b20213735a01f00268652068696d73656c66206d69676874205501607175696574758601f7076b650a576974682061206261726520626f646b696e3f18017166617264656c732001a12c0a546f206772756e749400f304737765617420756e64657220612077656172795b0132427574a903001d0100f20100d101f20120736f6d657468696e672061667465721602022601f00a756e646973636f766572656420636f756e7472792066726f6d8a0010739800d075726e0a4e6f2074726176656cdf03307265740f01822c2070757a7a6c6583024277696c6c8d0300db0010732702207261a40201c0002120744d0044696c6c737202002b02326e20660c03106f2a000049002061742000416b6e6f777b04716f663f0a546875dc0131736369a00132646f6540017120636f77617264e4014475732061810010743100000001306e6174b202216875d501617265736f6c758703904973207369636b6c69f0025027657220778a010033008070616c65206361737b0000b5004275676874d700a1656e7465727072697365710020677283015170697463689301626d6f6d656e74d301013f035072656761728d000010049063757272656e7473203a0130206177760200b904306c6f73580400ab00116da500206163a100502e0a0a0a48b903007f05cb61204a657720657965733f201500b068616e64732c206f72676190018064696d656e73696f0c00d10a73656e7365732c2061666665550061732c207061731f00563b20666564f500f20073616d6520666f6f642c20687572741900100a9700011a0041776561703f00617375626a65631106051d005164697365616900516865616c275605063b00216d659900617761726d2764280133636f6f26000543002077695b01011e00002a05506572200a613a05f01243687269737469616e2069733f20496620796f7520707269636b2075732c20646f2b0200220155626c6565642200200a74db0100a904082400556c6175676824006b706f69736f6e4700516469653f20970112696c00016804012500547368616c6c6f0071726576656e67654d0030776520be03416c696b659f00130afc0650726573742c3100001803001e0542656d626c23000122003061742ed20002dc010268003561200af200122cb3052169733504b268756d696c6974793f20527b00033c00052f0002120521200a4f00033c002173685e050075040281070144062062652d07063900f3006578616d706c653f205768792c200adb0001dc05912076696c6c61696e79d900b27465616368206d652c2049d400636578656375742505426974200a240140676f2068f802346275742a0030626574750400f00100c5072172758f02402e0a0a49a7031069eb014064616767870390686963682049207365aa0030666f72420202a80400eb02106c040700f30331206d791100303f2043ca0630206c6590054020636c758f0372746865652e0a49d806000d0051206e6f742c60022079659600005f00011800907374696c6c2e0a41723005226f752800206661f7062076692a03202c2047034069626c65810530666565c008302061738c071073d505103f250914614000546275740a41cd00014104020609b02c20612066616c736520633704f200696f6e2c0a50726f63656564696e676f05002c0053686561742dea06004b03677261696e3f0ab100407965742c5f0940666f726d87005070616c70619e0013414b01024201003f05f1014920647261772e0a54686f75206d61729f012127732901006c00207761830310611001a177617320676f696e673bfe02217375d40403ad01106ded0602240030746f20f907510a4d696e65910401fc02326d6164520081666f6f6c73206f27610701d205013e0100a509404f722065ff0001270700aa05012400002503133bef01069001021a05306f6e20510720626c5e00007509d064756467656f6e20676f757473780720626cb204210a57f20000c300000b041073580900390200f900029f08226e6fd200010107313a0a495703000201014100947920627573696e65733c0120696e5d01317320544606346f206ded00622e200a4e6f773006003f00f0006f6e652068616c66776f726c64204e140a1065ba02106d58084061642c0ab600617769636b65648a0700c70a40627573653809a3206375727461696e27649a0a007405f005636863726166742063656c656272617465730a508f06504865636174eb09106f480b00410b02cd0200b506f00365722764206d75726465722c0a416c617275690521627938048273656e74696e656c2b0940776f6c669b0800730652686f776c275d045077617463682200207573850012683a00407465616c800152706163652ea9086054617271756969095172617669734f085073747269646606029803025200c264657369676e0a4d6f7665731a0570612067686f73745704406f7520732901001d01906669726d2d736574206c0b40682c0a480a0a00c601206d798200207073cb0400120402ac02f00065792077616c6b2c200a666f7220662d0070546879207665722f00606f6e657320703701001d02c36d7920776865726561626f75c107009c0901770200490a00d50240686f7272490000ed0800d101026c0a025002004203437375697414013069742e690200ed084049207468c50300f106a0206c697665733a0a576ffc0003170700c503008300316465651500406f20636fe70a0035001168440b10739e0422676fc6011169900251646f6e653b9e00a062656c6c20696e766974e70822652e16012269749d048044756e63616e3b200201023a007061206b6e656c6c4f0911744007216f6edf02002c05702068656176656ea40490746f2068656c6c2e0a
-\ No newline at end of file
-diff --git a/tests/data64.txt b/tests/data64.txt
-new file mode 100644
-index 0000000..a467eea
---- /dev/null
-+++ b/tests/data64.txt
-@@ -0,0 +1 @@
-+db0d0000f131546f206265206f72206e6f7420746f2062652c207468617420697320746865207175657374696f6e3b0a576865746865722027746973206e6f626c657220696e2500f1796d696e6420746f207375666665720a54686520536c696e677320616e64204172726f7773206f66206f7574726167656f757320466f7274756e650a4f7220746f2074616b652061726d7320616761696e7374206120736561206f662074726f75626c65732c0a416e64206279206f70706f73696e672c20656e64207468656d2e20546f206469652c8400e16c6565703b0a4e6f206d6f72653b82004262792061190001220091617920776520656e64aa00a168656172742d616368652c00f11e7468652074686f7573616e64206e61747572616c2073686f636b730a5468617420666c65736820697320686569bd00021201f2086120636f6e73756d6d6174696f6e0a4465766f75746c7954017f20776973682764a9000122546f9a00f2112c207065726368616e636520746f20647265616d2e2041792c207468657265278f01737275622c0a466f7a012261743c00e2206f6620646561746820776861743c00f83e73206d617920636f6d652c0a5768656e20776520686176652073687566666c6564206f66662074686973206d6f7274616c20636f696c2c0a4d75737420676976652075732070617573652e20548200626573706563740c01f20f6d616b65732063616c616d697479206f6620736f206c6f6e67206c696665aa00e177686f20776f756c642062656172300242776869701c026173636f726e73e801f10a696d652c0a5468276f7070726573736f7227732077726f6e670201f1082070726f7564206d616e277320636f6e74756d656c792cc2014170616e674400d16469737072697a2764206c6f76c902c365206c617727732064656c612e0091696e736f6c656e636592028266666963652c20614b026320737075726ee901d170617469656e74206d65726974a300a16827756e776f72746879b20213735a01f72668652068696d73656c66206d69676874206869732071756965747573206d616b650a576974682061206261726520626f646b696e3f1801f10766617264656c7320626561722c0a546f206772756e749400f304737765617420756e64657220612077656172795b0132427574a90331746865f20112647f01d26d657468696e672061667465721602022601f233756e646973636f766572656420636f756e7472792066726f6d2077686f736520626f75726e0a4e6f2074726176656c6c65722072657475726e732c2070757a7a6c6583024277696c6c8d0302fe015175732072611a0403e001846f736520696c6c737202720a5468616e20660c03626f7468657273ba00717765206b6e6f777b04716f663f0a546875dc0131736369a00132646f6540017120636f77617264e40144757320618100327468759400916e6174697665206875d501617265736f6c758703f1064973207369636b6c696564206f276572207769746884028370616c6520636173da01526f75676874d700a1656e74657270726973657100b167726561742070697463689301626d6f6d656e74d301013f035172656761723904f20669722063757272656e7473207475726e20617761795500416c6f73657800316e616da500e1616374696f6e2e0a0a0a486174680401cb61204a657720657965733f201500f11968616e64732c206f7267616e732c2064696d656e73696f6e732c200a73656e7365732c2061666665550061732c207061731f00563b20666564f500f20073616d6520666f6f642c20687572741900150a1a0041776561703f00617375626a65631106051d005164697365616900516865616c275605063b00216d659900617761726d2764280133636f6f26000543006177696e7465721e00f12273756d6d6572200a617320612043687269737469616e2069733f20496620796f7520707269636b2075732c20646f207765220155626c65656422007b0a7469636b6c652400556c6175676824006b706f69736f6e2300b26469653f200a416e6420696c00016804012500547368616c6c6f0071726576656e67654d00b1776520617265206c696b659f00130afc0672726573742c207718038220726573656d626c23000122006361742e204966dc010268003561200af200122cb3052169733504b268756d696c6974793f20527b00033c00052f0002120521200a4f00033c002173685e053368697381070144065762652062795a01f3006578616d706c653f205768792c200adb0001dc05912076696c6c61696e79d900f3087465616368206d652c20492077696c6c206578656375742505426974200a2401b4676f2068617264206275742a00526265747465e30561696e737472758f02522e0a0a49732b03f20d6120646167676572207768696368204920736565206265666f726520ff05a1652068616e646c652074f30331206d791100f1053f20436f6d652c206c6574206d6520636c757463c80342652e0a49d80631746865250202cd05337965745f00011800a17374696c6c2e0a417274dd07f115206e6f742c20666174616c20766973696f6e2c2073656e7369626c650a546f206665656c450511733108a4696768743f206f7220614000546275740a41cd00216f66da03f1026d696e642c20612066616c7365206372650a08c22c0a50726f63656564696e676f051274750823742dea06a2276420627261696e3f0a100101b100f30b7965742c20696e20666f726d2061732070616c7061626c650a414b01024201f1056e6f77204920647261772e0a54686f75206d61729f01212773290172746865207761797005c1492077617320676f696e673bfe02217375d40403ad01346d656e2400c1746f207573652e0a4d696e65910401fc02326d6164520081666f6f6c73206f27f700116ffc05038504f1030a4f7220656c736520776f72746820616c6c24005d726573743b9001021a05b26f6e2074687920626c61648209c164756467656f6e20676f7574820581626c6f6f642c0a573402317761730b0423736f3902242e0a9f08226e6fd200817468696e673a0a495703327468654100947920627573696e65733c0181696e666f726d7320770644746f206ded00622e200a4e6f773006f120746865206f6e652068616c66776f726c64204e6174757265207365656d7320646561642c0a616e64207769636b65648a07f2076d7320616275736520546865206375727461696e2764ab09f2203b20776974636863726166742063656c656272617465730a50616c65204865636174652773206f66666572696e6773cd02f2087769746865722764206d75726465722c0a416c6172756d840501f80372656e74696e656c2b0971776f6c662c0a57d60752686f776c275d046277617463682c3507010707013a00d27465616c74687920706163652ed606f1005461727175696e27732072617669734f0883737472696465732c9803025200c264657369676e0a4d6f7665731a0591612067686f73742e208d0232737572d301f2046669726d2d7365742065617274682c0a486561720c936d792073746570732c120402ac02f11865792077616c6b2c200a666f7220666561722054687920766572792073746f6e657320707261744807c36d7920776865726561626f75c1073274616ba802e670726573656e7420686f72726f727e03026c0a025002836e6f7720737569741401f11469742e0a5768696c65732049207468726561742c206865206c697665733a0a576f72642d0204c503027b0b11651500916f20636f6c642062728b0bb267697665732e0a4920676fc6011169900251646f6e653b1503f20162656c6c20696e7669746573206d652e16012269749d04a144756e63616e3b20666f1400a269732061206b6e656c6c860c6173756d6d6f6edf0201300cf00468656176656e206f7220746f2068656c6c2e0a
-\ No newline at end of file
diff --git a/php-lz4.spec b/php-lz4.spec
index 2b9c78d..74a4615 100644
--- a/php-lz4.spec
+++ b/php-lz4.spec
@@ -15,7 +15,7 @@
%scl_package php-lz4
%endif
-%global gh_commit d06c93e7c834d95d843edaa2c69fd6a6373841a5
+%global gh_commit c22aa31ce7400dd9762c88db1f98ac6f5072618c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner kjdev
%global gh_project php-ext-lz4
@@ -26,20 +26,17 @@
Summary: LZ4 Extension for PHP
Name: %{?sub_prefix}php-lz4
-Version: 0.2.7
+Version: 0.3.0
%if 0%{?gh_date:1}
Release: 0.2.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
License: MIT
Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-# https://github.com/kjdev/php-ext-lz4/pull/13
-Patch0: %{gh_project}-pr13.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: lz4-devel
@@ -92,9 +89,8 @@ mv %{gh_project}-%{gh_commit} NTS
cd NTS
# Use the system library
rm -r lz4
-
-%patch0 -p1 -b .pr13
-chmod 644 tests/010.phpt tests/*txt tests/*pr13
+# Only in LZ4 1.7.3
+sed -e 's/LZ4HC_MAX_CLEVEL/16/' -i lz4.c
# Sanity check, really often broken
extver=$(sed -n '/#define LZ4_EXT_VERSION/{s/.* "//;s/".*$//;p}' php_lz4.h)
@@ -153,6 +149,9 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%check
+: Ignore test relying on some specific LZ4 version
+rm ?TS/tests/{001,003,008,011}.phpt
+
cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
@@ -203,6 +202,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Nov 17 2016 Remi Collet <remi@fedoraproject.org> - 0.3.0-1
+- update to 0.3.0
+
* Wed Sep 14 2016 Remi Collet <remi@fedoraproject.org> - 0.2.7-2
- rebuild for PHP 7.1 new API version