[syck] PHP 5.4.0 Build

Remi Collet remi at fedoraproject.org
Fri Jan 20 18:31:43 UTC 2012


commit 590952117b02284b1d99f5e7bbb593538f6fefb1
Author: remi <fedora at famillecollet.com>
Date:   Fri Jan 20 19:31:14 2012 +0100

    PHP 5.4.0 Build

 syck-php54.patch |   12 ++++++++++++
 syck.spec        |   24 +++++++++++++++++++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/syck-php54.patch b/syck-php54.patch
new file mode 100644
index 0000000..b54b7db
--- /dev/null
+++ b/syck-php54.patch
@@ -0,0 +1,12 @@
+diff -up syck-0.61+svn231+patches/ext/php/phpext.c.php54 syck-0.61+svn231+patches/ext/php/phpext.c
+--- syck-0.61+svn231+patches/ext/php/phpext.c.php54	2011-12-29 09:37:51.361894355 +0100
++++ syck-0.61+svn231+patches/ext/php/phpext.c	2011-12-29 09:48:41.682923536 +0100
+@@ -27,7 +27,7 @@ static double mynan() { return zero() /
+  *
+  * Every user visible function must have an entry in syck_functions[].
+  */
+-function_entry syck_functions[] = {
++zend_function_entry syck_functions[] = {
+ 	PHP_FE(syck_load,				NULL)
+ 	{NULL, NULL, NULL}	/* Must be the last line in syck_functions[] */
+ };
diff --git a/syck.spec b/syck.spec
index 1aee2b7..ff46b24 100644
--- a/syck.spec
+++ b/syck.spec
@@ -2,11 +2,18 @@
 %{!?php_version:%define php_version %(php-config --version || echo bad)}
 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(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:		syck
 Summary:	YAML for C, Python, and PHP
 
 Version:	0.61
-Release:	15%{?dist}
+Release:	16%{?dist}
 
 License:	BSD
 Group:		System Environment/Libraries
@@ -17,6 +24,8 @@ Source1:	syck.ini
 
 Patch0:		syck-0.55-libtool.patch
 Patch1:		syck-nan.patch
+# https://github.com/indeyets/syck/pull/7
+Patch2:         syck-php54.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	gawk bison flex libtool
@@ -107,6 +116,7 @@ Syck.
 %setup -q -n syck-0.61+svn231+patches
 %patch0 -p1 -b .libtool
 %patch1 -p0 -b .nan
+%patch2 -p1 -b .php54
 
 %build
 # Rebuild all
@@ -165,6 +175,13 @@ popd # End python extension
 # Get out of extension
 popd
 
+%check
+# minimal load test for the PHP extension
+LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
+    -d extension_dir=%{buildroot}%{php_extdir} \
+    -d extension=syck.so -m \
+    | grep syck
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -193,6 +210,11 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{_sysconfdir}/php.d/syck.ini
 
 %changelog
+* Thu Jan 19 2012 Remi Collet <remi at fedoraproject.org> - 0.9.2-10
+- build against php 5.4, with patch
+- add filter_provides to avoid private-shared-object-provides shout.so
+- add minimal %%check for php extension
+
 * Mon Jan 16 2012 Oliver Falk <oliver at linux-kernel.at> - 0.61-15
 - Remove check on php_zend_api - it's causing troubles and we don't
   need it on F17 branch


More information about the scm-commits mailing list