diff --git a/taglib-1.5-tests.patch b/taglib-1.5-tests.patch new file mode 100644 index 0000000..acb65b8 --- /dev/null +++ b/taglib-1.5-tests.patch @@ -0,0 +1,11 @@ +diff -Nur taglib-1.5-orig/tests/test_string.cpp taglib-1.5/tests/test_string.cpp +--- taglib-1.5-orig/tests/test_string.cpp 2008-01-26 11:57:06.000000000 +0100 ++++ taglib-1.5/tests/test_string.cpp 2009-08-22 11:17:55.000000000 +0200 +@@ -24,6 +24,7 @@ + + #include + #include ++#include + + using namespace std; + using namespace TagLib; diff --git a/taglib.spec b/taglib.spec index 6708174..fdc9f0c 100644 --- a/taglib.spec +++ b/taglib.spec @@ -1,6 +1,12 @@ # Fedora cvs admin requests for taglib: http://bugzilla.redhat.com/418271 +%bcond_without tests + +%if %{with tests} +%global buildtests -DBUILD_TESTS=ON +%endif + Name: taglib Version: 1.5 Release: 6%{?dist} @@ -21,6 +27,8 @@ Patch1: taglib-1.5b1-multilib.patch # try 2, kiss omit -L%_libdir Patch2: taglib-1.5rc1-multilib.patch +Patch3: taglib-1.5-tests.patch + ## upstream patches Patch100: taglib-1.5-kde#161721.patch @@ -47,16 +55,18 @@ Files needed when building software with %{name}. %prep %setup -q -n taglib-%{version}%{?beta} +# patch1 not applied ## omit for now %patch2 -p1 -b .multilib +%patch3 -p1 -b .tests %patch100 -p1 -b .kde#161721.patch %build mkdir -p %{_target_platform} pushd %{_target_platform} -%{cmake} .. +%{cmake} %{?buildtests} .. popd make %{?_smp_mflags} -C %{_target_platform} @@ -72,6 +82,14 @@ rm -fr examples/Makefile* rm -f %{buildroot}%{_libdir}/lib*.la +%if %{with tests} +%check +cp -a tests/data %{_target_platform}/tests +cd %{_target_platform} +make check +%endif + + %clean rm -rf %{buildroot} @@ -97,6 +115,7 @@ rm -rf %{buildroot} %changelog * Sat Aug 22 2009 Michael Schwendt - 1.5-6 +- Add %%check section and conditionally build with tests. - Update descriptions (and mention the additional file formats). * Sun Jul 26 2009 Fedora Release Engineering - 1.5-5