[php-pecl-sphinx] PHP 5.4.0 Build
Remi Collet
remi at fedoraproject.org
Fri Jan 20 18:17:41 UTC 2012
commit f91f67ac2b6dbbbfb0e27e915fd1e895b794776b
Author: remi <fedora at famillecollet.com>
Date: Fri Jan 20 19:17:13 2012 +0100
PHP 5.4.0 Build
php-pecl-sphinx.spec | 24 +++++++++++++++++++++++-
sphinx-php54.patch | 21 +++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/php-pecl-sphinx.spec b/php-pecl-sphinx.spec
index 1598bb2..059682e 100644
--- a/php-pecl-sphinx.spec
+++ b/php-pecl-sphinx.spec
@@ -6,12 +6,15 @@
Name: php-pecl-sphinx
Version: 1.1.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: PECL extension for Sphinx SQL full-text search engine
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/60349
+Patch0: sphinx-php54.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libsphinxclient-devel
BuildRequires: php-pear
@@ -23,6 +26,12 @@ 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 PHP bindings for libsphinxclient,
@@ -30,6 +39,15 @@ client library for Sphinx the SQL full-text search engine.
%prep
%setup -q -c
+%patch0 -p0 -b .php54
+
+# Upstream often forget this
+extver=$(sed -n '/#define PHP_SPHINX_VERSION/{s/.* "//;s/".*$//;p}' %{pecl_name}-%{version}/php_sphinx.h)
+if test "x${extver}" != "x%{version}"; then
+ : Error: Upstream version is ${extver}, expecting %{version}.
+ exit 1
+fi
+
[ -f package2.xml ] || %{__mv} package.xml package2.xml
%{__mv} package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml
@@ -85,6 +103,10 @@ fi
%changelog
+* Thu Jan 19 2012 Remi Collet <remi at fedoraproject.org> - 1.1.0-3
+- build against php 5.4, with patch
+- add filter to fix private-shared-object-provides
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sphinx-php54.patch b/sphinx-php54.patch
new file mode 100644
index 0000000..7264099
--- /dev/null
+++ b/sphinx-php54.patch
@@ -0,0 +1,21 @@
+diff -up sphinx-1.1.0/sphinx.c.php54 sphinx-1.1.0/sphinx.c
+--- sphinx-1.1.0/sphinx.c.php54 2011-11-21 19:28:29.115294066 +0100
++++ sphinx-1.1.0/sphinx.c 2011-11-21 19:28:45.778340480 +0100
+@@ -83,7 +83,7 @@ static zend_object_value php_sphinx_clie
+ }
+ /* }}} */
+
+-static zval *php_sphinx_client_read_property(zval *object, zval *member, int type TSRMLS_DC) /* {{{ */
++static zval *php_sphinx_client_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) /* {{{ */
+ {
+ php_sphinx_client *c;
+ zval tmp_member;
+@@ -102,7 +102,7 @@ static zval *php_sphinx_client_read_prop
+ /* XXX we can either create retval ourselves (for custom properties) or use standard handlers */
+
+ std_hnd = zend_get_std_object_handlers();
+- retval = std_hnd->read_property(object, member, type TSRMLS_CC);
++ retval = std_hnd->read_property(object, member, type, key TSRMLS_CC);
+
+ if (member == &tmp_member) {
+ zval_dtor(member);
More information about the scm-commits
mailing list