6933418
%global githash1 g28ba675
6933418
%global githash2 2939154
527c815
7a63317
Name:           OpenImageIO
6933418
Version:        1.0.5
6933418
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
fdddaa9
Patch0:         OpenImageIO-1.0.0-use_external_tbb.patch
464b352
Patch1:         OpenImageIO-1.0.0-tbb_include.patch
011445b
Patch2:         OpenImageIO-ppc.patch
7a63317
429a8f1
BuildRequires:  cmake
e4810c4
BuildRequires:  qt4-devel
48e2b68
BuildRequires:  boost-devel glew-devel OpenEXR-devel ilmbase-devel
7a63317
BuildRequires:  python2-devel txt2man
48e2b68
BuildRequires:  libpng-devel libtiff-devel openjpeg-devel libwebp-devel
7a63317
BuildRequires:  zlib-devel jasper-devel
7a63317
BuildRequires:  pugixml-devel
03f891c
%ifarch x86_64
527c815
BuildRequires:  tbb-devel
03f891c
%endif
527c815
BuildRequires:  hdf5-devel Field3D-devel
b8cbdd9
BuildRequires:  OpenColorIO-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}
464b352
%patch0 -p1 -b .exttbb
464b352
%patch1 -p1 -b .tbbinc
011445b
%patch2 -p1 -b .ppc
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.
fdddaa9
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
fdddaa9
       -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 \
03f891c
%ifarch x86_64
527c815
       -DUSE_TBB:BOOL=TRUE \
fdddaa9
       -DUSE_EXTERNAL_TBB=TRUE \
03f891c
%else
03f891c
       -DUSE_TBB:BOOL=FALSE \
03f891c
%endif
f84394c
%ifarch ppc ppc64
f84394c
       -DNOTHREADS:BOOL=TRUE \
f84394c
%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
edf03ed
# Not all tests are expected to pass yet.
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
6933418
* Tue Jun 12 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.5-1
6933418
- Update to latest upstream release.
6933418
b8cbdd9
* Mon May 07 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.4-2
b8cbdd9
- Rebuild for updated libtiff.
b8cbdd9
- Add OpenColorIO to build requirements.
b8cbdd9
48e2b68
* Thu May 03 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.4-1
48e2b68
- Update to latest upstream release.
48e2b68
20cc938
* Thu Apr 19 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.3-1
edf03ed
- Update to latest upstream release.
edf03ed
03f891c
* Tue Mar 13 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.0-2
03f891c
- Do not build against TBB for i686 because it fails.
03f891c
fdddaa9
* Fri Mar 02 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.0-1
fdddaa9
- Update to latest upstream release.
fdddaa9
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.