6f938db
%global sover 2.1
7bcd465
7bcd465
Name:           OpenImageIO
71f4aef
Version:        2.1.20.0
71f4aef
Release:        1%{?dist}
7bcd465
Summary:        Library for reading and writing images
7bcd465
3e2816b
# The included fmtlib is MIT licensed
3e2816b
# src/include/OpenImageIO/fmt
24309a5
License:        BSD and MIT
24309a5
7bcd465
URL:            https://sites.google.com/site/openimageio/home
24309a5
7bcd465
Source0:        https://github.com/%{name}/oiio/archive/Release-%{version}/%{name}-%{version}.tar.gz
7bcd465
# Images for test suite
e77166d
#Source1:        https://github.com/OpenImageIO/oiio-images/archive/master/oiio-images.tar.gz
527c815
8fd82b1
Patch0:         oiio-cmake_ver.patch
2881a69
# Needed until LibRaw is available on s390x and aarch64
2881a69
%if 0%{?rhel} >= 8
69d38ce
ExclusiveArch:  x86_64 ppc64le
2881a69
%endif
2881a69
6f938db
# Utilities
f46941f
BuildRequires:  cmake
6f938db
BuildRequires:  gcc-c++
ebab20c
BuildRequires:  txt2man
e77166d
BuildRequires:  /usr/bin/pathfix.py
6f938db
# Libraries
7bcd465
BuildRequires:  boost-devel
7bcd465
BuildRequires:  boost-python3-devel
6f938db
BuildRequires:  bzip2-devel
24309a5
%if ! 0%{?rhel}
77a5c3e
# Not currently in RHEL/EPEL
7bcd465
BuildRequires:  dcmtk-devel
77a5c3e
# https://bugzilla.redhat.com/show_bug.cgi?id=1848116
77a5c3e
BuildRequires:  openvdb-devel
23ba857
%endif
ebab20c
BuildRequires:  Field3D-devel
6f938db
BuildRequires:  fmt-devel
6f938db
BuildRequires:  freetype-devel
6f938db
BuildRequires:  giflib-devel
6f938db
BuildRequires:  glew-devel
ebab20c
BuildRequires:  hdf5-devel
6f938db
BuildRequires:  ilmbase-devel
7bcd465
BuildRequires:  jasper-devel
6f938db
BuildRequires:  libjpeg-turbo-devel
6f938db
BuildRequires:  libpng-devel
7bcd465
BuildRequires:  LibRaw-devel
6f938db
BuildRequires:  libsquish-devel
6f938db
BuildRequires:  libtiff-devel
6f938db
BuildRequires:  libwebp-devel
6f938db
BuildRequires:  opencv-devel
6f938db
BuildRequires:  OpenEXR-devel ilmbase-devel
6f938db
BuildRequires:  openjpeg2-devel
7bcd465
BuildRequires:  openssl-devel
6f938db
BuildRequires:  pugixml-devel
7bcd465
BuildRequires:  pybind11-devel
6f938db
BuildRequires:  python3-devel
6f938db
BuildRequires:  qt5-qtbase-devel
6f938db
BuildRequires:  robin-map-devel
6f938db
BuildRequires:  tbb-devel
6f938db
BuildRequires:  zlib-devel
7bcd465
7bcd465
# WARNING: OpenColorIO and OpenImageIO are cross dependent.
7bcd465
# If an ABI incompatible update is done in one, the other also needs to be
7bcd465
# rebuilt.
1779040
BuildRequires:  OpenColorIO-devel
7bcd465
7bcd465
7bcd465
%description
7bcd465
OpenImageIO is a library for reading and writing images, and a bunch of related
7bcd465
classes, utilities, and applications. Main features include:
7bcd465
- Extremely simple but powerful ImageInput and ImageOutput APIs for reading and
7bcd465
  writing 2D images that is format agnostic.
7bcd465
- Format plugins for TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000,
7bcd465
  DPX, Cineon, FITS, BMP, ICO, RMan Zfile, Softimage PIC, DDS, SGI,
7bcd465
  PNM/PPM/PGM/PBM, Field3d.
7bcd465
- An ImageCache class that transparently manages a cache so that it can access
7bcd465
  truly vast amounts of image data.
