edaca86
%if ! 0%{?bootstrap}
edaca86
%global docs 1
edaca86
%global tests 1
edaca86
%endif
edaca86
fe42490
Name:           OpenColorIO
4e736d1
Version:        1.1.1
243e529
Release:        7%{?dist}
fe42490
Summary:        Enables color transforms and image display across graphics apps
fe42490
fe42490
License:        BSD
fe42490
URL:            http://opencolorio.org/
e50f63f
Source0:        https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v%{version}/%{name}-%{version}.tar.gz
4e736d1
4e736d1
# Work with system libraries instead of bundled.
4e736d1
Patch0:         OpenColorIO-setuptools.patch
c7a8ea7
# Fix build against yaml-cpp 0.6.0+
c7a8ea7
# This patch is fine for our case (building against system yaml-cpp)
c7a8ea7
# but probably a bit too simple-minded to upstream as-is. See
c7a8ea7
# https://github.com/imageworks/OpenColorIO/issues/517
4e736d1
Patch1:         ocio-1.1.0-yamlcpp060.patch
4e736d1
Patch2:         ocio-glext_h.patch
fe42490
fe42490
# Utilities
fc05cf4
BuildRequires:  cmake gcc-c++
fe42490
BuildRequires:  help2man
4e736d1
BuildRequires:  python3
4426e12
BuildRequires:  python3-markupsafe
4426e12
BuildRequires:  python3-setuptools
e4da1f4
4e736d1
# Libraries
0d5eeb2
BuildRequires:  boost-devel
4e736d1
BuildRequires:  mesa-libGL-devel mesa-libGLU-devel
4e736d1
BuildRequires:  libX11-devel libXmu-devel libXi-devel
4e736d1
BuildRequires:  freeglut-devel
4e736d1
BuildRequires:  glew-devel
4e736d1
BuildRequires:  python3-devel
4e736d1
BuildRequires:  zlib-devel
4e736d1
4e736d1
# WARNING: OpenColorIO and OpenImageIO are cross dependent.
4e736d1
# If an ABI incompatible update is done in one, the other also needs to be
4e736d1
# rebuilt.
4e736d1
BuildRequires:  OpenImageIO-devel
4e736d1
BuildRequires:  OpenEXR-devel
4e736d1
4e736d1
#######################
4e736d1
# Unbundled libraries #
4e736d1
#######################
4e736d1
BuildRequires:  tinyxml-devel
4e736d1
BuildRequires:  lcms2-devel
4e736d1
BuildRequires:  yaml-cpp-devel >= 0.5.0
4e736d1
edaca86
%if 0%{?docs}
e4da1f4
# Needed for pdf documentation generation
e4da1f4
BuildRequires:  texlive-latex-bin-bin texlive-gsftopk-bin texlive-dvips
e4da1f4
# Fonts
e4da1f4
BuildRequires:  texlive-cm texlive-ec texlive-times texlive-helvetic
e4da1f4
BuildRequires:  texlive-courier
e4da1f4
# Map tables
e4da1f4
BuildRequires:  texlive-cmap
e4da1f4
# Font maps
e4da1f4
BuildRequires:  texlive-updmap-map
e4da1f4
# Babel
e4da1f4
BuildRequires:  texlive-babel-english
e4da1f4
# Styles
e4da1f4
BuildRequires:  texlive-fancyhdr texlive-fancybox texlive-mdwtools
e4da1f4
BuildRequires:  texlive-parskip texlive-multirow texlive-titlesec
e4da1f4
BuildRequires:  texlive-framed texlive-threeparttable texlive-wrapfig
e4da1f4
# Other
e4da1f4
BuildRequires:  texlive-hyphen-base
edaca86
%endif
fe42490
fe42490
abf66a8
# The following bundled projects are only used for document generation.
fe42490
#BuildRequires:  python-docutils
fe42490
#BuildRequires:  python-jinja2
fe42490
#BuildRequires:  python-pygments
fe42490
#BuildRequires:  python-setuptools
fe42490
#BuildRequires:  python-sphinx
fe42490
fc05cf4
%if ! 0%{?docs}
edaca86
# upgrade path for when/if docs are not included
edaca86
Obsoletes: %{name}-doc < %{version}-%{release}
edaca86
%endif
edaca86
fe42490
fe42490
%description
fe42490
OCIO enables color transforms and image display to be handled in a consistent
fe42490
manner across multiple graphics applications. Unlike other color management
fe42490
solutions, OCIO is geared towards motion-picture post production, with an
fe42490
emphasis on visual effects and animation color pipelines.
fe42490
fe42490
abf66a8
%package tools
abf66a8
Summary:        Command line tools for %{name}
abf66a8
Requires:       %{name}%{?_isa} = %{version}-%{release}
abf66a8
abf66a8
%description tools
abf66a8
Command line tools for %{name}.
abf66a8
abf66a8
fe42490
%package doc
fe42490
BuildArch:      noarch
fe42490
Summary:        API Documentation for %{name}
fe42490
Requires:       %{name} = %{version}-%{release}
fe42490
fe42490
%description doc
fe42490
API documentation for %{name}.
fe42490
fe42490
fe42490
%package devel
fe42490
Summary:        Development libraries and headers for %{name}
fe42490
Requires:       %{name}%{?_isa} = %{version}-%{release}
fe42490
fe42490
%description devel
fe42490
Development libraries and headers for %{name}.
fe42490
fe42490
fe42490
%prep
e4da1f4
%autosetup -p1
fe42490
fe42490
# Remove what bundled libraries
fe42490
rm -f ext/lcms*
fe42490
rm -f ext/tinyxml*
c7a8ea7
rm -f ext/yaml*
fe42490
fe42490
fe42490
%build
fe42490
rm -rf build && mkdir build && pushd build
ac9eb47
%cmake -DOCIO_BUILD_STATIC=OFF \
4bce92e
       -DOCIO_BUILD_DOCS=%{?docs:ON}%{?!docs:OFF} \
