8f2936b
%undefine __cmake_in_source_build
21cd2f8
%global sover 2.2
90e880c
7a63317
Name:           OpenImageIO
b194f07
Version:        2.2.8.0
21cd2f8
Release:        1%{?dist}
7a63317
Summary:        Library for reading and writing images
7a63317
3e2816b
License:        BSD and MIT
3e2816b
# The included fmtlib is MIT licensed
3e2816b
# src/include/OpenImageIO/fmt
7a63317
URL:            https://sites.google.com/site/openimageio/home
22a6838
Source0:        https://github.com/%{name}/oiio/archive/Release-%{version}/%{name}-%{version}.tar.gz
3bbc3b7
# Images for test suite
e77166d
#Source1:        https://github.com/OpenImageIO/oiio-images/archive/master/oiio-images.tar.gz
527c815
eedfe36
# Needed until LibRaw is available on s390x and aarch64
eedfe36
%if 0%{?rhel} >= 8
eedfe36
ExclusiveArch:  x86_64 ppc64le
eedfe36
%endif
eedfe36
6f938db
# Utilities
f46941f
BuildRequires:  cmake
6f938db
BuildRequires:  gcc-c++
ebab20c
BuildRequires:  txt2man
e77166d
BuildRequires:  /usr/bin/pathfix.py
6f938db
# Libraries
9a21561
BuildRequires:  boost-devel
1deb182
BuildRequires:  boost-python3-devel
6f938db
BuildRequires:  bzip2-devel
eedfe36
# Not currently in RHEL/EPEL
eedfe36
%if ! 0%{?rhel}
6f938db
BuildRequires:  dcmtk-devel
eedfe36
%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
2f57d9f
BuildRequires:  jasper-devel
6f938db
BuildRequires:  libjpeg-turbo-devel
6f938db
BuildRequires:  libpng-devel
3392bf1
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
f1580b7
BuildRequires:  openssl-devel
6f938db
BuildRequires:  openvdb-devel
6f938db
BuildRequires:  pugixml-devel
94795ee
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
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.
b8cbdd9
BuildRequires:  OpenColorIO-devel
7a63317
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
1deb182
%package -n python3-openimageio
1deb182
Summary:        Python 3 bindings for %{name}
b9ab72a
Requires:       %{name}%{?_isa} = %{version}-%{release}
61dc53b
%{?python_provide:%python_provide python3-openimageio}
b9ab72a
1deb182
%description -n python3-openimageio
b9ab72a
Python bindings for %{name}.
b9ab72a
b9ab72a
2f57d9f
%package utils
92eeec4
Summary:        Command line utilities for %{name}
2f57d9f
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
2f57d9f
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
Requires:       %{name}%{?_isa} = %{version}-%{release}
b5686aa
Requires:       OpenEXR-devel
324d598
Requires:       opencv-devel
7a63317
7a63317
%description devel
7a63317
Development files for package %{name}
7a63317
7a63317
7a63317
%prep
79e7f98
%autosetup -p1 -n oiio-Release-%{version}
3bbc3b7
7a63317
# Remove bundled pugixml
e5a7404
rm -f src/include/OpenImageIO/pugixml.hpp \
e5a7404
      src/include/OpenImageIO/pugiconfig.hpp \
e5a7404
      src/libutil/OpenImageIO/pugixml.cpp 
527c815
1a39c4a
# Remove bundled tbb
7a63317
rm -rf src/include/tbb
3bbc3b7
3bbc3b7
# Install test images
e77166d
#mkdir ../oiio-images && pushd ../oiio-images
3bbc3b7
#tar --strip-components=1 -xzf %{SOURCE1}
e77166d
#popd
7a63317
7a63317
7a63317
%build
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.
8f2936b
mkdir build/linux && pushd build/linux
fdddaa9
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
fdddaa9
       -DCMAKE_SKIP_RPATH:BOOL=TRUE \
1deb182
       -DPYTHON_VERSION=%{python3_version} \
85af7b2
       -DBUILD_DOCS:BOOL=TRUE \
85af7b2
       -DINSTALL_DOCS:BOOL=FALSE \
631720a
       -DINSTALL_FONTS:BOOL=FALSE \
7a63317
       -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
e1ef02b
       -DSTOP_ON_WARNING:BOOL=FALSE \
b74dc29
       -DJPEG_INCLUDE_DIR=%{_includedir} \
