7d30ff8
%global githash1 g1e37127
7d30ff8
%global githash2 1fa4a20
527c815
7a63317
Name:           OpenImageIO
7d30ff8
Version:        0.10.8
7d30ff8
Release:        1%{?dist}
7a63317
Summary:        Library for reading and writing images
7a63317
7a63317
Group:          Development/Libraries
7a63317
License:        BSD
7a63317
URL:            https://sites.google.com/site/openimageio/home
7a63317
527c815
Source0:        https://download.github.com/%{name}-oiio-Release-%{version}-0-%{githash1}.tar.gz
527c815
Source1:        FindTBB.cmake
527c815
927d71d
Patch0:         OpenImageIO-0.10.2-git_backports.patch
7a63317
Patch1:         OpenImageIO-0.10.0-atomic_test_fix.patch
527c815
Patch2:         OpenImageIO-0.10.3-use_external_tbb.patch
1a39c4a
Patch3:         OpenImageIO-0.10.2-Z_BEST_COMPRESSION.patch
7d30ff8
Patch4:         OpenImageIO-0.10.4-no_tbb.patch
7a63317
a8b400e
BuildRequires:  cmake
f3ad525
BuildRequires:  boost-devel glew-devel OpenEXR-devel ilmbase-devel
f3ad525
BuildRequires:  qt4-devel
7a63317
BuildRequires:  python2-devel txt2man
253dc15
BuildRequires:  libpng-devel libtiff-devel
7a63317
BuildRequires:  zlib-devel jasper-devel
7a63317
BuildRequires:  pugixml-devel
1adb0b9
%ifarch %{ix86} x86_64 ia64
527c815
BuildRequires:  tbb-devel
1adb0b9
%endif
b492f88
BuildRequires:  hdf5-devel Field3D-devel
7a63317
66ec4f2
# We don't want to provide private python extension libs
66ec4f2
%{?filter_setup:
66ec4f2
%filter_provides_in %{python_sitearch}/.*\.so$ 
66ec4f2
%filter_setup
66ec4f2
}
66ec4f2
7a63317
7a63317
%description
7a63317
OpenImageIO is a library for reading and writing images, and a bunch of related
7a63317
classes, utilities, and applications. Main features include:
7a63317
- Extremely simple but powerful ImageInput and ImageOutput APIs for reading and
7a63317
  writing 2D images that is format agnostic.
7a63317
- Format plugins for TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000,
7a63317
  DPX, Cineon, FITS, BMP, ICO, RMan Zfile, Softimage PIC, DDS, SGI,
7a63317
  PNM/PPM/PGM/PBM, Field3d.
7a63317
- An ImageCache class that transparently manages a cache so that it can access
7a63317
  truly vast amounts of image data.
7a63317
- A really nice image viewer, iv, also based on OpenImageIO classes (and so 
7a63317
  will work with any formats for which plugins are available).
7a63317
527c815
7a63317
%package devel
527c815
Summary:        Documentation for %{name}
7a63317
Group:          Development/Libraries
7a63317
Requires:       %{name}%{?_isa} = %{version}-%{release}
7a63317
7a63317
%description devel
7a63317
Development files for package %{name}
7a63317
7a63317
7a63317
%prep
527c815
%setup -q -n %{name}-oiio-%{githash2}
927d71d
%patch0 -p1 -b .backport
927d71d
%patch1 -p1 -b .atomic
527c815
%patch2 -p1 -b .tbb
1a39c4a
%patch3 -p1 -b .zlib
7d30ff8
%patch4 -p1 -b .no-tbb
7a63317
7a63317
# Remove bundled pugixml
7a63317
rm -f src/include/pugixml.hpp \
7a63317
      src/include/pugiconfig.hpp \
5371afc
      src/libutil/pugixml.cpp 