4e736d1
       -DOCIO_BUILD_PYGLUE=OFF \
edaca86
       -DOCIO_BUILD_TESTS=%{?tests:ON}%{?!tests:OFF} \
4426e12
       -DPYTHON=%{__python3} \
c7a8ea7
       -DUSE_EXTERNAL_YAML=TRUE \
ac9eb47
       -DUSE_EXTERNAL_TINYXML=TRUE \
ac9eb47
       -DUSE_EXTERNAL_LCMS=TRUE \
e4da1f4
       -DUSE_EXTERNAL_SETUPTOOLS=TRUE \
fe42490
%ifnarch x86_64
ac9eb47
       -DOCIO_USE_SSE=OFF \
fe42490
%endif
4426e12
       -DOpenGL_GL_PREFERENCE=GLVND \
ac9eb47
       ../
fe42490
e4da1f4
%make_build
fe42490
fe42490
fe42490
%install
fe42490
pushd build
8b16cda
%make_install
fe42490
fe42490
# Generate man pages
fe42490
mkdir -p %{buildroot}%{_mandir}/man1
ee32f47
help2man -N -s 1 %{?fedora:--version-string=%{version}} \
fe42490
         -o %{buildroot}%{_mandir}/man1/ociocheck.1 \
fe42490
         src/apps/ociocheck/ociocheck
ee32f47
help2man -N -s 1 %{?fedora:--version-string=%{version}} \
fe42490
         -o %{buildroot}%{_mandir}/man1/ociobakelut.1 \
fe42490
         src/apps/ociobakelut/ociobakelut