b74dc29
       -DOPENJPEG_INCLUDE_DIR=$(pkgconf --variable=includedir libopenjp2) \
e62907f
       -DOpenGL_GL_PREFERENCE=GLVND \
8f2936b
       -DVERBOSE=TRUE
7a63317
8f2936b
%cmake_build
7a63317
7a63317
7a63317
%install
8f2936b
%cmake_install
7a63317
7a63317
# Move man pages to the right directory
8f2936b
pushd %{_vpath_builddir}
7a63317
mkdir -p %{buildroot}%{_mandir}/man1
92eeec4
cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
7a63317
7a63317
527c815
%check
5d225ec
# Not all tests pass on linux
3bbc3b7
#pushd build/linux && make test
527c815
527c815
7a63317
%files
94795ee
%doc CHANGES.md CREDITS.md README.md
21cd2f8
%license LICENSE.md THIRD-PARTY.md
90e880c
%{_libdir}/libOpenImageIO.so.%{sover}*
90e880c
%{_libdir}/libOpenImageIO_Util.so.%{sover}*
b9ab72a
1deb182
%files -n python3-openimageio
1deb182
%{python3_sitearch}/OpenImageIO.so
2f57d9f
2f57d9f
%files utils
2f57d9f
%exclude %{_bindir}/iv
2f57d9f
%{_bindir}/*
cabde45
%exclude %{_mandir}/man1/iv.1.gz
2f57d9f
%{_mandir}/man1/*.1.gz
2f57d9f
2f57d9f
%files iv
2f57d9f
%{_bindir}/iv
cabde45
%{_mandir}/man1/iv.1.gz
7a63317
7a63317
%files devel
7a63317
%{_libdir}/libOpenImageIO.so
054dab7
%{_libdir}/libOpenImageIO_Util.so
6f938db
%{_libdir}/cmake/%{name}/*.cmake
498e9c1
%{_libdir}/pkgconfig/%{name}.pc
94795ee
%{_datadir}/cmake/Modules/FindOpenImageIO.cmake
498e9c1
%{_includedir}/%{name}/
7a63317
5371afc
7a63317
%changelog
b194f07
* Mon Nov 02 2020 Richard Shaw <hobbes1069@gmail.com> - 2.2.8.0-1
b194f07
- Update to 2.2.8.0.
b194f07
21209a0
* Thu Oct 22 2020 Nicolas Chauvet <kwizart@gmail.com> - 2.2.7.0-2
21209a0
- Rebuilt for OpenCV
21209a0
9935f8e
* Thu Oct 01 2020 Richard Shaw <hobbes1069@gmail.com> - 2.2.7.0-1
9935f8e
- Update to 2.2.7.0.
9935f8e
21cd2f8
* Wed Sep 02 2020 Richard Shaw <hobbes1069@gmail.com> - 2.2.6.1-1
21cd2f8
- Update to 2.2.6.1.
21cd2f8
63426e3
* Thu Aug 20 2020 Simone Caronni <negativo17@gmail.com> - 2.1.18.1-2
63426e3
- Rebuild for updated OpenVDB.
63426e3
dcf5aa6
* Mon Aug 03 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.18.1-5
dcf5aa6
- Update to 2.1.18.1.
1bafcc4
4beb75a
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.17.0-4
4beb75a
- Second attempt - Rebuilt for
4beb75a
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
4beb75a
ebc2d5a
* Mon Jul 27 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.17.0-3
fe497c8
- Rebuild for unannounced soname bump in libdc1394.
fe497c8
a2570e5
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.17.0-2
a2570e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a2570e5
8f2936b
* Thu Jul 02 2020 Richard Shaw <hobbes1069@gmail.com> - 2.1.17.0-1
8f2936b
- Update to 2.1.17.0.
8f2936b
d355dfe
* Thu Jun 25 2020 Orion Poplawski <orion@cora.nwra.com> - 2.1.16.0-3
d355dfe
- Rebuild for hdf5 1.10.6
d355dfe
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
44a055f
d550f64
* Sun Aug 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.10-1
d550f64
- Update to 2.0.10.
d550f64
491dab4
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-2
491dab4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
491dab4
fedf66d
* Fri Jul 05 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.9-1
fedf66d
- Update to 2.0.9.
fedf66d
09505c6
* Sat May 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.8-1
09505c6
- Update to 2.0.8.
09505c6
b3746b1
* Wed Apr 10 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.7-3
b3746b1
- Rebuild for OpenEXR 2.3.0.
b3746b1
82d0ab8
* Thu Apr 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.7-2
82d0ab8
- Rebuild for OpenColorIO 1.1.1.
82d0ab8
8a2523d
* Mon Apr 01 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.7-1
8a2523d
- Update to 2.0.7.
8a2523d
ecdcdd6
* Mon Mar 18 2019 Orion Poplawski <orion@nwra.com>
ecdcdd6
- Rebuild for hdf5 1.10.5
ecdcdd6
ddc8d95
* Sun Mar 17 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.6-1
ddc8d95
- Update to 2.0.6.
ddc8d95
8542c4a
* Thu Mar 14 2019 Mohan Boddu <mboddu@bhujji.com> - 2.0.5-2
8542c4a
- Rebuilt for dcmtk 3.6.4
8542c4a
498e9c1
* Mon Feb 04 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.5-1
498e9c1
- Update to 2.0.5.
498e9c1
8eb1ef8
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-3
8eb1ef8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8eb1ef8
c956bea
* Thu Jan 24 2019 Jonathan Wakely <jwakely@redhat.com> - 2.0.4-2
c956bea
- Rebuilt for Boost 1.69
c956bea
338d48f
* Sun Jan 06 2019 Richard Shaw <hobbes1069@gmail.com> - 2.0.4-1
338d48f
- Update to 2.0.4:
338d48f
  http://lists.openimageio.org/pipermail/oiio-dev-openimageio.org/2019-January/001391.html
338d48f
94795ee
* Sat Dec 08 2018 Richard Shaw <hobbes1069@gmail.com> - 2.0.3-1
94795ee
- Update to 2.0.3.
94795ee
38f03aa
* Mon Dec 03 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.17-1
38f03aa
- Update to 1.8.17.
38f03aa
df05381
* Fri Nov 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.16-1
df05381
- Update to 1.8.16.
df05381
e62907f
* Tue Oct 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.15-1
e62907f
- Update to 1.8.15.
e62907f
1deb182
* Mon Sep 24 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.14-2
1deb182
- Remove python2 module and replace with python3 module.
1deb182
0463cae
* Mon Sep 03 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.14-1
0463cae
- Update to 1.8.14.
0463cae
35827d9
* Wed Jul 18 2018 Simone Caronni <negativo17@gmail.com> - 1.8.12-3
35827d9
- Rebuild for LibRaw update.
35827d9
bdcb305
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.12-2
bdcb305
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
bdcb305
53c00d2
* Fri Jun 01 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.12-1
53c00d2
- Update to 1.8.12.
53c00d2
eedcd8d
* Mon Apr 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.10-1
eedcd8d
- Update to 1.8.10.
eedcd8d
dd39d24
* Fri Mar 02 2018 Adam Williamson <awilliam@redhat.com> - 1.8.9-2
dd39d24
- Rebuild for opencv 3.4.1
dd39d24
d7bdc6e
* Thu Mar 01 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.9-1
d7bdc6e
- Update to 1.8.9
d7bdc6e
8122e40
* Fri Feb 23 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.8.8-3
8122e40
- Rebuild
8122e40
91369ed
* Tue Feb 13 2018 Sandro Mani <manisandro@gmail.com> - 1.8.8-2
91369ed
- Rebuild (giflib)
91369ed
b73085a
* Fri Feb 02 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.8-1
b73085a
- Update to 1.8.8.
b73085a
b74dc29
* Thu Jan 18 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-3
b74dc29
- Add openjpeg2 to build dependencies.
b74dc29
- Re-enable dcmtk for 32bit arches.
b74dc29
fec3e20
* Sat Jan 13 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-2
fec3e20
- Rebuild for OpenColorIO 1.1.0.
fec3e20
a6324ed
* Wed Jan 03 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-1
a6324ed
- Update to latest upstream release.
a6324ed
- Disable building with dcmtk until fixed, see:
a6324ed
  https://github.com/OpenImageIO/oiio/issues/1841
a6324ed
d964540
* Thu Nov 02 2017 Richard Shaw <hobbes1069@gmail.com> - 1.8.6-1
d964540
- Update to latest upstream release.
85af7b2
- Add dcmtk to build to enable DICOM plugin.