054dab
%global subname oiio
054dab
7a6331
Name:           OpenImageIO
38e61c
Version:        1.5.24
ddf880
Release:        4%{?dist}
7a6331
Summary:        Library for reading and writing images
7a6331
7a6331
Group:          Development/Libraries
7a6331
License:        BSD
7a6331
URL:            https://sites.google.com/site/openimageio/home
7a6331
38e61c
Source0:        https://github.com/%{name}/%{subname}/archive/Release-%{version}.tar.gz#/%{name}-%{version}.tar.gz
3bbc3b
# Images for test suite
a0d96e
#Source1:        oiio-images.tar.gz
527c81
ebab20
BuildRequires:  cmake
ebab20
BuildRequires:  txt2man
e4810c
BuildRequires:  qt4-devel
2f57d9
BuildRequires:  boost-devel
2f57d9
BuildRequires:  glew-devel
2f57d9
BuildRequires:  OpenEXR-devel ilmbase-devel
2f57d9
BuildRequires:  python2-devel
92eeec
BuildRequires:  libpng-devel libtiff-devel openjpeg-devel giflib-devel
ebab20
BuildRequires:  libwebp-devel
8612b6
%if ! 0%{?rhel}
ebab20
BuildRequires:  Field3D-devel
ebab20
%endif
8612b6
BuildRequires:  LibRaw-devel
ebab20
BuildRequires:  hdf5-devel
2f57d9
BuildRequires:  zlib-devel
2f57d9
BuildRequires:  jasper-devel
7a6331
BuildRequires:  pugixml-devel
38e61c
BuildRequires:  opencv-devel
92eeec
92eeec
# WARNING: OpenColorIO and OpenImageIO are cross dependent.
92eeec
# If an ABI incompatible update is done in one, the other also needs to be
92eeec
# rebuilt.
7f409d
BuildRequires:  OpenColorIO-devel
7a6331
66ec4f
# We don't want to provide private python extension libs
66ec4f
%{?filter_setup:
66ec4f
%filter_provides_in %{python_sitearch}/.*\.so$ 
66ec4f
%filter_setup
66ec4f
}
66ec4f
7a6331
7a6331
%description
7a6331
OpenImageIO is a library for reading and writing images, and a bunch of related
7a6331
classes, utilities, and applications. Main features include:
7a6331
- Extremely simple but powerful ImageInput and ImageOutput APIs for reading and
7a6331
  writing 2D images that is format agnostic.
7a6331
- Format plugins for TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000,
7a6331
  DPX, Cineon, FITS, BMP, ICO, RMan Zfile, Softimage PIC, DDS, SGI,
7a6331
  PNM/PPM/PGM/PBM, Field3d.
7a6331
- An ImageCache class that transparently manages a cache so that it can access
7a6331
  truly vast amounts of image data.
2f57d9
2f57d9
b9ab72
%package -n python-%{name}
b9ab72
Summary:        Python 2 bindings for %{name}
cf7380
Requires:       %{name}%{?_isa} = %{version}-%{release}
b9ab72
b9ab72
%description -n python-%{name}
b9ab72
Python bindings for %{name}.
b9ab72
b9ab72
2f57d9
%package utils
92eeec
Summary:        Command line utilities for %{name}
cf7380
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9
2f57d9
%description utils
92eeec
Command-line tools to manipulate and get information on images using the
2f57d9
%{name} library.
2f57d9
2f57d9
2f57d9
%package iv
92eeec
Summary:        %{name} based image viewer
cf7380
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9
2f57d9
%description iv
c37941
A really nice image viewer, iv, based on %{name} classes (and so will work
c37941
with any formats for which plugins are available).
7a6331
527c81
7a6331
%package devel
527c81
Summary:        Documentation for %{name}
7a6331
Group:          Development/Libraries
cf7380
Requires:       %{name}%{?_isa} = %{version}-%{release}
7a6331
7a6331
%description devel
7a6331
Development files for package %{name}
7a6331
7a6331
7a6331
%prep
ddf880
%autosetup -n oiio-Release-%{version}
3bbc3b
7a6331
# Remove bundled pugixml
7a6331
rm -f src/include/pugixml.hpp \
7a6331
      src/include/pugiconfig.hpp \
5371af
      src/libutil/pugixml.cpp 
