[php-pecl-lzf] PHP 5.4.0 Build

Remi Collet remi at fedoraproject.org
Fri Jan 20 17:49:03 UTC 2012


commit bde689ca357a1551928f984c42de75ebbe866689
Author: remi <fedora at famillecollet.com>
Date:   Fri Jan 20 18:48:34 2012 +0100

    PHP 5.4.0 Build

 lzf-php54.patch   |   11 +++++++++++
 php-pecl-lzf.spec |   31 ++++++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/lzf-php54.patch b/lzf-php54.patch
new file mode 100644
index 0000000..5261288
--- /dev/null
+++ b/lzf-php54.patch
@@ -0,0 +1,11 @@
+--- LZF-1.5.2-zts/lzf.c	2011-11-18 18:13:03.415507463 +0100
++++ LZF-1.5.2/lzf.c	2011-11-18 18:13:46.263652148 +0100
+@@ -37,7 +37,7 @@
+ *
+ * Every user visible function must have an entry in lzf_functions[].
+ */
+-function_entry lzf_functions[] = {
++zend_function_entry lzf_functions[] = {
+ 	PHP_FE(lzf_compress,		NULL)
+ 	PHP_FE(lzf_decompress,		NULL)
+ 	PHP_FE(lzf_optimized_for,	NULL)
diff --git a/php-pecl-lzf.spec b/php-pecl-lzf.spec
index d103383..8cf68d3 100644
--- a/php-pecl-lzf.spec
+++ b/php-pecl-lzf.spec
@@ -6,12 +6,15 @@
 
 Name:		php-pecl-lzf
 Version:	1.5.2
-Release:	8%{?dist}
+Release:	9%{?dist}
 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
+# http://svn.php.net/viewvc/pecl/lzf/trunk/lzf.c?r1=297236&r2=297235&pathrev=297236
+Patch0:         lzf-php54.patch
+
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	php-devel
@@ -22,6 +25,12 @@ Requires(post):	%{__pecl}
 Requires(postun):	%{__pecl}
 Provides:	php-pecl(%{pecl_name}) = %{version}
 
+# RPM 4.8
+%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
+%{?filter_setup}
+# RPM 4.9
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
+
 
 %description
 This extension provides LZF compression and decompression using the liblzf
@@ -32,6 +41,9 @@ slight speed cost.
 
 %prep
 %setup -c -q
+
+%patch0 -p0 -b .php54
+
 [ -f package2.xml ] || %{__mv} package.xml package2.xml
 %{__mv} package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml
 
@@ -56,6 +68,18 @@ EOF
 %{__install} -p -m 644 %{pecl_name}.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
 
 
+%check
+cd %{pecl_name}-%{version}
+
+TEST_PHP_EXECUTABLE=%{_bindir}/php \
+REPORT_EXIT_STATUS=1 \
+NO_INTERACTION=1 \
+%{_bindir}/php run-tests.php \
+    -n -q \
+    -d extension_dir=%{buildroot}%{php_extdir} \
+    -d extension=lzf.so \
+
+
 %clean
 %{__rm} -rf %{buildroot}
 
@@ -76,6 +100,11 @@ fi
 %{pecl_xmldir}/%{name}.xml
 
 %changelog
+* Thu Jan 19 2012 Remi Collet <remi at fedoraproject.org> - 1.5.2-9
+- rebuild against PHP 5.4, with upstream patch
+- add filter to avoid private-shared-object-provides
+- add minimal %%check
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.2-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list