-# TODO (proprietary?):
-# - truelight http://www.filmlight.ltd.uk/products/truelight/overview_tl.php
-# - nuke: http://docs.thefoundry.co.uk/products/nuke/
+# TODO:
+# - OpenFX plugin (OpenFX >= 1.4, https://github.com/ofxa/openfx)
+# - truelight http://www.filmlight.ltd.uk/products/truelight/overview_tl.php (proprietary?)
+# - nuke: http://docs.thefoundry.co.uk/products/nuke/ (proprietary)
#
# Conditional build:
-%bcond_without oiio # OpenImageIO-dependent apps (ocioconvert,ociodisplay)
%bcond_without opengl # OpenGL-dependent app (ociodisplay)
-%bcond_without java # JNI glue
-%bcond_without docs # documentation
+%bcond_with java # JNI glue (outdated as of 2.2.1)
+%bcond_without doc # documentation
%bcond_with sse2 # use SSE2 instructions
+%bcond_with sse3 # use SSE3 instructions
+%bcond_with ssse3 # use SSSE3 instructions
+%bcond_with sse4 # use SSE4 instructions
+%bcond_with sse42 # use SSE4.2 instructions
+%bcond_with avx # use AVX instructions
+%bcond_with avx2 # use AVX2 instructions
+%bcond_with avx512 # use AVX512 instructions
+%bcond_with f16c # use F16C instructions
#
-%ifarch %{x8664} pentrium4
+%ifarch %{x8664} pentium4 x32
%define with_sse2 1
%endif
Summary: Complete color management solution
Summary(pl.UTF-8): Kompletny pakiet do zarządzania kolorami
Name: OpenColorIO
-Version: 1.1.0
-Release: 0.1
+Version: 2.3.2
+Release: 1
License: BSD
Group: Libraries
+#Source0Download: https://github.com/imageworks/OpenColorIO/releases
Source0: https://github.com/imageworks/OpenColorIO/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 802d8f5b1d1fe316ec5f76511aa611b8
-Patch0: %{name}-system-libs.patch
-Patch1: %{name}-java.patch
-Patch2: %{name}-libsuffix.patch
-Patch3: %{name}-missing.patch
-Patch4: %{name}-yaml-cpp.patch
-Patch5: %{name}-no-Werror.patch
-Patch6: %{name}-oiio.patch
-Patch7: %{name}-cmake-dir.patch
+# Source0-md5: 8af74fcb8c4820ab21204463a06ba490
+Patch0: %{name}-java.patch
URL: http://opencolorio.org/
-BuildRequires: cmake >= 2.8
+BuildRequires: Imath-devel >= 3.1.6
+BuildRequires: OpenEXR-devel >= 3.0.5
+BuildRequires: cmake >= 3.13
+BuildRequires: expat-devel >= 1:2.5.0
%{?with_java:BuildRequires: jdk}
-BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: lcms2-devel >= 2.2
+BuildRequires: libstdc++-devel >= 6:5
+BuildRequires: minizip-ng-devel >= 3.0.7
BuildRequires: pkgconfig
-BuildRequires: python-devel
-%if %{with docs}
+BuildRequires: pystring-devel >= 1.1.3
+BuildRequires: python3-devel
+BuildRequires: python3-pybind11 >= 2.9.2
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpmbuild(macros) >= 1.742
+BuildRequires: tinyxml-devel >= 2.6.1
+BuildRequires: yaml-cpp-devel >= 0.8.0
+BuildRequires: zlib-devel >= 1.2.13
+%if %{with doc}
+BuildRequires: python3-breathe
+BuildRequires: python3-recommonmark
+BuildRequires: python3-six
+BuildRequires: python3-sphinx_press_theme
+BuildRequires: python3-sphinx_tabs
+BuildRequires: python3-testresources
BuildRequires: sphinx-pdg >= 1.1
-BuildRequires: texlive-latex-ams
-BuildRequires: texlive-xetex
%endif
-BuildRequires: tinyxml-devel >= 2.6.1
-BuildRequires: yaml-cpp-devel >= 0.3.0
%if %{with opengl}
+BuildRequires: OpenGL-GLX-devel
BuildRequires: OpenGL-devel
BuildRequires: OpenGL-glut-devel
BuildRequires: glew-devel >= 1.5.1
%endif
-%if %{with oiio}
-BuildRequires: OpenImageIO-devel
-BuildRequires: lcms2-devel >= 2.1
-%endif
+Requires: Imath >= 3.1.6
+Requires: expat >= 1:2.5.0
+Requires: minizip-ng >= 3.0.7
Requires: tinyxml >= 2.6.1
-Requires: yaml-cpp >= 0.3.0
+Requires: yaml-cpp >= 0.8.0
+Requires: zlib >= 1.2.13
+%if %{without java}
+Obsoletes: java-OpenColorIO < 2
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary(pl.UTF-8): Narzędzie OpenColorIO do konwersji
Group: Applications/Graphics
Requires: %{name} = %{version}-%{release}
-Requires: lcms2 >= 2.1
+Requires: OpenEXR >= 3.0.5
+Requires: lcms2 >= 2.2
%description convert
OpenColorIO convert tool.
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenColorIO
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: libstdc++-devel
+Requires: libstdc++-devel >= 6:5
%description devel
Header files for OpenColorIO library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki OpenColorIO.
-%package static
-Summary: Static OpenColorIO library
-Summary(pl.UTF-8): Statyczna biblioteka OpenColorIO
-Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
+%package apidocs
+Summary: API documentation for OpenColorIO library
+Summary(pl.UTF-8): Dokumentacja API biblioteki OpenColorIO
+Group: Documentation
+BuildArch: noarch
-%description static
-Static OpenColorIO library.
+%description apidocs
+API documentation for OpenColorIO library.
-%description static -l pl.UTF-8
-Statyczna biblioteka OpenColorIO.
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki OpenColorIO.
%package -n java-OpenColorIO
Summary: Java binding for OpenColorIO library
%description -n java-OpenColorIO -l pl.UTF-8
Wiązanie Javy do biblioteki OpenColorIO.
-%package -n python-OpenColorIO
+%package -n python3-OpenColorIO
Summary: Python binding for OpenColorIO library
Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenColorIO
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
-%description -n python-OpenColorIO
+%description -n python3-OpenColorIO
Python binding for OpenColorIO library.
-%description -n python-OpenColorIO -l pl.UTF-8
+%description -n python3-OpenColorIO -l pl.UTF-8
Wiązanie Pythona do biblioteki OpenColorIO.
-%package -n python-OpenColorIO-devel
-Summary: Header file for PyOpenColorIO API
-Summary(pl.UTF-8): Plik nagłówkowy API PyOpenColorIO
-Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
-Requires: python-OpenColorIO = %{version}-%{release}
-
-%description -n python-OpenColorIO-devel
-Header file for PyOpenColorIO API.
-
-%description -n python-OpenColorIO-devel -l pl.UTF-8
-Plik nagłówkowy API PyOpenColorIO.
-
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
%build
# required for cmake to find JNI headers/libs when lib64 is in use
%{?with_java:export JAVA_HOME=%{_jvmlibdir}/java}
-install -d build
-cd build
-# yaml-cpp 0.6.x requires C++11
-CXXFLAGS="%{rpmcxxflags} -std=c++11"
-%cmake .. \
- %{!?with_oiio:-DDISABLE_OIIO=ON} \
- -DOCIO_BUILD_DOCS=ON \
-%if %{with java}
- -DOCIO_BUILD_JNIGLUE=ON \
- -DOCIO_STATIC_JNIGLUE=OFF \
-%endif
- %{!?with_sse2:-DOCIO_USE_SSE=OFF} \
- -DUSE_EXTERNAL_LCMS=ON \
- -DUSE_EXTERNAL_TINYXML=ON \
- -DUSE_EXTERNAL_YAML=ON
-
-%{__make}
+%cmake -B build \
+ -DCMAKE_CONFIGURATION_TYPES=PLD \
+ -DCMAKE_CXX_STANDARD=14 \
+ %{cmake_on_off doc OCIO_BUILD_DOCS} \
+ %{cmake_on_off java OCIO_BUILD_JAVA} \
+ %{!?with_sse2:-DOCIO_USE_SSE2=OFF} \
+ %{!?with_sse3:-DOCIO_USE_SSE3=OFF} \
+ %{!?with_ssse3:-DOCIO_USE_SSSE3=OFF} \
+ %{!?with_sse4:-DOCIO_USE_SSE4=OFF} \
+ %{!?with_sse42:-DOCIO_USE_SSE42=OFF} \
+ %{!?with_avx:-DOCIO_USE_AVX=OFF} \
+ %{!?with_avx2:-DOCIO_USE_AVX2=OFF} \
+ %{!?with_avx512:-DOCIO_USE_AVX512=OFF} \
+ %{!?with_f16c:-DOCIO_USE_F16C=OFF}
+
+%{__make} -C build
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
+
# not needed when installing to /usr
%{__rm} $RPM_BUILD_ROOT%{_datadir}/ocio/setup_ocio.sh
# packaged as %doc
%post -n java-OpenColorIO -p /sbin/ldconfig
%postun -n java-OpenColorIO -p /sbin/ldconfig
-%post -n python-OpenColorIO -p /sbin/ldconfig
-%postun -n python-OpenColorIO -p /sbin/ldconfig
+%post -n python3-OpenColorIO -p /sbin/ldconfig
+%postun -n python3-OpenColorIO -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
-%doc ChangeLog LICENSE README.md
+%doc CHANGELOG.md LICENSE README.md
+%attr(755,root,root) %{_bindir}/ocioarchive
%attr(755,root,root) %{_bindir}/ociobakelut
%attr(755,root,root) %{_bindir}/ociocheck
+%attr(755,root,root) %{_bindir}/ociochecklut
+%attr(755,root,root) %{_bindir}/ociomakeclf
+%attr(755,root,root) %{_bindir}/ocioperf
+%attr(755,root,root) %{_bindir}/ociowrite
%attr(755,root,root) %{_libdir}/libOpenColorIO.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libOpenColorIO.so.1
+%attr(755,root,root) %ghost %{_libdir}/libOpenColorIO.so.2.3
-%if %{with oiio}
%files convert
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ocioconvert
%attr(755,root,root) %{_bindir}/ociolutimage
-%endif
-%if %{with oiio} && %{with opengl}
+%if %{with opengl}
%files display
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ociodisplay
%files devel
%defattr(644,root,root,755)
-%doc build/docs/build-html/*
%attr(755,root,root) %{_libdir}/libOpenColorIO.so
+%{_libdir}/libOpenColorIOimageioapphelpers.a
+%{_libdir}/libOpenColorIOoglapphelpers.a
%{_includedir}/OpenColorIO
%{_pkgconfigdir}/OpenColorIO.pc
%{_libdir}/cmake/OpenColorIO
-%files static
+%files apidocs
%defattr(644,root,root,755)
-%{_libdir}/libOpenColorIO.a
+%doc build/docs/build-html/{_images,_static,api,aswf,concepts,configurations,guides,quick_start,releases,tutorials,*.html,*.js}
%if %{with java}
%files -n java-OpenColorIO
%{_datadir}/ocio/OpenColorIO-%{version}.jar
%endif
-%files -n python-OpenColorIO
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/PyOpenColorIO.so
-
-%files -n python-OpenColorIO-devel
+%files -n python3-OpenColorIO
%defattr(644,root,root,755)
-%{_includedir}/PyOpenColorIO
+%dir %{py3_sitedir}/PyOpenColorIO
+%attr(755,root,root) %{py3_sitedir}/PyOpenColorIO/PyOpenColorIO.so
+%{py3_sitedir}/PyOpenColorIO/__init__.py
+%{py3_sitedir}/PyOpenColorIO/__pycache__