summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-lzf-rm-bundled-libs.patch30
-rw-r--r--php-pecl-lzf.spec59
2 files changed, 70 insertions, 19 deletions
diff --git a/php-lzf-rm-bundled-libs.patch b/php-lzf-rm-bundled-libs.patch
new file mode 100644
index 0000000..9c8cacc
--- /dev/null
+++ b/php-lzf-rm-bundled-libs.patch
@@ -0,0 +1,30 @@
+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/lib, 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 1c5d3b0..4d3c0ed 100644
--- a/php-pecl-lzf.spec
+++ b/php-pecl-lzf.spec
@@ -1,31 +1,41 @@
-%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
+%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
%define pecl_name LZF
-Name: php-pecl-lzf
-Version: 1.6.2
-Release: 1%{?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
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: php-devel
+Name: php-pecl-lzf
+Version: 1.6.2
+Release: 2%{?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
+
+# remove bundled lzf libs
+Patch0: php-lzf-rm-bundled-libs.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: php-devel
BuildRequires: php-pear >= 1:1.4.0
+BuildRequires: liblzf-devel
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
-Requires(post): %{__pecl}
-Requires(postun): %{__pecl}
-Provides: php-pecl(%{pecl_name}) = %{version}
-
-# RPM 4.8
+Requires(post): %{__pecl}
+Requires(postun): %{__pecl}
+Provides: php-pecl(%{pecl_name}) = %{version}
+Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
+
+# Other third party repo stuff
+Obsoletes: php53-pecl-memcache
+Obsoletes: php53u-pecl-memcache
+%if "%{php_version}" > "5.4"
+Obsoletes: php54-pecl-memcache
+%endif
+
+# Filter private shared
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
%{?filter_setup}
-# RPM 4.9
-%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{_libdir}/.*\\.so$
%description
@@ -38,6 +48,10 @@ slight speed cost.
%prep
%setup -c -q
+cd %{pecl_name}-%{version}
+%patch0 -p1 -b liblzf
+rm -f lzf_c.c lzf_d.c lzf.h
+cd ..
cp -r %{pecl_name}-%{version} %{pecl_name}-%{version}-zts
@@ -121,6 +135,13 @@ fi
%changelog
+* Sun Oct 21 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.6.2-2
+- sync with rawhide (use system liblzf)
+
+* Sat Oct 20 2012 Andrew Colin Kissa - 1.6.2-1
+- Upgrade to latest upstream
+- Fix bugzilla #838309 #680230
+
* Mon Jul 09 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.6.2-1
- update to 1.6.2