diff --git a/uuid-1.6.2-php54.patch b/uuid-1.6.2-php54.patch new file mode 100644 index 0000000..e0281a8 --- /dev/null +++ b/uuid-1.6.2-php54.patch @@ -0,0 +1,12 @@ +diff -up uuid-1.6.2/php/uuid.c.php54 uuid-1.6.2/php/uuid.c +--- uuid-1.6.2/php/uuid.c.php54 2011-12-27 17:23:00.948400710 +0100 ++++ uuid-1.6.2/php/uuid.c 2011-12-27 17:23:16.668401029 +0100 +@@ -496,7 +496,7 @@ PHP_FUNCTION(uuid_version) + } + + /* module function table */ +-static function_entry uuid_functions[] = { ++static zend_function_entry uuid_functions[] = { + PHP_FE(uuid_create, NULL) + PHP_FE(uuid_destroy, NULL) + PHP_FE(uuid_clone, NULL) diff --git a/uuid.spec b/uuid.spec index 6a15d7f..202a075 100644 --- a/uuid.spec +++ b/uuid.spec @@ -1,9 +1,16 @@ %define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4) %global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) +# Private libraries are not be exposed globally by RPM +# 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$ + Name: uuid Version: 1.6.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Universally Unique Identifier library License: MIT Group: System Environment/Libraries @@ -11,6 +18,7 @@ URL: http://www.ossp.org/pkg/lib/uuid/ Source0: ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz Patch0: uuid-1.6.1-ossp.patch Patch1: uuid-1.6.1-mkdir.patch +Patch2: uuid-1.6.2-php54.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool @@ -110,6 +118,7 @@ DCE development headers and libraries for OSSP uuid. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 -b .php54 %build # Build the library. @@ -187,6 +196,8 @@ popd pushd php LD_LIBRARY_PATH=../.libs make test popd +# Simple extension load test (no test run in make test) +LD_LIBRARY_PATH=.libs php -n -d extension_dir=php/modules -d extension=uuid.so -m | grep uuid %clean rm -rf $RPM_BUILD_ROOT @@ -258,6 +269,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libossp-uuid_dce.so %changelog +* Thu Jan 19 2012 Remi Collet - 1.6.2-8 +- build against php 5.4, with patch +- add filter_provides to avoid private-shared-object-provides shout.so +- add minimal %%check for php extension + * Sat Jan 14 2012 Fedora Release Engineering - 1.6.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild