Blob Blame History Raw
%global subname oiio
#global beta beta1

Name:           OpenImageIO
Version:        1.8.6
Release:        1%{?dist}
Summary:        Library for reading and writing images

Group:          Development/Libraries
License:        BSD
URL:            https://sites.google.com/site/openimageio/home

Source0:        https://github.com/%{name}/%{subname}/archive/Release-%{version}.tar.gz#/%{name}-%{version}.tar.gz
# Images for test suite
#Source1:        oiio-images.tar.gz

Patch0:         OpenImageIO-man.patch
Patch1:         OpenImageIO-uninit.patch
Patch2:         OpenImageIO-as_needed.patch

BuildRequires:  cmake gcc-c++
BuildRequires:  txt2man
BuildRequires:  qt4-devel
%if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires:  boost148-devel
%else
BuildRequires:  boost-devel
%endif
BuildRequires:  glew-devel
BuildRequires:  OpenEXR-devel ilmbase-devel
BuildRequires:  python2-devel
BuildRequires:  libpng-devel libtiff-devel libjpeg-turbo-devel giflib-devel
%if ! 0%{?rhel}
BuildRequires:  libwebp-devel
BuildRequires:  Field3D-devel
%endif
BuildRequires:  hdf5-devel
BuildRequires:  zlib-devel
BuildRequires:  jasper-devel
BuildRequires:  pugixml-devel
BuildRequires:  opencv-devel
BuildRequires:  LibRaw-devel
BuildRequires:  openssl-devel

# WARNING: OpenColorIO and OpenImageIO are cross dependent.
# If an ABI incompatible update is done in one, the other also needs to be
# rebuilt.
BuildRequires:  OpenColorIO-devel

# We don't want to provide private python extension libs
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$ 
%filter_setup
}


%description
OpenImageIO is a library for reading and writing images, and a bunch of related
classes, utilities, and applications. Main features include:
- Extremely simple but powerful ImageInput and ImageOutput APIs for reading and
  writing 2D images that is format agnostic.
- Format plugins for TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000,
  DPX, Cineon, FITS, BMP, ICO, RMan Zfile, Softimage PIC, DDS, SGI,
  PNM/PPM/PGM/PBM, Field3d.
- An ImageCache class that transparently manages a cache so that it can access
  truly vast amounts of image data.


%package -n python2-openimageio
%{?python_provide:%python_provide python2-openimageio}
Summary:        Python 2 bindings for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description -n python2-openimageio
Python bindings for %{name}.


%package utils
Summary:        Command line utilities for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description utils
Command-line tools to manipulate and get information on images using the
%{name} library.


%package iv
Summary:        %{name} based image viewer
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description iv
A really nice image viewer, iv, based on %{name} classes (and so will work
with any formats for which plugins are available).


%package devel
Summary:        Documentation for %{name}
Group:          Development/Libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
Development files for package %{name}


%prep
%autosetup -p1 -n oiio-Release-%{version}

# Remove bundled pugixml
rm -f src/include/OpenImageIO/pugixml.hpp \
      src/include/OpenImageIO/pugiconfig.hpp \
      src/libutil/OpenImageIO/pugixml.cpp 

# Remove bundled tbb
rm -rf src/include/tbb

# Install test images
#rm -rf ../oiio-images && mkdir ../oiio-images && pushd ../oiio-images
#tar --strip-components=1 -xzf %{SOURCE1}

# Do not override -std= !!!
sed -i \
-e 's,^\([ ]\+add_definitions.*-std=c++1.*\)$,# \1,' \
CMakeLists.txt

%build
rm -rf build/linux && mkdir -p build/linux && pushd build/linux
# CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes
# CMAKE_INSTALL_RPATH to be cleared, which is the desiered result.
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
       -DCMAKE_SKIP_RPATH:BOOL=TRUE \
       -DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
       -DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
       -DINSTALL_DOCS:BOOL=FALSE \
       -DINSTALL_FONTS:BOOL=FALSE \
       -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
       -DUSE_OPENSSL:BOOL=TRUE \
       -DSTOP_ON_WARNING:BOOL=FALSE \
%if 0%{?fedora} >= 26
       -DUSE_CPP14:BOOL=TRUE \
%endif
%ifarch ppc ppc64
       -DNOTHREADS:BOOL=FALSE \
