fix build without TBB

This commit is contained in:
Dan Horák 2012-04-09 11:39:01 +02:00
parent 0a89d6f3fa
commit 1adb0b9650
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,18 @@
diff -up OpenImageIO-oiio-7b7590f/src/cmake/externalpackages.cmake.tbb-1 OpenImageIO-oiio-7b7590f/src/cmake/externalpackages.cmake
--- OpenImageIO-oiio-7b7590f/src/cmake/externalpackages.cmake.tbb-1 2012-04-09 11:19:51.000000000 +0200
+++ OpenImageIO-oiio-7b7590f/src/cmake/externalpackages.cmake 2012-04-09 11:20:06.000000000 +0200
@@ -256,6 +256,7 @@ endif()
# allow this to be overridden to use the distro-provided package if desired.
#
# Try to find it first and fall back to built-in if not available.
+if (USE_TBB)
find_package (TBB REQUIRED)
if (TBB_FOUND)
set (USE_EXTERNAL_TBB TRUE CACHE BOOL
@@ -266,5 +267,6 @@ if (TBB_FOUND)
# TBB is found, and not the one in OIIO's include directory.
include_directories (BEFORE ${TBB_INCLUDE_DIR})
endif()
+endif()
###########################################################################

View File

@ -3,7 +3,7 @@
Name: OpenImageIO
Version: 0.10.4
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Library for reading and writing images
Group: Development/Libraries
@ -18,13 +18,16 @@ Patch1: OpenImageIO-0.10.0-atomic_test_fix.patch
Patch2: OpenImageIO-0.10.3-use_external_tbb.patch
Patch3: OpenImageIO-0.10.2-Z_BEST_COMPRESSION.patch
Patch4: OpenImageIO-0.10.4-gcc47_unistd_h.fix
Patch5: OpenImageIO-0.10.4-no_tbb.patch
BuildRequires: boost-devel glew-devel qt-devel OpenEXR-devel ilmbase-devel
BuildRequires: python2-devel txt2man
BuildRequires: libpng-devel libtiff-devel
BuildRequires: zlib-devel jasper-devel
BuildRequires: pugixml-devel
%ifarch %{ix86} x86_64 ia64
BuildRequires: tbb-devel
%endif
BuildRequires: hdf5-devel Field3D-devel
# We don't want to provide private python extension libs
@ -64,6 +67,7 @@ Development files for package %{name}
%patch2 -p1 -b .tbb
%patch3 -p1 -b .zlib
%patch4 -p1 -b .gcc47
%patch5 -p1 -b .no-tbb
# Remove bundled pugixml
rm -f src/include/pugixml.hpp \
@ -86,7 +90,11 @@ pushd build
-DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
-DINSTALL_DOCS:BOOL=FALSE \
-DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
%ifarch %{ix86} x86_64 ia64
-DUSE_TBB:BOOL=TRUE \
%else
-DUSE_TBB:BOOL=FALSE \
%endif
../src
make %{?_smp_mflags}
@ -123,6 +131,9 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1
%changelog
* Mon Apr 09 2012 Dan Horák <dan[at]danny.cz> - 0.10.4-6
- fix build without TBB
* Mon Mar 12 2012 Richard Shaw <hobbes1069@gmail.com> - 0.10.4-5
- Rebuild for updated Field3D.