054dab7
%global subname oiio
054dab7
7a63317
Name:           OpenImageIO
38e61ce
Version:        1.5.24
ddf8803
Release:        4%{?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
38e61ce
Source0:        https://github.com/%{name}/%{subname}/archive/Release-%{version}.tar.gz#/%{name}-%{version}.tar.gz
3bbc3b7
# Images for test suite
a0d96ee
#Source1:        oiio-images.tar.gz
527c815
ebab20c
BuildRequires:  cmake
ebab20c
BuildRequires:  txt2man
e4810c4
BuildRequires:  qt4-devel
2f57d9f
BuildRequires:  boost-devel
2f57d9f
BuildRequires:  glew-devel
2f57d9f
BuildRequires:  OpenEXR-devel ilmbase-devel
2f57d9f
BuildRequires:  python2-devel
92eeec4
BuildRequires:  libpng-devel libtiff-devel openjpeg-devel giflib-devel
ebab20c
BuildRequires:  libwebp-devel
8612b67
%if ! 0%{?rhel}
ebab20c
BuildRequires:  Field3D-devel
ebab20c
%endif
8612b67
BuildRequires:  LibRaw-devel
ebab20c
BuildRequires:  hdf5-devel
2f57d9f
BuildRequires:  zlib-devel
2f57d9f
BuildRequires:  jasper-devel
7a63317
BuildRequires:  pugixml-devel
38e61ce
BuildRequires:  opencv-devel
92eeec4
92eeec4
# WARNING: OpenColorIO and OpenImageIO are cross dependent.
92eeec4
# If an ABI incompatible update is done in one, the other also needs to be
92eeec4
# rebuilt.
7f409d3
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
b9ab72a
%package -n python-%{name}
b9ab72a
Summary:        Python 2 bindings for %{name}
cf73807
Requires:       %{name}%{?_isa} = %{version}-%{release}
b9ab72a
b9ab72a
%description -n python-%{name}
b9ab72a
Python bindings for %{name}.
b9ab72a
b9ab72a
2f57d9f
%package utils
92eeec4
Summary:        Command line utilities for %{name}
cf73807
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9f
2f57d9f
%description utils
92eeec4
Command-line tools to manipulate and get information on images using the
2f57d9f
%{name} library.
2f57d9f
2f57d9f
2f57d9f
%package iv
92eeec4
Summary:        %{name} based image viewer
cf73807
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9f
2f57d9f
%description iv
c37941e
A really nice image viewer, iv, based on %{name} classes (and so will work
c37941e
with any formats for which plugins are available).
7a63317
527c815
7a63317
%package devel
527c815
Summary:        Documentation for %{name}
7a63317
Group:          Development/Libraries
cf73807
Requires:       %{name}%{?_isa} = %{version}-%{release}
7a63317
7a63317
%description devel
7a63317
Development files for package %{name}
7a63317
7a63317
7a63317
%prep
ddf8803
%autosetup -n oiio-Release-%{version}
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 \
5d225ec
%ifarch ppc ppc64
8dcfcd4
       -DNOTHREADS:BOOL=FALSE \
f84394c
%endif
39a295a
       -DVERBOSE=TRUE \
92eeec4
       ../../
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
92eeec4
cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
7a63317
7a63317
7a63317
%post -p /sbin/ldconfig
7a63317
%postun -p /sbin/ldconfig
7a63317
7a63317
527c815
%check
5d225ec
# Not all tests pass on linux
3bbc3b7
#pushd build/linux && make test
527c815
527c815
7a63317
%files
fd7f923
%license LICENSE
7099ddd
%doc CHANGES
7a63317
%{_libdir}/libOpenImageIO.so.*
054dab7
%{_libdir}/libOpenImageIO_Util.so.*
b9ab72a
b9ab72a
%files -n python-%{name}
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
054dab7
%{_libdir}/libOpenImageIO_Util.so
7a63317
%{_includedir}/*
7a63317
5371afc
7a63317
%changelog
ddf8803
* Wed Jan 24 2018 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-4
ddf8803
- Add webp and LibRaw to build requirements and revert scm to current release
ddf8803
  after failed downgrade attempt.
ddf8803
38e61ce
* Mon Oct 03 2016 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-3
38e61ce
- Rebuild for pugixml with c++11 enabled.
38e61ce
38e61ce
* Sun Jul  3 2016 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-2
38e61ce
- Rebuild for updated Field3D which broke due to soname bump, fixes BZ#1352267.
38e61ce
38e61ce
* Thu Mar  3 2016 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Thu Dec 17 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.22-1
38e61ce
- Update to latest upstream release.
38e61ce
- Add LibRaw to build requirements.
38e61ce
38e61ce
* Wed Dec  2 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.21-1
38e61ce
- Update to latest upstream release.
38e61ce
- Move python bindings to their own subpackage.
38e61ce
38e61ce
* Thu Oct 22 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.20-2
38e61ce
- Rebuild for updated pugixml.
38e61ce
38e61ce
* Mon Sep 28 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.20-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.5.18-3
38e61ce
- Rebuilt for Boost 1.59
38e61ce
38e61ce
* Wed Aug 05 2015 Jonathan Wakely <jwakely@redhat.com> 1.5.18-2
38e61ce
- Rebuilt for Boost 1.58
38e61ce
38e61ce
* Tue Aug  4 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.18-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.17-3
38e61ce
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
38e61ce
38e61ce
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 1.5.17-2
38e61ce
- rebuild for Boost 1.58
38e61ce
38e61ce
* Thu Jul 16 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.17-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.14-4
38e61ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
38e61ce
38e61ce
* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 1.5.14-3
38e61ce
- Rebuild for hdf5 1.8.15
38e61ce
38e61ce
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.5.14-2
38e61ce
- Rebuilt for GCC 5 C++11 ABI change
38e61ce
38e61ce
* Wed Apr 15 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.14-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Wed Mar 11 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.13-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Sat Feb 21 2015 Orion Poplawski <orion@cora.nwra.com> - 1.5.12-3
38e61ce
- Rebuild for undefined symbols
38e61ce
38e61ce
* Thu Feb 12 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.12-2
38e61ce
- Update to latest upstream release.
38e61ce
- Add opencv optional dependency.
38e61ce
- Use new license rpmbuild macro.
38e61ce
- Fix broken conditional which prevented Field3D from being required.
38e61ce
38e61ce
* Wed Feb 11 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.11-3
38e61ce
- Rebuild for Field3D.
38e61ce
38e61ce
* Wed Feb 04 2015 Petr Machata <pmachata@redhat.com> - 1.5.11-2
38e61ce
- Bump for rebuild.
38e61ce
38e61ce
* Wed Jan 28 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.11-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Tue Jan 27 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.10-1
38e61ce
- Update to latest upstream release.
38e61ce
38e61ce
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.4.16-2
38e61ce
- Rebuild for boost 1.57.0
38e61ce
9e58345
* Thu Jan 22 2015 Richard Shaw <hobbes1069@gmail.com> - 1.4.16-1
9e58345
- Update to latest upstream release.
9e58345
Rex Dieter 2d1578a
* Wed Nov 26 2014 Rex Dieter <rdieter@fedoraproject.org> 1.4.15-2
Rex Dieter 2d1578a
- rebuild (openexr)
Rex Dieter 2d1578a
a476e32
* Tue Nov 25 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.15-1
a476e32
- Update to latest upstream release.
a476e32
c37941e
* Fri Nov 14 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.14-1
c37941e
- Update to latest upstream release.
c37941e
dd68cd1
* Fri Sep  5 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-4
dd68cd1
- Rebuild for Field3D 1.4.3.
dd68cd1
Orion Poplawski 338ba88
* Thu Sep 04 2014 Orion Poplawski <orion@cora.nwra.com> - 1.4.12-3
Orion Poplawski 338ba88
- Rebuild for pugixml 1.4
Orion Poplawski 338ba88
dc67a32
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.12-2
dc67a32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
dc67a32
8dcfcd4
* Fri Aug  1 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-1
8dcfcd4
- Update to latest upstream release.
8dcfcd4
c0f199b
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-4
c0f199b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c0f199b
Petr Machata ce55f90
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.4.7-3
Petr Machata ce55f90
- Rebuild for boost 1.55.0
Petr Machata ce55f90
ff65deb
* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 1.4.7-2
ff65deb
- rebuild for boost 1.55.0
ff65deb
054dab7
* Mon May 19 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.7-1
200d533
>>>>>>> master
054dab7
- Update to latest upstream release.
054dab7
92eeec4
* Tue Jan  7 2014 Richard Shaw <hobbes1069@gmail.com> - 1.3.10-1
92eeec4
- Update to latest upstream release.
92eeec4
- Add libgif as build requirement.
92eeec4
Rex Dieter a0c1f52
* Wed Nov 27 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.2.3-3
Rex Dieter a0c1f52
- rebuild (openexr)
Rex Dieter a0c1f52
c82996b
* Mon Nov 18 2013 Dave Airlie <airlied@redhat.com> - 1.2.3-2
c82996b
- rebuilt for GLEW 1.10
c82996b
ebab20c
* Wed Nov  6 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.3-1
ebab20c
- Update to latest upstream release.
ebab20c
- Fix ppc builds (BZ#1021977).
ebab20c
- Add conditionals to build requirements for EPEL 6.
ebab20c
ebab20c
* Wed Oct  2 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.2-1
ebab20c
- Update to latest upstream release.
ebab20c
Rex Dieter d70c6b3
* Sun Sep 08 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-2
Rex Dieter d70c6b3
- rebuild (ilmbase/openexr)
Rex Dieter d70c6b3
8b5f5d6
* Thu Aug  8 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.1-1
8b5f5d6
- Update to latest upstream release.
8b5f5d6
4a3ef26
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
4a3ef26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4a3ef26
Petr Machata 55ccc44
* Sun Jul 28 2013 Petr Machata <pmachata@redhat.com> - 1.2.0-2
Petr Machata 55ccc44
- Rebuild for boost 1.54.0