%endif
%if 0%{?rhel} && 0%{?rhel} < 7
       -DBOOST_INCLUDEDIR=%{_includedir}/boost148 \
       -DBOOST_LIBRARYDIR=%{_libdir}/boost148 \
%endif
       -DVERBOSE=TRUE \
       ../../

make %{?_smp_mflags}


%install
pushd build/linux
make DESTDIR=%{buildroot} install

# Move man pages to the right directory
mkdir -p %{buildroot}%{_mandir}/man1
cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%check
# Not all tests pass on linux
#pushd build/linux && make test


%files
%license LICENSE
%doc CHANGES.md README.md
%{_libdir}/libOpenImageIO.so.*
%{_libdir}/libOpenImageIO_Util.so.*

%files -n python2-openimageio
%{python_sitearch}/OpenImageIO.so

%files utils
%exclude %{_bindir}/iv
%{_bindir}/*
%exclude %{_mandir}/man1/iv.1.gz
%{_mandir}/man1/*.1.gz

%files iv
%{_bindir}/iv
%{_mandir}/man1/iv.1.gz

%files devel
%doc src/doc/*.pdf
%{_libdir}/libOpenImageIO.so
%{_libdir}/libOpenImageIO_Util.so
%{_includedir}/*


%changelog
* Thu Nov 02 2017 Richard Shaw <hobbes1069@gmail.com> - 1.8.6-1
- Update to latest upstream release.

* Mon Sep 04 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.17-2
- Add patch to remove opencv qt5 dependency.

* Sat Sep 02 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.17-1
- Update to latest upstream release.

* Sat Aug 19 2017 Zbigniew J─Ödrzejewski-Szmek <zbyszek@in.waw.pl> - 1.7.15-6
- Python 2 binary package renamed to python2-openimageio
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.15-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.15-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Jul 21 2017 Kalev Lember <klember@redhat.com> - 1.7.15-3
- Rebuilt for Boost 1.64

* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.7.15-2
- Rebuild due to bug in RPM (RHBZ #1468476)

* Thu Jun 01 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.15-1
- Update to latest upstream relesae.

* Mon May  1 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.14-1
- Update to latest upstream release.

* Mon Apr  3 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.13-1
- Update to latest upstream release.

* Sat Mar 04 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.12-1
- Update to latest upstream release.

* Sun Feb 19 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.11-1
- Update to latest upstream release.
- Add patch per RHBZ#1412089 to prevent pulling in Qt5.

* Sun Feb 19 2017 Ralf Cors├ępius <corsepiu@fedoraproject.org> - 1.7.10-5
- Disable -Werror (Fix F26FTBFS, RHBZ#1424580).
- Force USE_CPP14 on fedora >=26.
- Prevent CMakeList.txt from overiding -std=...

* Fri Feb 17 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.10-4
- Rebuild for boost 1.63

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 01 2017 Sandro Mani <manisandro@gmail.com> - 1.7.10-2
- Rebuild (libwebp)

* Mon Jan  2 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.10-1
- Update to latest upstream release.
- Fixes FTBFS on aarch64 (BZ#1408883).

* Tue Dec 27 2016 Jon Ciesla <limburgher@gmail.com> - 1.7.9-2
- Rebuild for new LibRaw.

* Thu Dec  1 2016 Richard Shaw <hobbes1069@gmail.com> - 1.7.9-1
- Update to latest upstream release.

* Sun Oct  2 2016 Richard Shaw <hobbes1069@gmail.com> - 1.7.7-1
- Update to latest upstream release.

* Tue Aug  2 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.16-1
- Update to latest upstream release.

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.15-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Jul  1 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.15-1
- Update to latest upstream release.

* Wed Jun  1 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.14-1
- Update to latest upstream release.

* Sun May  1 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.13-1
- Update to latest upstream release.
- Change from openjpeg to libjpeg-turbo.

* Tue Apr 26 2016 Orion Poplawski <orion@cora.nwra.com> - 1.6.12-3
- Rebuild for OpenCV 3.1

* Mon Apr 11 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.12-2
- Rebuild for updated Field3D.

* Fri Apr  1 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.12-1
- Update to latest upstream release.

* Tue Mar  1 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.11-1
- Update to latest upstream release.

* Wed Feb  3 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.10-1
- Update to latest upstream release.

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jan 21 2016 Orion Poplawski <orion@cora.nwra.com> - 1.6.9-3
- Rebuild for hdf5 1.8.16

* Thu Jan 14 2016 Adam Jackson <ajax@redhat.com> - 1.6.9-2
- Rebuild for glew 1.13

* Wed Jan  6 2016 Richard Shaw <hobbes1069@gmail.com> - 1.6.9-1
- Update to latest upstream release.

* Mon Dec 28 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.6.8-2
- Rebuilt for libwebp soname bump
- Use openssl, fixes BZ#1294602.

* Wed Dec 23 2015 Richard Shaw <hobbes1069@gmail.com> - 1.6.8-1
- Update to latest upstream release.
- Use openssl, fixes BZ#1294602.

* Thu Dec 17 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.22-1
- Update to latest upstream release.
- Add LibRaw to build requirements.

* Wed Dec  2 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.21-1
- Update to latest upstream release.
- Move python bindings to their own subpackage.

* Thu Oct 22 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.20-2
- Rebuild for updated pugixml.

* Mon Sep 28 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.20-1
- Update to latest upstream release.

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.5.18-3
- Rebuilt for Boost 1.59

* Wed Aug 05 2015 Jonathan Wakely <jwakely@redhat.com> 1.5.18-2
- Rebuilt for Boost 1.58

* Tue Aug  4 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.18-1
- Update to latest upstream release.

* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.17-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159

* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 1.5.17-2
- rebuild for Boost 1.58

* Thu Jul 16 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.17-1
- Update to latest upstream release.

* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 1.5.14-3
- Rebuild for hdf5 1.8.15

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.5.14-2
- Rebuilt for GCC 5 C++11 ABI change

* Wed Apr 15 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.14-1
- Update to latest upstream release.

* Wed Mar 11 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.13-1
- Update to latest upstream release.

* Sat Feb 21 2015 Orion Poplawski <orion@cora.nwra.com> - 1.5.12-3
- Rebuild for undefined symbols

* Thu Feb 12 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.12-2
- Update to latest upstream release.
- Add opencv optional dependency.
- Use new license rpmbuild macro.
- Fix broken conditional which prevented Field3D from being required.

* Wed Feb 11 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.11-3
- Rebuild for Field3D.

* Wed Feb 04 2015 Petr Machata <pmachata@redhat.com> - 1.5.11-2
- Bump for rebuild.

* Wed Jan 28 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.11-1
- Update to latest upstream release.

* Tue Jan 27 2015 Richard Shaw <hobbes1069@gmail.com> - 1.5.10-1
- Update to latest upstream release.

* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.4.16-2
- Rebuild for boost 1.57.0

* Thu Jan 22 2015 Richard Shaw <hobbes1069@gmail.com> - 1.4.16-1
- Update to latest upstream release.

* Wed Nov 26 2014 Rex Dieter <rdieter@fedoraproject.org> 1.4.15-2
- rebuild (openexr)

* Tue Nov 25 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.15-1
- Update to latest upstream release.

* Fri Nov 14 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.14-1
- Update to latest upstream release.

* Fri Sep  5 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-4
- Rebuild for Field3D 1.4.3.

* Thu Sep 04 2014 Orion Poplawski <orion@cora.nwra.com> - 1.4.12-3
- Rebuild for pugixml 1.4

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Fri Aug  1 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-1
- Update to latest upstream release.

* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.4.7-3
- Rebuild for boost 1.55.0

* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 1.4.7-2
- rebuild for boost 1.55.0

* Mon May 19 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.7-1
- Update to latest upstream release.

* Tue Jan  7 2014 Richard Shaw <hobbes1069@gmail.com> - 1.3.10-1
- Update to latest upstream release.
- Add libgif as build requirement.

* Wed Nov 27 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.2.3-3
- rebuild (openexr)

* Mon Nov 18 2013 Dave Airlie <airlied@redhat.com> - 1.2.3-2
- rebuilt for GLEW 1.10

* Wed Nov  6 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.3-1
- Update to latest upstream release.
- Fix ppc builds (BZ#1021977).
- Add conditionals to build requirements for EPEL 6.

* Wed Oct  2 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.2-1
- Update to latest upstream release.

* Sun Sep 08 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-2
- rebuild (ilmbase/openexr)

* Thu Aug  8 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.1-1
- Update to latest upstream release.

* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Jul 28 2013 Petr Machata <pmachata@redhat.com> - 1.2.0-2
- Rebuild for boost 1.54.0