7bcd465
7bcd465
7bcd465
%package -n python3-openimageio
7bcd465
Summary:        Python 3 bindings for %{name}
7bcd465
Requires:       %{name}%{?_isa} = %{version}-%{release}
1779040
%{?python_provide:%python_provide python3-openimageio}
7bcd465
7bcd465
%description -n python3-openimageio
7bcd465
Python bindings for %{name}.
7bcd465
7bcd465
7bcd465
%package utils
7bcd465
Summary:        Command line utilities for %{name}
7bcd465
Requires:       %{name}%{?_isa} = %{version}-%{release}
7bcd465
7bcd465
%description utils
7bcd465
Command-line tools to manipulate and get information on images using the
7bcd465
%{name} library.
7bcd465
7bcd465
7bcd465
%package iv
7bcd465
Summary:        %{name} based image viewer
7bcd465
Requires:       %{name}%{?_isa} = %{version}-%{release}
7bcd465
7bcd465
%description iv
7bcd465
A really nice image viewer, iv, based on %{name} classes (and so will work
7bcd465
with any formats for which plugins are available).
7bcd465
7bcd465
7bcd465
%package devel
7bcd465
Summary:        Documentation for %{name}
7bcd465
Requires:       %{name}%{?_isa} = %{version}-%{release}
b5686aa
Requires:       OpenEXR-devel
7bcd465
7bcd465
%description devel
7bcd465
Development files for package %{name}
7bcd465
7bcd465
7bcd465
%prep
7bcd465
%autosetup -p1 -n oiio-Release-%{version}
7bcd465
7bcd465
# Remove bundled pugixml
7bcd465
rm -f src/include/OpenImageIO/pugixml.hpp \
7bcd465
      src/include/OpenImageIO/pugiconfig.hpp \
7bcd465
      src/libutil/OpenImageIO/pugixml.cpp 
7bcd465
7bcd465
# Remove bundled tbb
7bcd465
rm -rf src/include/tbb
7bcd465
7bcd465
# Install test images
e77166d
#mkdir ../oiio-images && pushd ../oiio-images
7bcd465
#tar --strip-components=1 -xzf %{SOURCE1}
e77166d
#popd
7bcd465
7bcd465
7bcd465
%build
f46941f
mkdir -p build/linux && pushd build/linux
7bcd465
# CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes
7bcd465
# CMAKE_INSTALL_RPATH to be cleared, which is the desiered result.
7bcd465
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
7bcd465
       -DCMAKE_SKIP_RPATH:BOOL=TRUE \
7bcd465
       -DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
7bcd465
       -DPYTHON_VERSION=%{python3_version} \
7bcd465
       -DPYLIB_INSTALL_DIR:PATH=%{python3_sitearch} \
7bcd465
       -DBUILD_DOCS:BOOL=TRUE \
7bcd465
       -DINSTALL_DOCS:BOOL=FALSE \
7bcd465
       -DINSTALL_FONTS:BOOL=FALSE \
7bcd465
       -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
7bcd465
       -DUSE_OPENSSL:BOOL=TRUE \
7bcd465
       -DSTOP_ON_WARNING:BOOL=FALSE \
7bcd465
       -DUSE_CPP:STRING=14 \
7bcd465
       -DJPEG_INCLUDE_DIR=%{_includedir} \
7bcd465
       -DOPENJPEG_INCLUDE_DIR=$(pkgconf --variable=includedir libopenjp2) \
7bcd465
       -DOpenGL_GL_PREFERENCE=GLVND \
95eaf21
%if 0%{?rhel}
24309a5
       -DCMAKE_COMPAT=TRUE \
24309a5
%endif
7bcd465
       -DVERBOSE=TRUE \
7bcd465
       ../../
