packages: php-ffmpeg/php-ffmpeg.spec - hack tests working

glen glen at pld-linux.org
Fri Jun 26 01:27:28 CEST 2009


Author: glen                         Date: Thu Jun 25 23:27:28 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- hack tests working

---- Files affected:
packages/php-ffmpeg:
   php-ffmpeg.spec (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: packages/php-ffmpeg/php-ffmpeg.spec
diff -u packages/php-ffmpeg/php-ffmpeg.spec:1.11 packages/php-ffmpeg/php-ffmpeg.spec:1.12
--- packages/php-ffmpeg/php-ffmpeg.spec:1.11	Thu Jun 25 22:13:42 2009
+++ packages/php-ffmpeg/php-ffmpeg.spec	Fri Jun 26 01:27:22 2009
@@ -1,8 +1,12 @@
 # $Revision$, $Date$
-%define		_modname	ffmpeg
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+
+%define		modname	ffmpeg
 Summary:	Extension to manipulate movie in PHP
 Summary(pl.UTF-8):	Rozszerzenie do obróbki filmów w PHP
-Name:		php-%{_modname}
+Name:		php-%{modname}
 Version:	0.6.0
 Release:	5
 License:	GPL
@@ -10,7 +14,10 @@
 Source0:	http://dl.sourceforge.net/ffmpeg-php/ffmpeg-php-%{version}.tbz2
 # Source0-md5:	f779c0dbffda9dac54729d60c0e04c05
 Patch0:		gdImageBoundsSafe.patch
+Patch1:		testsuite.patch
+Patch2:		tests.patch
 URL:		http://ffmpeg-php.sourceforge.net/
+%{?with_tests:BuildRequires:	/usr/bin/php}
 BuildRequires:	ffmpeg-devel >= 0.4.9
 BuildRequires:	php-devel >= 3:5.0.0
 BuildRequires:	php-gd
@@ -43,12 +50,27 @@
 %prep
 %setup -q -n ffmpeg-php-%{version}
 %patch0 -p1
+%patch2 -p1
+
+# failing due gdImageBounds calls
+rm -f tests/getFrame.phpt
+rm -f tests/getFramesBackwards.phpt
+rm -f tests/getFramesForward.phpt
+rm -f tests/getFramesForwardPassedEnd.phpt
+rm -f tests/getFramesNoArg.phpt
+rm -f tests/getNextKeyFrame.phpt
+rm -f tests/getPTS.phpt
+rm -f tests/isKeyFrame.phpt
+
 
 %build
 phpize
 %configure
+%{__patch} -p1 < %{PATCH1}
 %{__make}
 
+%{?with_tests:make PHP_EXECUTABLE=/usr/bin/php test}
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
@@ -57,9 +79,9 @@
 	EXTENSION_DIR=%{php_extensiondir}
 
 # install config file
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
 EOF
 
 %clean
@@ -76,8 +98,8 @@
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog CREDITS EXPERIMENTAL LICENSE TODO test_ffmpeg.php
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -85,6 +107,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.12  2009/06/25 23:27:22  glen
+- hack tests working
+
 Revision 1.11  2009/06/25 20:13:42  glen
 - disable gdImageBoundsSafe check. it is still broken; rel 5
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php-ffmpeg/php-ffmpeg.spec?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list