edaca86
popd
fe42490
edaca86
%if 0%{?docs}
85ad79a
# Move installed documentation back so it doesn't conflict with the main package
85ad79a
mkdir _tmpdoc
85ad79a
mv %{buildroot}%{_docdir}/%{name}/* _tmpdoc/
edaca86
%endif
85ad79a
e4da1f4
# Fix location of cmake files.
e4da1f4
mkdir -p %{buildroot}%{_datadir}/cmake/Modules
e4da1f4
find %{buildroot} -name "*.cmake" -exec mv {} %{buildroot}%{_datadir}/cmake/Modules/ \;
e4da1f4
fe42490
fe42490
%check
fe42490
# Testing passes locally in mock but fails on the fedora build servers.
fe42490
#pushd build && make test
fe42490
fe42490
fc05cf4
%ldconfig_scriptlets
fe42490
fe42490
fe42490
%files
b4fe0f4
%license LICENSE
e4da1f4
%doc ChangeLog README.md
fe42490
%{_libdir}/*.so.*
fe42490
%dir %{_datadir}/ocio
fe42490
%{_datadir}/ocio/setup_ocio.sh
4e736d1
#{python3_sitearch}/*.so
fe42490
abf66a8
%files tools
abf66a8
%{_bindir}/*
abf66a8
%{_mandir}/man1/*
abf66a8
edaca86
%if 0%{?docs}
fe42490
%files doc
85ad79a
%doc _tmpdoc/*
edaca86
%endif
fe42490
fe42490
%files devel
e4da1f4
%{_datadir}/cmake/Modules/*
fe42490
%{_includedir}/OpenColorIO/
4e736d1
#{_includedir}/PyOpenColorIO/
fe42490
%{_libdir}/*.so
fe42490
%{_libdir}/pkgconfig/%{name}.pc
fe42490
fe42490
fe42490
%changelog
243e529
* Sat Mar 14 2020 Richard Shaw <hobbes1069@gmail.com> - 1.1.1-7
243e529
- Rebuild to fix bad timing with mass rebuild and OIIO 2.0.x -> 2.1.x.
243e529
c1ca97e
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
c1ca97e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c1ca97e
c1696a0
* Mon Jan 27 2020 Richard Shaw <hobbes1069@gmail.com> - 1.1.1-5
c1696a0
- Rebuild for OpenImageIO 2.1.10.1.
c1696a0
543c83a
* Fri Oct 18 2019 Richard Shaw <hobbes1069@gmail.com> - 1.1.1-4
dd8fa20
- Rebuild for yaml-cpp 0.6.3.
dd8fa20
d222d2e
* Tue Sep 17 2019 Gwyn Ciesla <gwync@protonmail.com> - 1.1.1-3
d222d2e
- Rebuilt for new freeglut
d222d2e
935a70c
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
935a70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
935a70c
4e736d1
* Wed Apr 03 2019 Richard Shaw <hobbes1069@gmail.com> - 1.1.1-1
4e736d1
- Update to 1.1.1.
4e736d1
- Removing python glue module as python 3 is not currently supported.
4e736d1
bdf51bf
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-11
bdf51bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
bdf51bf
659d328
* Thu Dec 13 2018 Richard Shaw <hobbes1069@gmail.com> - 1.1.0-10
659d328
- Add patch for OIIO 2.0 and mesa glext.h header changes.
659d328
4426e12
* Mon Sep 24 2018 Richard Shaw <hobbes1069@gmail.com> - 1.1.0-9
4426e12
- Obsolete Python2 library and build Python3 library.
4426e12
7496b6f
* Thu Aug 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-8
7496b6f
- Rebuilt for glew 2.1.0
7496b6f
fe787a0
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-7
fe787a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
fe787a0
7d38d8d
* Thu Feb 22 2018 Adam Williamson <awilliam@redhat.com> - 1.1.0-6
7d38d8d
- Rebuild with bootstrap disabled, so we get docs again
7d38d8d
e05bef6
* Thu Feb 22 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.0-5
e05bef6
- Rebuild
e05bef6
edaca86
* Tue Feb 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 1.1.0-4
edaca86
- support %%bootstrap (no docs, no tests)
edaca86
- enable bootstrap mode on f28+ to workaround bug #1546964
edaca86
c7a8ea7
* Mon Feb 19 2018 Adam Williamson <awilliam@redhat.com> - 1.1.0-3
c7a8ea7
- Fix build with yaml-cpp 0.6+ (patch out bogus hidden visibility)
c7a8ea7
- Fix build with GCC 8 (issues in Python bindings, upstream PR #518)
c7a8ea7
- Rebuild for yaml-cpp 0.6.1
3e8ac4f
d0329bc
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
d0329bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d0329bc
e4da1f4
* Fri Jan 12 2018 Richard Shaw <hobbes1069@gmail.com> - 1.1.0-1
e4da1f4
- Update to latest upstream release.
e4da1f4
41840af
* Sun Jan 07 2018 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-20
41840af
- Rebuild for OpenImageIO 1.8.7.
41840af
7f7a94e
* Wed Dec 06 2017 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-19
7f7a94e
- Fix ambiguous Python 2 dependency declarations
7f7a94e
  https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
7f7a94e
11cb2a0
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-18
11cb2a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
11cb2a0
4cd8127
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-17
4cd8127
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4cd8127
Igor Gnatenko 13a6d4d
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.0.9-16
Igor Gnatenko 13a6d4d
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko 13a6d4d
c7afe62
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-15
c7afe62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c7afe62
Orion Poplawski 0b44c2a
* Tue Jan 10 2017 Orion Poplawski <orion@cora.nwra.com> - 1.0.9-14
Orion Poplawski 0b44c2a
- Rebuild for glew 2.0.0
Orion Poplawski 0b44c2a
42cbd9d
* Mon Oct 03 2016 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-13
42cbd9d
- Rebuild for new OpenImageIO.
42cbd9d
a9b1b66
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-12
a9b1b66
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
a9b1b66
cb59c26
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-11
cb59c26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
cb59c26
f943e9b
* Thu Jan 14 2016 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-10
f943e9b
- Rebuild for OpenImageIO 1.6.9.
f943e9b
9a25bfa
* Thu Jan 14 2016 Adam Jackson <ajax@redhat.com> - 1.0.9-9
9a25bfa
- Rebuild for glew 1.13
9a25bfa
0059b18
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-8
0059b18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0059b18
d2de431
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.9-7
d2de431
- Rebuilt for GCC 5 C++11 ABI change
d2de431
63ffa7f
* Wed Jan 28 2015 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-6
63ffa7f
- Rebuild for OpenImageIO 1.5.11.
63ffa7f
db2b11b
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-5
db2b11b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
db2b11b
f51c505
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-4
f51c505
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f51c505
2834fd0
* Wed May 21 2014 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-3
2834fd0
- Rebuild for updated OpenImageIO 1.4.7.
2834fd0
abf66a8
* Mon Jan 13 2014 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-2
abf66a8
- Add OpenImageIO as build requirement to build additional command line tools.
abf66a8
  Fixes BZ#1038860.
abf66a8
23fe399
* Wed Nov  6 2013 Richard Shaw <hobbes1069@gmail.com> - 1.0.9-1
23fe399
- Update to latest upstream release.
23fe399
8b16cda
* Mon Sep 23 2013 Richard Shaw <hobbes1069@gmail.com> - 1.0.8-6
8b16cda
- Rebuild against yaml-cpp03 compatibility package.
8b16cda
85ad79a
* Mon Aug 26 2013 Richard Shaw <hobbes1069@gmail.com> - 1.0.8-5
cf9b221
- Fix for new F20 feature, unversion doc dir. Fixes BZ#1001264
cf9b221
38f25a3
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-3
38f25a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
38f25a3
400267c
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-2
400267c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
400267c
ac9eb47
* Tue Dec 11 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.8-1
ac9eb47
- Update to latest upstream release.
ac9eb47
8e096b8
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-5
8e096b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8e096b8
fe42490
* Thu Apr 26 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.7-4
fe42490
- Only use SSE instructions on x86_64.
fe42490
fe42490
* Wed Apr 25 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.7-3
fe42490
- Misc spec cleanup for packaging guidelines.
fe42490
- Disable testing for now since it fails on the build servers.
fe42490
fe42490
* Wed Apr 18 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.7-1
fe42490
- Latest upstream release.
fe42490
fe42490
* Thu Apr 05 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.6-1
fe42490
- Latest upstream release.
fe42490
fe42490
* Wed Nov 16 2011 Richard Shaw <hobbes1069@gmail.com> - 1.0.2-1
fe42490
- Initial release.