[packages/OpenEXR/OpenEXR-2] - OpenEXR 2.4.x, all components from single source

qboosh qboosh at pld-linux.org
Sun Mar 12 19:26:07 CET 2023


commit 01f928a4c9d49d0bb700df65555160b57e2933b4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Mar 12 19:28:02 2023 +0100

    - OpenEXR 2.4.x, all components from single source

 OpenEXR-python-install.patch |  35 +++++
 OpenEXR.spec                 | 315 +++++++++++++++++++++++++++++++++++++++----
 2 files changed, 325 insertions(+), 25 deletions(-)
---
diff --git a/OpenEXR.spec b/OpenEXR.spec
index 3541485..60a4a4d 100644
--- a/OpenEXR.spec
+++ b/OpenEXR.spec
@@ -1,22 +1,34 @@
+#
+# Conditional build:
+%bcond_with	cg	# use NVIDIA Cg compiler
+
 Summary:	High dynamic-range (HDR) image file format support libraries
 Summary(pl.UTF-8):	Biblioteki obsługujące format plików obrazu o wysokiej dynamice (HDR)
 Name:		OpenEXR
-Version:	2.3.0
+Version:	2.4.3
 Release:	1
 License:	BSD
 Group:		Libraries
 #Source0Download: https://github.com/AcademySoftwareFoundation/openexr/releases
-Source0:	https://github.com/AcademySoftwareFoundation/openexr/releases/download/v%{version}/openexr-%{version}.tar.gz
-# Source0-md5:	a157e8a46596bc185f2472a5a4682174
-URL:		https://www.openexr.com/
-BuildRequires:	autoconf >= 2.50
-BuildRequires:	automake >= 1.6.3
+Source0:	https://github.com/AcademySoftwareFoundation/openexr/archive/v%{version}/openexr-%{version}.tar.gz
+# Source0-md5:	6b25476b00b0a5fd6e99b0b5f6c29022
+Patch0:		%{name}-python-install.patch
+URL:		https://openexr.com/
+%{?with_cg:BuildRequires:	OpenGL-glut-devel}
+%{?with_cg:BuildRequires:	cg-devel}
+BuildRequires:	boost-python-devel
+BuildRequires:	boost-python3-devel
+BuildRequires:	cmake >= 3.12
+BuildRequires:	fltk-gl-devel >= 1.1
 BuildRequires:	ilmbase-devel >= 2.3.0
 BuildRequires:	libstdc++-devel >= 6:5
-BuildRequires:	libtool >= 2:1.5
 BuildRequires:	pkgconfig
+BuildRequires:	python-devel >= 1:2.5
+BuildRequires:	python-numpy-devel
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	python3-numpy-devel
 BuildRequires:	zlib-devel
-Requires:	ilmbase >= 2.3.0
+Requires:	ilmbase = %{version}-%{release}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -86,22 +98,178 @@ OpenEXR documentation describing file format, library etc.
 %description doc -l pl.UTF-8
 Dokumentacja do OpenEXR, opisująca format pliku, bibliotekę itd.
 