527c815
1a39c4a
# Remove bundled tbb
7a63317
rm -rf src/include/tbb
527c815
# Install FindTBB.cmake
527c815
install -pm 0644 %{SOURCE1} src/cmake/modules/
7a63317
7a63317
7a63317
%build
7a63317
mkdir -p build
7a63317
pushd build
527c815
# CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes
527c815
# CMAKE_INSTALL_RPATH to be cleared, which is the desiered result.
7a63317
%cmake -DCMAKE_SKIP_RPATH:BOOL=TRUE \
7a63317
       -DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
7a63317
       -DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
527c815
       -DINSTALL_DOCS:BOOL=FALSE \
7a63317
       -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
1adb0b9
%ifarch %{ix86} x86_64 ia64
527c815
       -DUSE_TBB:BOOL=TRUE \
1adb0b9
%else
1adb0b9
       -DUSE_TBB:BOOL=FALSE \
1adb0b9
%endif
7a63317
       ../src
7a63317
7a63317
make %{?_smp_mflags}
7a63317
7a63317
7a63317
%install
7a63317
pushd build
7a63317
make DESTDIR=%{buildroot} install
7a63317
7a63317
# Move man pages to the right directory
7a63317
mkdir -p %{buildroot}%{_mandir}/man1
7a63317
cp -a doc/*.1 %{buildroot}%{_mandir}/man1
7a63317
7a63317
7a63317
%post -p /sbin/ldconfig
7a63317
%postun -p /sbin/ldconfig
7a63317
7a63317
527c815
%check
7d30ff8
# Not all unit tests expected to pass.
527c815
#pushd build && make test
527c815
527c815
7a63317
%files
7a63317
%doc CHANGES LICENSE
7a63317
%{_bindir}/*
7a63317
%{_libdir}/libOpenImageIO.so.*
7a63317
%{python_sitearch}/OpenImageIO.so
7a63317
%{_mandir}/man1/*
7a63317
7a63317
%files devel
7a63317
%doc src/doc/*.pdf
7a63317
%{_libdir}/libOpenImageIO.so
7a63317
%{_includedir}/*
7a63317
5371afc
7a63317
%changelog
7d30ff8
* Thu Apr 19 2012 Richard Shaw <hobbes1069@gmail.com> - 0.10.8-1
7d30ff8
- Update to latest upstream release.
7d30ff8
1adb0b9
* Mon Apr 09 2012 Dan HorĂ¡k <dan[at]danny.cz> - 0.10.4-6
1adb0b9
- fix build without TBB
1adb0b9
0a89d6f
* Mon Mar 12 2012 Richard Shaw <hobbes1069@gmail.com> - 0.10.4-5
d928445
- Rebuild for updated Field3D.
d928445
a6786cf
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.4-3
a6786cf
- Rebuilt for c++ ABI breakage
a6786cf
5511934
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.4-2
5511934
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5511934
989180a
* Thu Jan 05 2012 Richard Shaw <hobbes1069@gmail.com> - 0.10.4-1
527c815
- Update to 0.10.4.
527c815
- Rebuild for GCC 4.7.0.
527c815
527c815
* Fri Dec 02 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.3-1
527c815
- Build against TBB library.
c3a3daf
527c815
* Sat Nov 05 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.3-1
1a39c4a
- Update to 0.10.3
1a39c4a
- Rebuild for libpng 1.5.
527c815
- Fixed bulding against tbb library.
2a7b94c
927d71d
* Thu Aug 27 2011 Tom Callaway <spot@fedoraproject.org> - 0.10.2-1
1a39c4a
- Update to 0.10.2
927d71d
66ec4f2
* Thu Aug 04 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.1-2
5371afc
- New upstream release.
66ec4f2
- Fix private shared object provides with python library.
5371afc
7a63317
* Mon Jul 18 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.0-2
7a63317
- Disabled use of the TBB library.
5371afc
- Moved headers to named directory.
7a63317
7a63317
* Tue Jul 05 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.0-1
7a63317
- Inital Release.