7a11365
%global githash1 g0b78dec
7a11365
%global githash2 0d48631
3bbc3b7
%global githash3 9bf4356
527c815
7a63317
Name:           OpenImageIO
2f57d9f
Version:        1.1.3
cdf8b4c
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
2f57d9f
#Source0:        https://download.github.com/%{name}-oiio-Release-%{version}-0-%{githash1}.tar.gz
2f57d9f
Source0:        https://download.github.com/oiio-Release-%{version}.tar.gz
3bbc3b7
# Images for test suite
3bbc3b7
#Source1:        %{name}-oiio-images-%{githash3}.tar.gz
3bbc3b7
Source101:      FindTBB.cmake
527c815
2f57d9f
Patch0:         OpenImageIO-1.1.2-use_external_tbb.patch
011445b
Patch2:         OpenImageIO-ppc.patch
c76eba6
# https://github.com/OpenImageIO/oiio/issues/473
c76eba6
Patch3:         OpenImageIO-1.1.3-SHA1_undef_ref.patch
7a63317
2f57d9f
BuildRequires:  cmake txt2man
e4810c4
BuildRequires:  qt4-devel
2f57d9f
BuildRequires:  boost-devel
2f57d9f
BuildRequires:  glew-devel
2f57d9f
BuildRequires:  OpenEXR-devel ilmbase-devel
2f57d9f
BuildRequires:  python2-devel
48e2b68
BuildRequires:  libpng-devel libtiff-devel openjpeg-devel libwebp-devel
2f57d9f
BuildRequires:  zlib-devel
2f57d9f
BuildRequires:  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.
2f57d9f
2f57d9f
2f57d9f
%package utils
2f57d9f
Summary:        Command line utilies for %{name}
2f57d9f
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9f
2f57d9f
%description utils
2f57d9f
Command-line tools to minipulate and get information on images using the
2f57d9f
%{name} library.
2f57d9f
2f57d9f
2f57d9f
%package iv
2f57d9f
Summary:        %{name} based image viewer.
2f57d9f
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9f
2f57d9f
%description iv
2f57d9f
A really nice image viewer, iv, based on %{name} classes (and so will work with
2f57d9f
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
2f57d9f
#setup -q -n %{name}-oiio-%{githash2}
2f57d9f
%setup -q -n oiio-Release-%{version}
464b352
%patch0 -p1 -b .exttbb
2f57d9f
%ifarch ppc ppc64
011445b
%patch2 -p1 -b .ppc
2f57d9f
%endif
c76eba6
%patch3 -p1 -b .sha1
7a63317
3bbc3b7
# Install FindTBB.cmake
3bbc3b7
install %{SOURCE101} src/cmake/modules/
3bbc3b7
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
3bbc3b7
3bbc3b7
# Install test images
3bbc3b7
#rm -rf ../oiio-images && mkdir ../oiio-images && pushd ../oiio-images
3bbc3b7
#tar --strip-components=1 -xzf %{SOURCE1}
7a63317
7a63317
7a63317
%build
3bbc3b7
rm -rf build/linux && mkdir -p build/linux && pushd build/linux
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
3bbc3b7
       ../../src
7a63317
7a63317
make %{?_smp_mflags}
7a63317
7a63317
7a63317
%install
3bbc3b7
pushd build/linux
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
3bbc3b7
#pushd build/linux && make test
527c815
527c815
7a63317
%files
7a63317
%doc CHANGES LICENSE
7a63317
%{_libdir}/libOpenImageIO.so.*
7a63317
%{python_sitearch}/OpenImageIO.so
2f57d9f
2f57d9f
%files utils
2f57d9f
%exclude %{_bindir}/iv
2f57d9f
%{_bindir}/*
2f57d9f
%exclude %{_mandir}/man1/iv.1.gz
2f57d9f
%{_mandir}/man1/*.1.gz
2f57d9f
2f57d9f
%files iv
2f57d9f
%{_bindir}/iv
2f57d9f
%{_mandir}/man1/iv.1.gz
7a63317
7a63317
%files devel
7a63317
%doc src/doc/*.pdf
7a63317
%{_libdir}/libOpenImageIO.so
7a63317
%{_includedir}/*
7a63317
5371afc
7a63317
%changelog
cdf8b4c
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.1.3-2
cdf8b4c
- rebuild due to "jpeg8-ABI" feature drop
cdf8b4c
2f57d9f
* Mon Jan 14 2013 Richard Shaw <hobbes1069@gmail.com> - 1.1.3-1
2f57d9f
- Update to latest upstream release.
2f57d9f
- Separate utilities and library packages.
2f57d9f
e022e03
* Fri Dec 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.9-3
e022e03
- Rebuild, see
e022e03
  http://lists.fedoraproject.org/pipermail/devel/2012-December/175685.html
e022e03
768618c
* Thu Dec 13 2012 Adam Jackson <ajax@redhat.com> - 1.0.9-2
768618c
- Rebuild for glew 1.9.0
768618c
7a11365
* Sat Sep 22 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-1
7a11365
- Update to latest upstream release.
7a11365
ab84acc
* Wed Aug  8 2012 David Malcolm <dmalcolm@redhat.com> - 1.0.8-2
ab84acc
- rebuild against boost-1.50
ab84acc
c957a89
* Wed Aug 01 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.8-1
c957a89
- Update to latest upstream release.
c957a89
93f47c7
* Mon Jul 30 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.7-3
93f47c7
- Rebuild for updated libGLEW.
93f47c7
32db067
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-2
32db067
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
32db067
945f553
* Mon Jul 09 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.7-1
945f553
- Update to latest upstream release.
945f553
3bbc3b7
* Thu Jun 28 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.6-1
3bbc3b7
- Update to latest upstream release.
3bbc3b7
- Fix linking against TBB which broke at some point.
3bbc3b7
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
3bbc3b7
* Tue Apr 24 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.3-1
3bbc3b7
- Update to latest upstream release.
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.