+%package -n ilmbase
+Summary:	IlmBase - base math and exception libraries from OpenEXR project
+Summary(pl.UTF-8):	IlmBase - podstawowe biblioteki matematyczne i wyjątków z projektu OpenEXR
+Group:		Libraries
+
+%description -n ilmbase
+IlmBase consists of the following libraries:
+
+Half is a class that encapsulates our 16-bit floating-point format.
+
+IlmThread is a thread abstraction library for use with OpenEXR
+and other software packages.  It currently supports pthreads and
+Windows threads.
+
+Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices, quaternions
+and other useful 2D and 3D math functions.
+
+Iex is an exception-handling library.
+
+%description -n ilmbase -l pl.UTF-8
+IlmBase składa się z następujących bibliotek:
+
+Half to klasa obudowująca 16-bitowy format zmiennoprzecinkowy.
+
+IlmThread to biblioteka abstrakcji wątków przeznaczona dla OpenEXR i
+innych pakietów oprogramowania. Aktualnie obsługuje standard pthreads
+oraz wątki Windows.
+
+Imath implementuje wektory 2D i 3D, macierze 3x3 i 4x4, kwaterniony i
+inne przydatne funkcje matematyczne 2D i 3D.
+
+Iex to biblioteka obsługi wyjątków.
+
+%package -n ilmbase-devel
+Summary:	Header files for IlmBase libraries
+Summary(pl.UTF-8):	Pliki nagłówkowe bibliotek IlmBase
+Group:		Development/Libraries
+Requires:	ilmbase = %{version}-%{release}
+Requires:	libstdc++-devel >= 6:5
+Conflicts:	OpenEXR-devel < 1.5.0
+
+%description -n ilmbase-devel
+Header files for IlmBase libraries.
+
+%description -n ilmbase-devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek IlmBase.
+
+%package -n ilmbase-static
+Summary:	Static IlmBase libraries
+Summary(pl.UTF-8):	Statyczne biblioteki IlmBase
+Group:		Development/Libraries
+Requires:	ilmbase-devel = %{version}-%{release}
+Conflicts:	OpenEXR-static < 1.5.0
+
+%description -n ilmbase-static
+Static IlmBase libraries.
+
+%description -n ilmbase-static -l pl.UTF-8
+Statyczne biblioteki IlmBase.
+
+%package -n openexr_viewers
+Summary:	Simple still OpenEXR image viewer
+Summary(pl.UTF-8):	Prosta przeglądarka nieruchomych obrazów OpenEXR
+Group:		X11/Applications/Graphics
+Requires:	%{name} = %{version}-%{release}
+
+%description -n openexr_viewers
+exrdisplay is a simple still image viewer that optionally applies
+color transforms to OpenEXR images, using CTL.
+
+%if %{with cg}
+playexr is a program that plays back OpenEXR image sequences,
+optionally with CTL support, applying rendering and display
+transforms.
+%endif
+
+%description -n openexr_viewers -l pl.UTF-8
+exrdisplay to prosta przeglądarka nieruchomych obrazów opcjonalnie
+stosująca na obrazach OpenEXR przekształcenia kolorów przy użyciu CTL.
+
+%if %{with cg}
+playexr to program odtwarzający sekwencje obrazów OpenEXR z opcjonalną
+obsługą CTL i stosowaniem przekształceń renderingu i wyświetlania.
+%endif
+
+%package -n pyilmbase-devel
+Summary:	Header files for IlmBase Python bindings
+Summary(pl.UTF-8):	Pliki nagłówkowe wiązań Pyhona do bibliotek IlmBase
+Group:		Development/Libraries
+Requires:	boost-python-devel
+Requires:	ilmbase-devel = %{version}-%{release}
+Requires:	libstdc++-devel >= 6:5
+
+%description -n pyilmbase-devel
+Header files for IlmBase Python bindings.
+
+%description -n pyilmbase-devel -l pl.UTF-8
+Pliki nagłówkowe wiązań Pyhona do bibliotek IlmBase.
+
+%package -n python-pyilmbase
+Summary:	Python 2 bindings for the IlmBase libraries
+Summary(pl.UTF-8):	Wiązania Pythona 2 do bibliotek IlmBase
+Group:		Libraries/Python
+Requires:	ilmbase = %{version}-%{release}
+
+%description -n python-pyilmbase
+The PyIlmBase package provides python bindings for the IlmBase
+libraries.
+
+%description -n python-pyilmbase -l pl.UTF-8
+Pakiet PyIlmBase dostarcza wiązania Pythona do bibliotek IlmBase.
+
+%package -n python-pyilmbase-devel
+Summary:	Development files for IlmBase Python 2 bindings
+Summary(pl.UTF-8):	Pliki programistyczne wiązań IlmBase do Pythona 2
+Group:		Development/Libraries
+Requires:	pyilmbase-devel = %{version}-%{release}
+Requires:	python-devel >= 1:2.5
+Requires:	python-pyilmbase = %{version}-%{release}
+
+%description -n python-pyilmbase-devel
+Development files for IlmBase Python 2 bindings.
+
+%description -n python-pyilmbase-devel -l pl.UTF-8
+Pliki programistyczne wiązań IlmBase do Pythona 2.
+
+%package -n python3-pyilmbase
+Summary:	Python 3 bindings for the IlmBase libraries
+Summary(pl.UTF-8):	Wiązania Pythona 3 do bibliotek IlmBase
+Group:		Libraries/Python
+Requires:	ilmbase = %{version}-%{release}
+
+%description -n python3-pyilmbase
+The PyIlmBase package provides python bindings for the IlmBase
+libraries.
+
+%description -n python3-pyilmbase -l pl.UTF-8
+Pakiet PyIlmBase dostarcza wiązania Pythona do bibliotek IlmBase.
+
+%package -n python3-pyilmbase-devel
+Summary:	Development files for IlmBase Python 3 bindings
+Summary(pl.UTF-8):	Pliki programistyczne wiązań IlmBase do Pythona 3
+Group:		Development/Libraries
+Requires:	pyilmbase-devel = %{version}-%{release}
+Requires:	python3-devel >= 1:3.2
+Requires:	python3-pyilmbase = %{version}-%{release}
+
+%description -n python3-pyilmbase-devel
+Development files for IlmBase Python 3 bindings.
+
+%description -n python3-pyilmbase-devel -l pl.UTF-8
+Pliki programistyczne wiązań IlmBase do Pythona 3.
+
 %prep
 %setup -q -n openexr-%{version}