7bcd465
8fd82b1
%cmake_build
7bcd465
7bcd465
7bcd465
%install
7bcd465
pushd build/linux
7bcd465
%make_install
7bcd465
7bcd465
# Move man pages to the right directory
7bcd465
mkdir -p %{buildroot}%{_mandir}/man1
7bcd465
cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
7bcd465
7bcd465
7bcd465
%check
7bcd465
# Not all tests pass on linux
7bcd465
#pushd build/linux && make test
7bcd465
7bcd465
7bcd465
%files
7bcd465
%doc CHANGES.md CREDITS.md README.md
7bcd465
%license LICENSE.md LICENSE-THIRD-PARTY.md
7bcd465
%{_libdir}/libOpenImageIO.so.%{sover}*
7bcd465
%{_libdir}/libOpenImageIO_Util.so.%{sover}*
7bcd465
7bcd465
%files -n python3-openimageio
7bcd465
%{python3_sitearch}/OpenImageIO.so
7bcd465
7bcd465
%files utils
7bcd465
%exclude %{_bindir}/iv
7bcd465
%{_bindir}/*
cabde45
%exclude %{_mandir}/man1/iv.1.gz
2f57d9f
%{_mandir}/man1/*.1.gz
7bcd465
7bcd465
%files iv
7bcd465
%{_bindir}/iv
cabde45
%{_mandir}/man1/iv.1.gz
7bcd465
7bcd465
%files devel
7bcd465
%{_libdir}/libOpenImageIO.so
7bcd465
%{_libdir}/libOpenImageIO_Util.so
6f938db
%{_libdir}/cmake/%{name}/*.cmake
7bcd465
%{_libdir}/pkgconfig/%{name}.pc
7bcd465
%{_datadir}/cmake/Modules/FindOpenImageIO.cmake
7bcd465
%{_includedir}/%{name}/
7bcd465
7bcd465
7bcd465
%changelog
71f4aef
* Fri Nov 27 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.20.0-1
71f4aef
- Update to 2.1.20.0.
71f4aef
871b227
* Thu Jun 04 2020 Nicolas Chauvet <kwizart@gmail.com> - 2.1.16.0-2
871b227
- Rebuilt for OpenCV 4.3
871b227
e77166d
* Tue Jun 02 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.16.0-1
e77166d
- Update to 2.1.16.
e77166d
490d881
* Fri May 29 2020 Jonathan Wakely <jwakely@redhat.com> - 2.1.15.0-4
490d881
- Rebuilt for Boost 1.73
490d881
32df27a
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.1.15.0-3
32df27a
- Rebuilt for Python 3.9
32df27a
3dc9ba1
* Mon May 11 2020 Gwyn Ciesla <gwync@protonmail.com> - 2.1.15.0-2
3dc9ba1
- Rebuild for new LibRaw
3dc9ba1
45b618a
* Mon May 11 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.15.0-1
45b618a
- Update to 2.1.15.0.
45b618a
- Adds support for libRaw 0.20, fixes RHBZ#1833450.
45b618a
1810d17
* Sat May 02 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.14.0-1
1810d17
- Update to 2.1.14.0.
1810d17
a2ed31f
* Sun Apr 12 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.13.0-2
a2ed31f
- Rebuild for funky depdendency problem in Rawhide/33.
a2ed31f
1f5ee8d
* Thu Apr 02 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.13.0-1
1f5ee8d
- Update to 2.1.13.
1f5ee8d
f46941f
* Tue Mar 03 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.12.0-1
f46941f
- Update to 2.1.12.0.
f46941f
61dc53b
* Wed Feb 12 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.11.1-1
61dc53b
- Update to 2.1.11.0.
61dc53b
b175c18
* Tue Jan 28 2020 Nicolas Chauvet <kwizart@gmail.com> - 2.1.10.1-3
b175c18
- Rebuild for OpenCV 4.2
b175c18
59eff55
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.10.1-2
59eff55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
59eff55
6f938db
* Mon Jan 27 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.10.1-1
6f938db
- Update to 2.1.10.1.
6f938db
6f938db
* Fri Jan 03 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.10.0-1
6f938db
- Update to 2.1.10.
6f938db
b2e7999
* Sun Dec 29 2019 Nicolas Chauvet <kwizart@gmail.com> - 2.0.13-2
b2e7999
- Rebuilt for opencv4
b2e7999
a20ceba
* Wed Dec 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.13-1
a20ceba
- Update to 2.0.13.
a20ceba
3e2816b
* Fri Nov 29 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.12-1
3e2816b
- Update to 2.0.12.
3e2816b
- Add proper attribution for bundled fmtlib.
3e2816b
f4ed91c
* Wed Oct 02 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.11-1
f4ed91c
- Update to 2.0.11.
f4ed91c
44a055f
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.10-2
44a055f
- Rebuilt for Python 3.8
0f7931d
bf29134
* Sun Aug 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.10-1
bf29134
- Update to 2.0.10.
bf29134
7bcd465
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-2
7bcd465
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7bcd465
7bcd465
* Fri Jul 05 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.9-1
7bcd465
- Update to 2.0.9.
7bcd465
7bcd465
* Sat May 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.8-1
7bcd465
- Update to 2.0.8.
7bcd465
7bcd465
* Wed Apr 10 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.7-3
7bcd465
- Rebuild for OpenEXR 2.3.0.
7bcd465
7bcd465
* Thu Apr 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.7-2
7bcd465
- Rebuild for OpenColorIO 1.1.1.
7bcd465
7bcd465
* Mon Apr 01 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.7-1
7bcd465
- Update to 2.0.7.
7bcd465
7bcd465
* Mon Mar 18 2019 Orion Poplawski <orion@nwra.com>
7bcd465
- Rebuild for hdf5 1.10.5
7bcd465
7bcd465
* Sun Mar 17 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.6-1
7bcd465
- Update to 2.0.6.
7bcd465
7bcd465
* Thu Mar 14 2019 Mohan Boddu <mboddu@bhujji.com> - 2.0.5-2
7bcd465
- Rebuilt for dcmtk 3.6.4
7bcd465
7bcd465
* Mon Feb 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.5-1
7bcd465
- Update to 2.0.5.
7bcd465
7bcd465
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-3
7bcd465
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7bcd465
7bcd465
* Thu Jan 24 2019 Jonathan Wakely <jwakely@redhat.com> - 2.0.4-2
7bcd465
- Rebuilt for Boost 1.69
7bcd465
7bcd465
* Sun Jan 06 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.4-1
7bcd465
- Update to 2.0.4:
7bcd465
  http://lists.openimageio.org/pipermail/oiio-dev-openimageio.org/2019-January/001391.html
7bcd465
7bcd465
* Sat Dec 08 2018 Richard Shaw <hobbes1069@gmail.com> - 2.0.3-1
7bcd465
- Update to 2.0.3.
7bcd465
7bcd465
* Mon Dec 03 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.17-1
7bcd465
- Update to 1.8.17.
7bcd465
7bcd465
* Fri Nov 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.16-1
7bcd465
- Update to 1.8.16.
7bcd465
7bcd465
* Tue Oct 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.15-1
7bcd465
- Update to 1.8.15.
7bcd465
7bcd465
* Mon Sep 24 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.14-2
7bcd465
- Remove python2 module and replace with python3 module.
7bcd465
7bcd465
* Mon Sep 03 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.14-1
7bcd465
- Update to 1.8.14.
7bcd465
7bcd465
* Wed Jul 18 2018 Simone Caronni <negativo17@gmail.com> - 1.8.12-3
7bcd465
- Rebuild for LibRaw update.
7bcd465
7bcd465
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.12-2
7bcd465
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7bcd465
7bcd465
* Fri Jun 01 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.12-1
7bcd465
- Update to 1.8.12.
7bcd465
7bcd465
* Mon Apr 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.10-1
7bcd465
- Update to 1.8.10.
7bcd465
7bcd465
* Fri Mar 02 2018 Adam Williamson <awilliam@redhat.com> - 1.8.9-2
7bcd465
- Rebuild for opencv 3.4.1
7bcd465
7bcd465
* Thu Mar 01 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.9-1
7bcd465
- Update to 1.8.9
7bcd465
7bcd465
* Fri Feb 23 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.8.8-3
7bcd465
- Rebuild
7bcd465
7bcd465
* Tue Feb 13 2018 Sandro Mani <manisandro@gmail.com> - 1.8.8-2
7bcd465
- Rebuild (giflib)
7bcd465
7bcd465
* Fri Feb 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.8-1
7bcd465
- Update to 1.8.8.
7bcd465
7bcd465
* Thu Jan 18 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-3
7bcd465
- Add openjpeg2 to build dependencies.
7bcd465
- Re-enable dcmtk for 32bit arches.
7bcd465
7bcd465
* Sat Jan 13 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-2
7bcd465
- Rebuild for OpenColorIO 1.1.0.
7bcd465
7bcd465
* Wed Jan 03 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-1
7bcd465
- Update to latest upstream release.
7bcd465
- Disable building with dcmtk until fixed, see:
7bcd465
  https://github.com/OpenImageIO/oiio/issues/1841
7bcd465
7bcd465
* Thu Nov 02 2017 Richard Shaw <hobbes1069@gmail.com> - 1.8.6-1
7bcd465
- Update to latest upstream release.
7bcd465
- Add dcmtk to build to enable DICOM plugin.