527c81
1a39c4
# Remove bundled tbb
7a6331
rm -rf src/include/tbb
3bbc3b
3bbc3b
# Install test images
3bbc3b
#rm -rf ../oiio-images && mkdir ../oiio-images && pushd ../oiio-images
3bbc3b
#tar --strip-components=1 -xzf %{SOURCE1}
7a6331
7a6331
7a6331
%build
3bbc3b
rm -rf build/linux && mkdir -p build/linux && pushd build/linux
527c81
# CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes
527c81
# CMAKE_INSTALL_RPATH to be cleared, which is the desiered result.
fdddaa
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
fdddaa
       -DCMAKE_SKIP_RPATH:BOOL=TRUE \
7a6331
       -DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
7a6331
       -DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
527c81
       -DINSTALL_DOCS:BOOL=FALSE \
7a6331
       -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
5d225e
%ifarch ppc ppc64
8dcfcd
       -DNOTHREADS:BOOL=FALSE \
f84394
%endif
39a295
       -DVERBOSE=TRUE \
92eeec
       ../../
7a6331
7a6331
make %{?_smp_mflags}
7a6331
7a6331
7a6331
%install
3bbc3b
pushd build/linux
7a6331
make DESTDIR=%{buildroot} install
7a6331
7a6331
# Move man pages to the right directory
7a6331
mkdir -p %{buildroot}%{_mandir}/man1
92eeec
cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
7a6331
7a6331
7a6331
%post -p /sbin/ldconfig
7a6331
%postun -p /sbin/ldconfig
7a6331
7a6331
527c81
%check
5d225e
# Not all tests pass on linux
3bbc3b
#pushd build/linux && make test
527c81
527c81
7a6331
%files
fd7f92
%license LICENSE
7099dd
%doc CHANGES
7a6331
%{_libdir}/libOpenImageIO.so.*
054dab
%{_libdir}/libOpenImageIO_Util.so.*
b9ab72
b9ab72
%files -n python-%{name}
7a6331
%{python_sitearch}/OpenImageIO.so
2f57d9
2f57d9
%files utils
2f57d9
%exclude %{_bindir}/iv
2f57d9
%{_bindir}/*
2f57d9
%exclude %{_mandir}/man1/iv.1.gz
2f57d9
%{_mandir}/man1/*.1.gz
2f57d9
2f57d9
%files iv
2f57d9
%{_bindir}/iv
2f57d9
%{_mandir}/man1/iv.1.gz
7a6331
7a6331
%files devel
7a6331
%doc src/doc/*.pdf
7a6331
%{_libdir}/libOpenImageIO.so
054dab
%{_libdir}/libOpenImageIO_Util.so
7a6331
%{_includedir}/*
7a6331
5371af
7a6331
%changelog
ddf880
* Wed Jan 24 2018 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-4
ddf880
- Add webp and LibRaw to build requirements and revert scm to current release
ddf880
  after failed downgrade attempt.
ddf880
38e61c
* Mon Oct 03 2016 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-3
38e61c
- Rebuild for pugixml with c++11 enabled.
38e61c
38e61c
* Sun Jul  3 2016 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-2
38e61c
- Rebuild for updated Field3D which broke due to soname bump, fixes BZ#1352267.
38e61c
38e61c
* Thu Mar  3 2016 Richard Shaw <hobbes1069@gmail.com> - 1.5.24-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Thu Dec 17 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.22-1
38e61c
- Update to latest upstream release.
38e61c
- Add LibRaw to build requirements.
38e61c
38e61c
* Wed Dec  2 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.21-1
38e61c
- Update to latest upstream release.
38e61c
- Move python bindings to their own subpackage.
38e61c
38e61c
* Thu Oct 22 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.20-2
38e61c
- Rebuild for updated pugixml.
38e61c
38e61c
* Mon Sep 28 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.20-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.5.18-3
38e61c
- Rebuilt for Boost 1.59
38e61c
38e61c
* Wed Aug 05 2015 Jonathan Wakely <jwakely@redhat.com> 1.5.18-2
38e61c
- Rebuilt for Boost 1.58
38e61c
38e61c
* Tue Aug  4 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.18-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.17-3
38e61c
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
38e61c
38e61c
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 1.5.17-2
38e61c
- rebuild for Boost 1.58
38e61c
38e61c
* Thu Jul 16 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.17-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.14-4
38e61c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
38e61c
38e61c
* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 1.5.14-3
38e61c
- Rebuild for hdf5 1.8.15
38e61c
38e61c
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.5.14-2
38e61c
- Rebuilt for GCC 5 C++11 ABI change
38e61c
38e61c
* Wed Apr 15 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.14-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Wed Mar 11 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.13-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Sat Feb 21 2015 Orion Poplawski <orion@cora.nwra.com> - 1.5.12-3
38e61c
- Rebuild for undefined symbols
38e61c
38e61c
* Thu Feb 12 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.12-2
38e61c
- Update to latest upstream release.
38e61c
- Add opencv optional dependency.
38e61c
- Use new license rpmbuild macro.
38e61c
- Fix broken conditional which prevented Field3D from being required.
38e61c
38e61c
* Wed Feb 11 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.11-3
38e61c
- Rebuild for Field3D.
38e61c
38e61c
* Wed Feb 04 2015 Petr Machata <pmachata@redhat.com> - 1.5.11-2
38e61c
- Bump for rebuild.
38e61c
38e61c
* Wed Jan 28 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.11-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Tue Jan 27 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.10-1
38e61c
- Update to latest upstream release.
38e61c
38e61c
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.4.16-2
38e61c
- Rebuild for boost 1.57.0
38e61c
9e5834
* Thu Jan 22 2015 Richard Shaw <hobbes1069@gmail.com> - 1.4.16-1
9e5834
- Update to latest upstream release.
9e5834
Rex Dieter 2d1578
* Wed Nov 26 2014 Rex Dieter <rdieter@fedoraproject.org> 1.4.15-2
Rex Dieter 2d1578
- rebuild (openexr)
Rex Dieter 2d1578
a476e3
* Tue Nov 25 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.15-1
a476e3
- Update to latest upstream release.
a476e3
c37941
* Fri Nov 14 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.14-1
c37941
- Update to latest upstream release.
c37941
dd68cd
* Fri Sep  5 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-4
dd68cd
- Rebuild for Field3D 1.4.3.
dd68cd
Orion Poplawski 338ba8
* Thu Sep 04 2014 Orion Poplawski <orion@cora.nwra.com> - 1.4.12-3
Orion Poplawski 338ba8
- Rebuild for pugixml 1.4
Orion Poplawski 338ba8
dc67a3
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.12-2
dc67a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
dc67a3
8dcfcd
* Fri Aug  1 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-1
8dcfcd
- Update to latest upstream release.
8dcfcd
c0f199
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-4
c0f199
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c0f199
Petr Machata ce55f9
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.4.7-3
Petr Machata ce55f9
- Rebuild for boost 1.55.0
Petr Machata ce55f9
ff65de
* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 1.4.7-2
ff65de
- rebuild for boost 1.55.0
ff65de
054dab
* Mon May 19 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.7-1
200d53
>>>>>>> master
054dab
- Update to latest upstream release.
054dab
92eeec
* Tue Jan  7 2014 Richard Shaw <hobbes1069@gmail.com> - 1.3.10-1
92eeec
- Update to latest upstream release.
92eeec
- Add libgif as build requirement.
92eeec
Rex Dieter a0c1f5
* Wed Nov 27 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.2.3-3
Rex Dieter a0c1f5
- rebuild (openexr)
Rex Dieter a0c1f5
c82996
* Mon Nov 18 2013 Dave Airlie <airlied@redhat.com> - 1.2.3-2
c82996
- rebuilt for GLEW 1.10
c82996
ebab20
* Wed Nov  6 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.3-1
ebab20
- Update to latest upstream release.
ebab20
- Fix ppc builds (BZ#1021977).
ebab20
- Add conditionals to build requirements for EPEL 6.
ebab20
ebab20
* Wed Oct  2 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.2-1
ebab20
- Update to latest upstream release.
ebab20
Rex Dieter d70c6b
* Sun Sep 08 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-2
Rex Dieter d70c6b
- rebuild (ilmbase/openexr)
Rex Dieter d70c6b
8b5f5d
* Thu Aug  8 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.1-1
8b5f5d
- Update to latest upstream release.
8b5f5d
4a3ef2
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
4a3ef2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4a3ef2
Petr Machata 55ccc4
* Sun Jul 28 2013 Petr Machata <pmachata@redhat.com> - 1.2.0-2
Petr Machata 55ccc4
- Rebuild for boost 1.54.0