7a63317
Name:           OpenImageIO
7a63317
Version:        0.10.0
7a63317
Release:        2%{?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
7a63317
Source0:        https://download.github.com/%{name}-oiio-Release-%{version}-12-g8055b0f.tar.gz
7a63317
Patch0:         OpenImageIO-0.10.0-git_backports.patch
7a63317
Patch1:         OpenImageIO-0.10.0-atomic_test_fix.patch
7a63317
Patch2:         OpenImageIO-0.10.0-use_system_tbb.patch
7a63317
7a63317
BuildRequires:  boost-devel glew-devel qt-devel OpenEXR-devel ilmbase-devel
7a63317
BuildRequires:  python2-devel txt2man
7a63317
BuildRequires:  libpng libtiff-devel
7a63317
BuildRequires:  zlib-devel jasper-devel
7a63317
BuildRequires:  pugixml-devel
7a63317
# Field3D support is not considered stable at this time and no package
7a63317
# currently exists for Fedora. Re-enable when fixed.
7a63317
#BuildRequires:  hdf5-devel Field3D-devel
7a63317
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
7a63317
%package devel
7a63317
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
7a63317
%setup -q -n %{name}-oiio-8055b0f
7a63317
%patch0 -p1
7a63317
%patch1 -p1
7a63317
%patch2 -p1
7a63317
7a63317
# Remove bundled pugixml
7a63317
rm -f src/include/pugixml.hpp \
7a63317
      src/include/pugiconfig.hpp \
7a63317
      src/libutil/pugixml.cpp \
7a63317
7a63317
rm -rf src/include/tbb
7a63317
7a63317
7a63317
%build
7a63317
mkdir -p build
7a63317
pushd build
7a63317
%cmake -DCMAKE_SKIP_RPATH:BOOL=TRUE \
7a63317
       -DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
7a63317
       -DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
7a63317
       -DINSTALL_DOCS:BOOL=OFF \
7a63317
       -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
7a63317
       -DUSE_TBB:BOOL=OFF \
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
7a63317
%postun -p /sbin/ldconfig
7a63317
7a63317
7a63317
%files
7a63317
%defattr(-,root,root,-)
7a63317
%doc CHANGES LICENSE
7a63317
%{_bindir}/*
7a63317
%{_libdir}/libOpenImageIO.so.*
7a63317
%{python_sitearch}/OpenImageIO.so
7a63317
%{_mandir}/man1/*
7a63317
7a63317
%files devel
7a63317
%defattr(-,root,root,-)
7a63317
%doc src/doc/*.pdf
7a63317
%{_libdir}/libOpenImageIO.so
7a63317
%{_includedir}/*
7a63317
7a63317
%changelog
7a63317
* Mon Jul 18 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.0-2
7a63317
- Disabled use of the TBB library.
7a63317
7a63317
* Tue Jul 05 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.0-1
7a63317
- Inital Release.