+%patch0 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__automake}
-%configure
+install -d build
+cd build
+%cmake .. \
+	-DILMBASE_BUILD_BOTH_STATIC_SHARED=ON \
+	-DOPENEXR_BUILD_BOTH_STATIC_SHARED=ON \
+	-DPYILMBASE_OVERRIDE_PYTHON2_INSTALL_DIR=%{py_sitedir} \
+	-DPYILMBASE_OVERRIDE_PYTHON3_INSTALL_DIR=%{py3_sitedir}
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 %clean
@@ -110,32 +278,42 @@ rm -rf $RPM_BUILD_ROOT
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
+%post	-n ilmbase -p /sbin/ldconfig
+%postun	-n ilmbase -p /sbin/ldconfig
+
+%post	-n python-pyilmbase -p /sbin/ldconfig
+%postun	-n python-pyilmbase -p /sbin/ldconfig
+
+%post	-n python3-pyilmbase -p /sbin/ldconfig
+%postun	-n python3-pyilmbase -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog LICENSE PATENTS README.md
-%attr(755,root,root) %{_libdir}/libIlmImf-2_3.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libIlmImf-2_3.so.24
-%attr(755,root,root) %{_libdir}/libIlmImfUtil-2_3.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libIlmImfUtil-2_3.so.24
+%doc CHANGES.md CONTRIBUTORS.md GOVERNANCE.md LICENSE.md README.md SECURITY.md OpenEXR/PATENTS
+%attr(755,root,root) %{_libdir}/libIlmImf-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libIlmImf-2_4.so.24
+%attr(755,root,root) %{_libdir}/libIlmImfUtil-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libIlmImfUtil-2_4.so.24
 
 %files devel
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libIlmImf-2_4.so
 %attr(755,root,root) %{_libdir}/libIlmImf.so
+%attr(755,root,root) %{_libdir}/libIlmImfUtil-2_4.so
 %attr(755,root,root) %{_libdir}/libIlmImfUtil.so
-%{_libdir}/libIlmImf.la
-%{_libdir}/libIlmImfUtil.la
 %{_includedir}/OpenEXR/Imf*.h
 %{_includedir}/OpenEXR/OpenEXRConfig.h
