From 47d07a5c21dcca2577091140dfef096d410456ae Mon Sep 17 00:00:00 2001 From: Richard M. Shaw Date: Oct 01 2013 18:16:02 +0000 Subject: Fix conflicts from merging with master. --- diff --git a/.gitignore b/.gitignore index 092fa08..0cf412d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,15 @@ /OpenImageIO-oiio-Release-1.0.0-0-g5b37f1c.tar.gz /OpenImageIO-oiio-Release-1.0.3-0-gdffc74e.tar.gz clog +/OpenImageIO-oiio-Release-1.0.4-0-g513d0dd.tar.gz +/OpenImageIO-oiio-Release-1.0.5-0-g28ba675.tar.gz +/OpenImageIO-oiio-Release-1.0.6-0-g47d4346.tar.gz +/OpenImageIO-oiio-Release-1.0.7-0-g0cae52b.tar.gz +/OpenImageIO-oiio-Release-1.0.8-0-g187bb9b.tar.gz +/OpenImageIO-oiio-Release-1.0.9-0-g0b78dec.tar.gz +/oiio-Release-1.1.3.tar.gz +/oiio-Release-1.1.10.tar.gz +/oiio-Release-1.1.11.tar.gz +/oiio-Release-1.1.13.tar.gz +/oiio-Release-1.2.0.tar.gz +/oiio-Release-1.2.1.tar.gz diff --git a/OpenImageIO-1.0.0-tbb_include.patch b/OpenImageIO-1.0.0-tbb_include.patch deleted file mode 100644 index 47151af..0000000 --- a/OpenImageIO-1.0.0-tbb_include.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/libutil/tbb_misc.cpp OpenImageIO-oiio-5b37f1c/src/libutil/tbb_misc.cpp ---- OpenImageIO-oiio-5b37f1c.orig/src/libutil/tbb_misc.cpp 2012-02-25 17:17:12.000000000 -0600 -+++ OpenImageIO-oiio-5b37f1c/src/libutil/tbb_misc.cpp 2012-03-04 17:00:29.519842011 -0600 -@@ -30,8 +30,7 @@ - // an executing program. - - #include "tbb/tbb_stddef.h" --// Out-of-line TBB assertion handling routines are instantiated here. --#include "tbb/tbb_assert_impl.h" -+#include "tbb/tbb_machine.h" - - #include "tbb/tbb_misc.h" - #include diff --git a/OpenImageIO-1.0.0-use_external_tbb.patch b/OpenImageIO-1.0.0-use_external_tbb.patch deleted file mode 100644 index ac7db6b..0000000 --- a/OpenImageIO-1.0.0-use_external_tbb.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt ---- OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt 2012-02-28 12:58:45.306847484 -0600 -+++ OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt 2012-02-28 13:02:27.438365805 -0600 -@@ -61,7 +61,11 @@ - endif () - - # Include our own TBB if using it --if (USE_TBB) -+if (USE_TBB AND USE_EXTERNAL_TBB) -+ message (STATUS "System TBB library will be used.") -+ set (libOpenImageIO_srcs ${libOpenImageIO_srcs}) -+elseif (USE_TBB AND NOT USE_EXTERNAL_TBB) -+ message (STATUS "Built-in TBB library will be used.") - set (libOpenImageIO_srcs ${libOpenImageIO_srcs} ../libutil/tbb_misc.cpp) - endif () - -diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt ---- OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt 2012-02-25 17:17:12.000000000 -0600 -+++ OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt 2012-02-28 13:32:00.961799696 -0600 -@@ -22,7 +22,7 @@ - install (FILES ${public_headers} DESTINATION ${INCLUDE_INSTALL_DIR} - COMPONENT developer) - --if (USE_TBB) -+if (USE_TBB AND NOT USE_EXTERNAL_TBB) - install (DIRECTORY tbb DESTINATION ${INCLUDE_INSTALL_DIR} - COMPONENT developer) - endif () diff --git a/OpenImageIO.spec b/OpenImageIO.spec index b027f40..df50e6d 100644 --- a/OpenImageIO.spec +++ b/OpenImageIO.spec @@ -1,34 +1,33 @@ -%global githash1 g513d0dd -%global githash2 d94a4e4 - Name: OpenImageIO -Version: 1.0.4 -Release: 1%{?dist}.1 +Version: 1.2.1 +Release: 1%{?dist} Summary: Library for reading and writing images Group: Development/Libraries License: BSD URL: https://sites.google.com/site/openimageio/home -Source0: https://download.github.com/%{name}-oiio-Release-%{version}-0-%{githash1}.tar.gz -Source1: FindTBB.cmake +Source0: https://download.github.com/oiio-Release-%{version}.tar.gz +# Images for test suite +#Source1: oiio-images.tar.gz +Source101: FindTBB.cmake -Patch0: OpenImageIO-1.0.0-use_external_tbb.patch -Patch1: OpenImageIO-1.0.0-tbb_include.patch -Patch2: OpenImageIO-1.0.3-ppc64.patch +Patch0: oiio-arm.patch +Patch1: oiio-ppc.patch +Patch2: oiio-s390.patch +Patch3: oiio-hdf5.patch -BuildRequires: cmake -BuildRequires: boost-devel glew-devel OpenEXR-devel ilmbase-devel +BuildRequires: cmake txt2man BuildRequires: qt4-devel -BuildRequires: python2-devel txt2man -BuildRequires: libpng-devel libtiff-devel openjpeg-devel -BuildRequires: zlib-devel jasper-devel +BuildRequires: boost-devel +BuildRequires: glew-devel +BuildRequires: OpenEXR-devel ilmbase-devel +BuildRequires: python2-devel +BuildRequires: libpng-devel libtiff-devel openjpeg-devel libwebp-devel +BuildRequires: zlib-devel +BuildRequires: jasper-devel BuildRequires: pugixml-devel -%ifarch x86_64 -BuildRequires: tbb-devel -%endif -# Field3D requires cmake 2.8 but EL6 only has 2.6. -#BuildRequires: hdf5-devel Field3D-devel +BuildRequires: hdf5-devel Field3D-devel BuildRequires: OpenColorIO-devel # We don't want to provide private python extension libs @@ -48,8 +47,24 @@ classes, utilities, and applications. Main features include: PNM/PPM/PGM/PBM, Field3d. - An ImageCache class that transparently manages a cache so that it can access truly vast amounts of image data. -- A really nice image viewer, iv, also based on OpenImageIO classes (and so - will work with any formats for which plugins are available). + + +%package utils +Summary: Command line utilies for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description utils +Command-line tools to minipulate and get information on images using the +%{name} library. + + +%package iv +Summary: %{name} based image viewer. +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description iv +A really nice image viewer, iv, based on %{name} classes (and so will work with +any formats for which plugins are available). %package devel @@ -62,10 +77,14 @@ Development files for package %{name} %prep -%setup -q -n %{name}-oiio-%{githash2} -%patch0 -p1 -b .exttbb -%patch1 -p1 -b .tbbinc -%patch2 -p1 -b .ppc64 +%setup -q -n oiio-Release-%{version} +%patch0 -p1 -b .arm +%patch1 -p1 -b .ppc +#patch2 -p1 -b .s390 +%patch3 -p1 -b .hdf5 + +# Install FindTBB.cmake +install %{SOURCE101} src/cmake/modules/ # Remove bundled pugixml rm -f src/include/pugixml.hpp \ @@ -74,12 +93,14 @@ rm -f src/include/pugixml.hpp \ # Remove bundled tbb rm -rf src/include/tbb -# Install FindTBB.cmake -install -pm 0644 %{SOURCE1} src/cmake/modules/ + +# Install test images +#rm -rf ../oiio-images && mkdir ../oiio-images && pushd ../oiio-images +#tar --strip-components=1 -xzf %{SOURCE1} %build -rm -rf build && mkdir -p build && pushd build +rm -rf build/linux && mkdir -p build/linux && pushd build/linux # CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes # CMAKE_INSTALL_RPATH to be cleared, which is the desiered result. %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -88,19 +109,18 @@ rm -rf build && mkdir -p build && pushd build -DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \ -DINSTALL_DOCS:BOOL=FALSE \ -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \ -%ifarch x86_64 - -DUSE_TBB:BOOL=TRUE \ - -DUSE_EXTERNAL_TBB=TRUE \ -%else -DUSE_TBB:BOOL=FALSE \ +%ifarch ppc ppc64 + -DNOTHREADS:BOOL=TRUE \ %endif - ../src + -DVERBOSE=TRUE \ + ../../src make %{?_smp_mflags} %install -pushd build +pushd build/linux make DESTDIR=%{buildroot} install # Move man pages to the right directory @@ -113,16 +133,24 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1 %check -# Not all tests are expected to pass yet. -#pushd build && make test +# Not all tests pass on linux +#pushd build/linux && make test %files %doc CHANGES LICENSE -%{_bindir}/* %{_libdir}/libOpenImageIO.so.* %{python_sitearch}/OpenImageIO.so -%{_mandir}/man1/* + +%files utils +%exclude %{_bindir}/iv +%{_bindir}/* +%exclude %{_mandir}/man1/iv.1.gz +%{_mandir}/man1/*.1.gz + +%files iv +%{_bindir}/iv +%{_mandir}/man1/iv.1.gz %files devel %doc src/doc/*.pdf @@ -131,15 +159,101 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1 %changelog -* Mon May 07 2012 Richard Shaw - 1.0.4-1 +* Thu Aug 8 2013 Richard Shaw - 1.2.1-1 +- Update to latest upstream release. + +* Fri Aug 02 2013 Fedora Release Engineering - 1.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sun Jul 28 2013 Petr Machata - 1.2.0-2 +- Rebuild for boost 1.54.0 + +* Fri Jul 15 2013 Richard Shaw - 1.2.0-1 +- Update to latest upstream release. +- Add patch for more pedantic gcc 4.8. + +* Wed Jul 3 2013 Richard Shaw - 1.1.13-1 +- Update to latest bugfix release. + +* Mon Jul 1 2013 Richard Shaw - 1.1.11-1 +- Update to lastest bugfix release. +- Upstream patch makes native spinlocks faster than TBB. TBB no longer needed. + +* Mon May 27 2013 Karsten Hopp 1.1.10-4 +- modify ppc patch for current release + +* Fri May 24 2013 Petr Machata - 1.1.10-3 +- Rebuild for TBB memory barrier bug + +* Mon May 20 2013 Dan HorĂ¡k - 1.1.10-2 +- fix build on s390(x) + +* Tue Apr 23 2013 Richard Shaw - 1.1.10-1 +- Update to latest upstream release. + +* Sun Mar 31 2013 Peter Robinson 1.1.3-7 +- Add upstream patch to fix FTBFS on ARM (RHBZ 924932) + +* Sun Mar 10 2013 Rex Dieter 1.1.3-6 +- rebuild (OpenEXR) + +* Sun Feb 10 2013 Denis Arnaud - 1.1.3-5 +- Rebuild for Boost-1.53.0 + +* Sat Feb 09 2013 Denis Arnaud - 1.1.3-4 +- Rebuild for Boost-1.53.0 + +* Mon Jan 28 2013 Karsten Hopp 1.1.3-3 +- update PPC patch, use power64 macro + +* Fri Jan 18 2013 Adam Tkac - 1.1.3-2 +- rebuild due to "jpeg8-ABI" feature drop + +* Mon Jan 14 2013 Richard Shaw - 1.1.3-1 - Update to latest upstream release. -- Add build requirement for OpenColorIO. +- Separate utilities and library packages. + +* Fri Dec 28 2012 Richard W.M. Jones - 1.0.9-3 +- Rebuild, see + http://lists.fedoraproject.org/pipermail/devel/2012-December/175685.html -* Thu Apr 19 2012 Richard Shaw - 1.0.3-1 +* Thu Dec 13 2012 Adam Jackson - 1.0.9-2 +- Rebuild for glew 1.9.0 + +* Sat Sep 22 2012 Richard Shaw - 1.0.9-1 - Update to latest upstream release. -* Tue Mar 13 2012 Richard Shaw - 1.0.0-2 -- Do not build against TBB for i686 because it fails. +* Wed Aug 8 2012 David Malcolm - 1.0.8-2 +- rebuild against boost-1.50 + +* Wed Aug 01 2012 Richard Shaw - 1.0.8-1 +- Update to latest upstream release. + +* Mon Jul 30 2012 Richard Shaw - 1.0.7-3 +- Rebuild for updated libGLEW. + +* Wed Jul 18 2012 Fedora Release Engineering - 1.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 09 2012 Richard Shaw - 1.0.7-1 +- Update to latest upstream release. + +* Thu Jun 28 2012 Richard Shaw - 1.0.6-1 +- Update to latest upstream release. +- Fix linking against TBB which broke at some point. + +* Tue Jun 12 2012 Richard Shaw - 1.0.5-1 +- Update to latest upstream release. + +* Mon May 07 2012 Richard Shaw - 1.0.4-2 +- Rebuild for updated libtiff. +- Add OpenColorIO to build requirements. + +* Thu May 03 2012 Richard Shaw - 1.0.4-1 +- Update to latest upstream release. + +* Tue Apr 24 2012 Richard Shaw - 1.0.3-1 +- Update to latest upstream release. * Fri Mar 02 2012 Richard Shaw - 1.0.0-1 - Update to latest upstream release. diff --git a/oiio-arm.patch b/oiio-arm.patch new file mode 100644 index 0000000..deac642 --- /dev/null +++ b/oiio-arm.patch @@ -0,0 +1,16 @@ +diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/include/thread.h +--- oiio-Release-1.2.1.orig/src/include/thread.h 2013-08-06 00:10:31.000000000 -0500 ++++ oiio-Release-1.2.1/src/include/thread.h 2013-08-28 14:29:19.730464642 -0500 +@@ -447,7 +447,12 @@ + + // Disallow copy construction by making private and unimplemented. + atomic (atomic const &); ++#if defined __arm__ ++} __attribute__((aligned(8))); ++#else + }; ++#endif ++ + + + #endif /* ! USE_TBB_ATOMIC */ diff --git a/oiio-hdf5.patch b/oiio-hdf5.patch new file mode 100644 index 0000000..c861e7e --- /dev/null +++ b/oiio-hdf5.patch @@ -0,0 +1,11 @@ +diff -Naur oiio-Release-1.2.1.orig/src/cmake/externalpackages.cmake oiio-Release-1.2.1/src/cmake/externalpackages.cmake +--- oiio-Release-1.2.1.orig/src/cmake/externalpackages.cmake 2013-08-06 00:10:31.000000000 -0500 ++++ oiio-Release-1.2.1/src/cmake/externalpackages.cmake 2013-08-29 09:12:03.303106159 -0500 +@@ -285,6 +285,7 @@ + # variables HDF5_INCLUDE_DIRS and HDF5_LIBRARIES. + else () + find_package (HDF5 COMPONENTS CXX) ++ set(HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE}) + endif () + if (VERBOSE) + message (STATUS "HDF5_FOUND=${HDF5_FOUND}") diff --git a/oiio-ppc.patch b/oiio-ppc.patch new file mode 100644 index 0000000..1d774e7 --- /dev/null +++ b/oiio-ppc.patch @@ -0,0 +1,56 @@ +diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/include/thread.h +--- oiio-Release-1.2.1.orig/src/include/thread.h 2013-08-06 00:10:31.000000000 -0500 ++++ oiio-Release-1.2.1/src/include/thread.h 2013-08-28 14:35:21.873905568 -0500 +@@ -112,8 +112,10 @@ + #endif + + #if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401)) ++#if !defined(__FreeBSD__) && !defined(__powerpc__) || defined(__x86_64__) + #define USE_GCC_ATOMICS + #endif ++#endif + + OIIO_NAMESPACE_ENTER + { +@@ -227,6 +229,11 @@ + #elif defined(_MSC_VER) + // Windows + return _InterlockedExchangeAdd ((volatile LONG *)at, x); ++#elif defined (__powerpc__) ++ long long r; ++ r = *at; ++ *at += x; ++ return r; + #else + # error No atomics on this platform. + #endif +@@ -249,6 +256,11 @@ + # else + return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x); + # endif ++#elif defined (__powerpc__) ++ long long r; ++ r = *at; ++ *at += x; ++ return r; + #else + # error No atomics on this platform. + #endif +@@ -272,6 +284,8 @@ + return a->compare_and_swap (newval, compareval) == newval; + #elif defined(_MSC_VER) + return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval); ++#elif defined(__powerpc__) ++ return ((*at == compareval) ? (*at = newval), 1 : 0); + #else + # error No atomics on this platform. + #endif +@@ -289,6 +303,8 @@ + return a->compare_and_swap (newval, compareval) == newval; + #elif defined(_MSC_VER) + return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval); ++#elif defined(__PPC__) ++ return ((*at == compareval) ? (*at = newval), 1 : 0); + #else + # error No atomics on this platform. + #endif diff --git a/oiio-s390.patch b/oiio-s390.patch new file mode 100644 index 0000000..39c5780 --- /dev/null +++ b/oiio-s390.patch @@ -0,0 +1,12 @@ +diff -up oiio-Release-1.1.10/src/include/thread.h.s390 oiio-Release-1.1.10/src/include/thread.h +--- oiio-Release-1.1.10/src/include/thread.h.s390 2013-05-20 11:23:40.000000000 +0200 ++++ oiio-Release-1.1.10/src/include/thread.h 2013-05-20 11:24:06.000000000 +0200 +@@ -326,7 +326,7 @@ pause (int delay) + { + #if defined(__GNUC__) + for (int i = 0; i < delay; ++i) { +-#if defined __arm__ ++#if defined __arm__ || defined __s390__ + __asm__ __volatile__("NOP;"); + #else + __asm__ __volatile__("pause;"); diff --git a/sources b/sources index 84a74aa..aa05342 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2114f40a6015d2ba4d36fc18620f2edb OpenImageIO-oiio-Release-1.0.4-0-g513d0dd.tar.gz +59d91de4774eec122a305a23435fc329 oiio-Release-1.2.1.tar.gz