[php-facedetect] PHP 5.4.0 Build
Remi Collet
remi at fedoraproject.org
Fri Jan 20 17:04:31 UTC 2012
commit 22de0316b1437789c9c9e0fb3090595658449e4b
Author: remi <fedora at famillecollet.com>
Date: Fri Jan 20 18:04:02 2012 +0100
PHP 5.4.0 Build
facedetect-php54.patch | 12 ++++++++++++
php-facedetect.spec | 27 +++++++++++++++++++++++++--
2 files changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/facedetect-php54.patch b/facedetect-php54.patch
new file mode 100644
index 0000000..62730ed
--- /dev/null
+++ b/facedetect-php54.patch
@@ -0,0 +1,12 @@
+diff -up facedetect/facedetect.c.php54 facedetect/facedetect.c
+--- facedetect/facedetect.c.php54 2011-12-28 16:07:45.167341320 +0100
++++ facedetect/facedetect.c 2011-12-28 16:08:01.979341725 +0100
+@@ -28,7 +28,7 @@
+ *
+ * Every user visible function must have an entry in facedetect_functions[].
+ */
+-static function_entry facedetect_functions[] = {
++static zend_function_entry facedetect_functions[] = {
+ PHP_FE(face_detect, NULL)
+ PHP_FE(face_count, NULL)
+ {NULL, NULL, NULL}
diff --git a/php-facedetect.spec b/php-facedetect.spec
index 698ffba..f74f93a 100644
--- a/php-facedetect.spec
+++ b/php-facedetect.spec
@@ -1,9 +1,8 @@
-%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}
Name: php-facedetect
Version: 1.0.1
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: PHP extension to access the OpenCV library
Group: Development/Languages
License: PHP
@@ -13,11 +12,21 @@ Source0: http://www.xarg.org/download/facedetect-%{version}.tar.gz
Patch1: facedetect-dso-link-workaround.patch
# Fix code to work with opencv 2.2.0
Patch2: facedetect-1.0.1-opencv-2.2.0.patch
+# https://github.com/infusion/PHP-Facedetect/pull/5
+Patch3: facedetect-php54.patch
BuildRequires: php-devel opencv-devel >= 2.2.0
Requires: opencv
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
+# Fix private-shared-object-provides
+# 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 a PHP implementation of the OpenCV library.
The extension offers two new functions. In principle, they differ
@@ -30,6 +39,8 @@ of their coordinates.
%setup -q -n facedetect
%patch1 -p1
%patch2 -p1
+%patch3 -p1 -b .php54
+
%{__cat} <<'EOF' >facedetect.ini
extension=facedetect.so
EOF
@@ -44,12 +55,24 @@ make %{?_smp_mflags}
make install INSTALL_ROOT=$RPM_BUILD_ROOT INSTALL="install -p"
install -p -D -m0644 facedetect.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.d/facedetect.ini
+%check
+# Minimal load test of php extension
+php --no-php-ini \
+ --define extension_dir=${RPM_BUILD_ROOT}%{php_extdir} \
+ --define extension=facedetect.so \
+ --modules | grep facedetect
+
%files
%doc CREDITS
%config(noreplace) %{_sysconfdir}/php.d/facedetect.ini
%{php_extdir}/facedetect.so
%changelog
+* Wed Jan 18 2012 Remi Collet <remi at fedoraproject.org> - 1.0.1-6
+- build against php 5.4.0
+- add filter to fix private-shared-object-provides
+- add %%check for php extension
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list