-%{_aclocaldir}/openexr.m4
 %{_pkgconfigdir}/OpenEXR.pc
+%{_libdir}/cmake/OpenEXR
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/libIlmImf.a
-%{_libdir}/libIlmImfUtil.a
+%{_libdir}/libIlmImf-2_4_static.a
+%{_libdir}/libIlmImfUtil-2_4_static.a
 
 %files progs
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/exr2aces
 %attr(755,root,root) %{_bindir}/exrenvmap
 %attr(755,root,root) %{_bindir}/exrheader
 %attr(755,root,root) %{_bindir}/exrmakepreview
@@ -146,4 +324,91 @@ rm -rf $RPM_BUILD_ROOT
 
 %files doc
 %defattr(644,root,root,755)
-%doc doc/*.pdf
+%doc OpenEXR/doc/*.pdf
+
+%files -n ilmbase
+%defattr(644,root,root,755)
+%doc IlmBase/README.md
+%attr(755,root,root) %{_libdir}/libHalf-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libHalf-2_4.so.24
+%attr(755,root,root) %{_libdir}/libIex-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libIex-2_4.so.24
+%attr(755,root,root) %{_libdir}/libIexMath-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libIexMath-2_4.so.24
+%attr(755,root,root) %{_libdir}/libIlmThread-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libIlmThread-2_4.so.24
+%attr(755,root,root) %{_libdir}/libImath-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libImath-2_4.so.24
+
+%files -n ilmbase-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libHalf-2_4.so
+%attr(755,root,root) %{_libdir}/libHalf.so
+%attr(755,root,root) %{_libdir}/libIex-2_4.so
+%attr(755,root,root) %{_libdir}/libIex.so
+%attr(755,root,root) %{_libdir}/libIexMath-2_4.so
+%attr(755,root,root) %{_libdir}/libIexMath.so
+%attr(755,root,root) %{_libdir}/libIlmThread-2_4.so
+%attr(755,root,root) %{_libdir}/libIlmThread.so
+%attr(755,root,root) %{_libdir}/libImath-2_4.so
+%attr(755,root,root) %{_libdir}/libImath.so
+%dir %{_includedir}/OpenEXR
+%{_includedir}/OpenEXR/Iex*.h
+%{_includedir}/OpenEXR/IlmBaseConfig.h
+%{_includedir}/OpenEXR/IlmThread*.h
+%{_includedir}/OpenEXR/Imath*.h
+%{_includedir}/OpenEXR/half*.h
+%{_pkgconfigdir}/IlmBase.pc
+%{_libdir}/cmake/IlmBase
+
+%files -n ilmbase-static
+%defattr(644,root,root,755)
+%{_libdir}/libHalf-2_4_static.a
+%{_libdir}/libIex-2_4_static.a
+%{_libdir}/libIexMath-2_4_static.a
+%{_libdir}/libIlmThread-2_4_static.a
+%{_libdir}/libImath-2_4_static.a
+
+%files -n openexr_viewers
+%defattr(644,root,root,755)
+%doc OpenEXR_Viewers/README.md
+%attr(755,root,root) %{_bindir}/exrdisplay
+%if %{with cg}
+%attr(755,root,root) %{_bindir}/playexr
+%endif
+
+%files -n pyilmbase-devel
+%defattr(644,root,root,755)
+%{_includedir}/OpenEXR/PyIex*.h
+%{_includedir}/OpenEXR/PyImath*.h
+%{_libdir}/cmake/PyIlmBase
+
+%files -n python-pyilmbase
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libPyIex_Python2_*-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libPyIex_Python2_*-2_4.so.24
+%attr(755,root,root) %{_libdir}/libPyImath_Python2_*-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libPyImath_Python2_*-2_4.so.24
+%attr(755,root,root) %{py_sitedir}/iex.so
+%attr(755,root,root) %{py_sitedir}/imath.so
+%attr(755,root,root) %{py_sitedir}/imathnumpy.so
+
+%files -n python-pyilmbase-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libPyIex_Python2_*.so
+%attr(755,root,root) %{_libdir}/libPyImath_Python2_*.so
+
+%files -n python3-pyilmbase
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libPyIex_Python3_*-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libPyIex_Python3_*-2_4.so.24
+%attr(755,root,root) %{_libdir}/libPyImath_Python3_*-2_4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libPyImath_Python3_*-2_4.so.24
+%attr(755,root,root) %{py3_sitedir}/iex.so
+%attr(755,root,root) %{py3_sitedir}/imath.so
+%attr(755,root,root) %{py3_sitedir}/imathnumpy.so
+
+%files -n python3-pyilmbase-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libPyIex_Python3_*.so
+%attr(755,root,root) %{_libdir}/libPyImath_Python3_*.so
diff --git a/OpenEXR-python-install.patch b/OpenEXR-python-install.patch
new file mode 100644
index 0000000..c13579b
--- /dev/null
+++ b/OpenEXR-python-install.patch
@@ -0,0 +1,35 @@
+--- openexr-2.4.3/PyIlmBase/PyImathNumpy/CMakeLists.txt.orig	2021-05-17 04:53:08.000000000 +0200
++++ openexr-2.4.3/PyIlmBase/PyImathNumpy/CMakeLists.txt	2023-03-12 15:55:54.058380105 +0100
+@@ -24,6 +24,7 @@ if(TARGET Python2::Python AND
+     LIBRARY_OUTPUT_NAME "imathnumpy"
+     DEBUG_POSTFIX ""
+   )
++  install(TARGETS imathnumpy_python2 DESTINATION ${PYILMBASE_OVERRIDE_PYTHON2_INSTALL_DIR})
+ endif()
+ 
+ if(TARGET Python3::Python AND
+@@ -49,4 +50,5 @@ if(TARGET Python3::Python AND
+     LIBRARY_OUTPUT_NAME "imathnumpy"
+     DEBUG_POSTFIX ""
+   )
++  install(TARGETS imathnumpy_python3 DESTINATION ${PYILMBASE_OVERRIDE_PYTHON3_INSTALL_DIR})
+ endif()
+--- openexr-2.4.3/PyIlmBase/config/ModuleDefine.cmake.orig	2021-05-17 04:53:08.000000000 +0200
++++ openexr-2.4.3/PyIlmBase/config/ModuleDefine.cmake	2023-03-12 17:10:36.214098183 +0100
+@@ -126,7 +126,7 @@ function(PYILMBASE_DEFINE_MODULE modname
+       LIBRARY_OUTPUT_NAME "${modname}"
+       DEBUG_POSTFIX ""
+     )
+-    install(TARGETS ${modname}_python2 DESTINATION ${PyIlmBase_Python2_SITEARCH_REL})
++    install(TARGETS ${modname}_python2 DESTINATION ${PYILMBASE_OVERRIDE_PYTHON2_INSTALL_DIR})
+   endif()
+ 
+   if(TARGET Python3::Python AND TARGET Boost::${PYILMBASE_BOOST_PY3_COMPONENT})
+@@ -153,6 +153,6 @@ function(PYILMBASE_DEFINE_MODULE modname
+       LIBRARY_OUTPUT_NAME "${modname}"
+       DEBUG_POSTFIX ""
+     )
+-    install(TARGETS ${modname}_python3 DESTINATION ${PyIlmBase_Python3_SITEARCH_REL})
++    install(TARGETS ${modname}_python3 DESTINATION ${PYILMBASE_OVERRIDE_PYTHON3_INSTALL_DIR})
+   endif()
+ endfunction()
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/OpenEXR.git/commitdiff/01f928a4c9d49d0bb700df65555160b57e2933b4



More information about the pld-cvs-commit mailing list