summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--2_02.txt75
-rw-r--r--REFLECTION13
-rw-r--r--php-lzf-php7.patch127
-rw-r--r--php-lzf-rm-bundled-libs.patch30
-rw-r--r--php-pecl-lzf.spec36
5 files changed, 29 insertions, 252 deletions
diff --git a/2_02.txt b/2_02.txt
deleted file mode 100644
index af5b01c..0000000
--- a/2_02.txt
+++ /dev/null
@@ -1,75 +0,0 @@
---------------------------------------------------------------------
- The PHP License, version 2.02
-Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- 3. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior permission from the
- PHP Group. This does not apply to add-on libraries or tools
- that work in conjunction with PHP. In such a case the PHP
- name may be used to indicate that the product supports PHP.
-
- 4. The PHP Group may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the
- terms of that version. You may also choose to use such covered
- code under the terms of any subsequent version of the license
- published by the PHP Group. No one other than the PHP Group has
- the right to modify the terms applicable to covered code created
- under this License.
-
- 5. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes PHP, freely available from
- http://www.php.net/".
-
- 6. The software incorporates the Zend Engine, a product of Zend
- Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the
- PHP Association (pursuant to a grant from Zend that can be
- found at http://www.php.net/license/ZendGrant/) for
- distribution to you under this license agreement, only as a
- part of PHP. In the event that you separate the Zend Engine
- (or any portion thereof) from the rest of the software, or
- modify the Zend Engine, or any portion thereof, your use of the
- separated or modified Zend Engine software shall not be governed
- by this license, and instead shall be governed by the license
- set forth at http://www.zend.com/license/ZendLicense/.
-
-
-
-THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
-DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the PHP Group.
-
-The PHP Group can be contacted via Email at group@php.net.
-
-For more information on the PHP Group and the PHP project,
-please see <http://www.php.net>.
diff --git a/REFLECTION b/REFLECTION
index eb16a07..07a3ec7 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,11 +1,22 @@
-Extension [ <persistent> extension #102 lzf version 1.6.2 ] {
+Extension [ <persistent> extension #117 lzf version 1.6.3 ] {
- Functions {
Function [ <internal:lzf> function lzf_compress ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $string ]
+ }
}
Function [ <internal:lzf> function lzf_decompress ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $string ]
+ }
}
Function [ <internal:lzf> function lzf_optimized_for ] {
+
+ - Parameters [0] {
+ }
}
}
}
diff --git a/php-lzf-php7.patch b/php-lzf-php7.patch
deleted file mode 100644
index 1352983..0000000
--- a/php-lzf-php7.patch
+++ /dev/null
@@ -1,127 +0,0 @@
---- pecl/lzf/trunk/filter.c 2015/04/04 06:53:08 336356
-+++ pecl/lzf/trunk/filter.c 2015/04/04 08:08:12 336357
-@@ -1,5 +1,6 @@
- #include "php.h"
- #include "lzf.h"
-+#include "php_lzf.h"
-
- #define LZF_BLOCKSIZE (1024 * 64 - 1)
-
-@@ -160,7 +161,7 @@
- int flags TSRMLS_DC)
- {
- size_t consumed = 0;
-- php_lzf_filter_state *inst = (php_lzf_filter_state *) thisfilter->abstract;
-+ php_lzf_filter_state *inst = (php_lzf_filter_state *) Z_PTR(thisfilter->abstract);
- php_stream_filter_status_t exit_status = PSFS_FEED_ME;
- php_stream_bucket *bucket = NULL;
-
-@@ -208,8 +209,8 @@
- {
- assert(thisfilter->abstract != NULL);
-
-- php_lzf_filter_state_dtor((php_lzf_filter_state *) thisfilter->abstract TSRMLS_CC);
-- pefree(thisfilter->abstract, ((php_lzf_filter_state *) thisfilter->abstract)->persistent);
-+ php_lzf_filter_state_dtor((php_lzf_filter_state *) Z_PTR(thisfilter->abstract) TSRMLS_CC);
-+ pefree(Z_PTR(thisfilter->abstract), ((php_lzf_filter_state *) Z_PTR(thisfilter->abstract))->persistent);
- }
-
- static php_stream_filter_ops lzf_compress_ops = {
---- pecl/lzf/trunk/lzf.c 2015/04/04 06:53:08 336356
-+++ pecl/lzf/trunk/lzf.c 2015/04/04 08:08:12 336357
-@@ -41,7 +41,11 @@
- PHP_FE(lzf_compress, NULL)
- PHP_FE(lzf_decompress, NULL)
- PHP_FE(lzf_optimized_for, NULL)
-+#ifdef PHP_FE_END
-+ PHP_FE_END
-+#else
- {NULL, NULL, NULL} /* Must be the last line in lzf_functions[] */
-+#endif
- };
- /* }}} */
-
-@@ -75,6 +79,8 @@
- {
- php_stream_filter_register_factory("lzf.compress", &php_lzf_compress_filter_factory TSRMLS_CC);
- php_stream_filter_register_factory("lzf.decompress", &php_lzf_decompress_filter_factory TSRMLS_CC);
-+
-+ return SUCCESS;
- }
- /* }}} */
-
-@@ -84,6 +90,8 @@
- {
- php_stream_filter_unregister_factory("lzf.compress" TSRMLS_CC);
- php_stream_filter_unregister_factory("lzf.decompress" TSRMLS_CC);
-+
-+ return SUCCESS;
- }
- /* }}} */
-
-@@ -110,7 +118,7 @@
- PHP_FUNCTION(lzf_compress)
- {
- char *retval, *arg = NULL;
-- int arg_len, result;
-+ strsize_t arg_len, result;
-
- if (ZEND_NUM_ARGS() != 1 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) {
- WRONG_PARAM_COUNT;
-@@ -127,10 +135,10 @@
- RETURN_FALSE;
- }
-
-- retval = erealloc(retval, result + 1);
- retval[result] = 0;
-
-- RETURN_STRINGL(retval, result, 0);
-+ _RETVAL_STRINGL(retval, result);
-+ efree(retval);
- }
- /* }}} */
-
-@@ -139,7 +147,7 @@
- PHP_FUNCTION(lzf_decompress)
- {
- char *arg = NULL;
-- int arg_len, result, i = 1;
-+ strsize_t arg_len, result, i = 1;
- char *buffer;
- size_t buffer_size = 1024;
-
-@@ -168,10 +176,10 @@
- RETURN_FALSE;
- }
-
-- buffer = erealloc(buffer, result + 1);
- buffer[result] = 0;
-
-- RETURN_STRINGL(buffer, result, 0);
-+ _RETVAL_STRINGL(buffer, result);
-+ efree(buffer);
- }
- /* }}} */
-
---- pecl/lzf/trunk/php_lzf.h 2015/04/04 06:53:08 336356
-+++ pecl/lzf/trunk/php_lzf.h 2015/04/04 08:08:12 336357
-@@ -49,6 +49,19 @@
- PHP_FUNCTION(lzf_decompress);
- PHP_FUNCTION(lzf_optimized_for);
-
-+#if PHP_MAJOR_VERSION < 7
-+typedef long zend_long;
-+typedef int strsize_t;
-+#define _RETVAL_STRINGL(a,l) RETVAL_STRINGL(a,l,1)
-+#define Z_PTR(p) (p)
-+#else
-+typedef size_t strsize_t;
-+#define TSRMLS_C
-+#define TSRMLS_CC
-+#define TSRMLS_DC
-+#define _RETVAL_STRINGL(a,l) RETVAL_STRINGL(a,l)
-+#endif
-+
- #endif /* PHP_LZF_H */
-
-
diff --git a/php-lzf-rm-bundled-libs.patch b/php-lzf-rm-bundled-libs.patch
deleted file mode 100644
index 36a2ef6..0000000
--- a/php-lzf-rm-bundled-libs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -ruN LZF-1.6.2.orig/config.m4 LZF-1.6.2/config.m4
---- LZF-1.6.2.orig/config.m4 2012-07-08 18:46:20.000000000 +0200
-+++ LZF-1.6.2/config.m4 2012-10-20 19:04:57.124540254 +0200
-@@ -13,6 +13,24 @@
- else
- AC_DEFINE(PHP_LZF_ULTRA_FAST,0,[ ])
- fi
--
-- PHP_NEW_EXTENSION(lzf, lzf.c lzf_c.c lzf_d.c filter.c, $ext_shared)
-+ SEARCH_PATH="/usr"
-+ SEARCH_FOR="/include/lzf.h"
-+ AC_MSG_CHECKING([for lzf files in default path])
-+ for i in $SEARCH_PATH ; do
-+ if test -r $i/$SEARCH_FOR; then
-+ LZF_DIR=$i
-+ fi
-+ done
-+ dnl
-+ if test -z "$LZF_DIR"; then
-+ AC_MSG_RESULT([not found])
-+ AC_MSG_ERROR([Please install the lzf package])
-+ fi
-+ PHP_ADD_INCLUDE($LZF_DIR/include)
-+ dnl
-+ LIBNAME=lzf
-+ LIBSYMBOL=lzf_decompress
-+ PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $LZF_DIR/$PHP_LIBDIR, LZF_SHARED_LIBADD) AC_DEFINE(HAVE_LZFLIB,1,[ ])],[AC_MSG_ERROR([lzf libs not found])], [])
-+ PHP_SUBST(LZF_SHARED_LIBADD)
-+ PHP_NEW_EXTENSION(lzf, lzf.c filter.c, $ext_shared)
- fi
diff --git a/php-pecl-lzf.spec b/php-pecl-lzf.spec
index 9853eea..5e438af 100644
--- a/php-pecl-lzf.spec
+++ b/php-pecl-lzf.spec
@@ -13,25 +13,14 @@
%endif
Name: %{?scl_prefix}php-pecl-lzf
-Version: 1.6.2
-Release: 11%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 1.6.3
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Summary: Extension to handle LZF de/compression
Group: Development/Languages
License: PHP
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-
-# https://bugs.php.net/65860 - Please Provides LICENSE file
-# URL taken from lzf.c header
-Source1: http://www.php.net/license/2_02.txt
-
-# remove bundled lzf libs
-Patch0: php-lzf-rm-bundled-libs.patch
-# PHP 7 compatibility
-# http://svn.php.net/viewvc?view=revision&revision=336357
-Patch1: php-lzf-php7.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -60,6 +49,10 @@ Obsoletes: php55w-pecl-%{ext_name} <= %{version}
Obsoletes: php56u-pecl-%{ext_name} <= %{version}
Obsoletes: php56w-pecl-%{ext_name} <= %{version}
%endif
+%if "%{php_version}" > "7.0"
+Obsoletes: php70u-pecl-%{ext_name} <= %{version}
+Obsoletes: php70w-pecl-%{ext_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -83,15 +76,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%setup -c -q
# Don't install/register tests
-sed -e 's/role="test"/role="src"/' -i package.xml
+sed -e 's/role="test"/role="src"/' \
+ -e '/name="lib/d' \
+ -i package.xml
mv %{pecl_name}-%{version} NTS
cd NTS
-%patch0 -p1 -b liblzf
-%patch1 -p3 -b .php7
-rm -f lzf_c.c lzf_d.c lzf.h
-
-cp %{SOURCE1} LICENSE
+rm -r lib/
extver=$(sed -n '/#define PHP_LZF_VERSION/{s/.* "//;s/".*$//;p}' php_lzf.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -114,6 +105,8 @@ EOF
cd NTS
%{_bindir}/phpize
%configure \
+ --enable-lzf \
+ --with-liblzf \
--with-php-config=%{_bindir}/php-config
make %{?_smp_mflags}
@@ -121,6 +114,8 @@ make %{?_smp_mflags}
cd ../ZTS
%{_bindir}/zts-phpize
%configure \
+ --enable-lzf \
+ --with-liblzf \
--with-php-config=%{_bindir}/zts-php-config
make %{?_smp_mflags}
%endif
@@ -220,6 +215,9 @@ fi
%changelog
+* Mon Apr 20 2015 Remi Collet <remi@fedoraproject.org> - 1.6.3-1
+- update to 1.6.3
+
* Sat Apr 4 2015 Remi Collet <remi@fedoraproject.org> - 1.6.2-11
- add upstream fix for PHP 7
- fix license handling