diff --git a/ilmbase-1.0.3-pkgconfig.patch b/ilmbase-1.0.3-pkgconfig.patch new file mode 100644 index 0000000..bbc704f --- /dev/null +++ b/ilmbase-1.0.3-pkgconfig.patch @@ -0,0 +1,8 @@ +diff -up ilmbase-1.0.3/IlmBase.pc.in.pkgconfig ilmbase-1.0.3/IlmBase.pc.in +--- ilmbase-1.0.3/IlmBase.pc.in.pkgconfig 2012-07-17 18:27:25.000000000 -0500 ++++ ilmbase-1.0.3/IlmBase.pc.in 2012-09-08 11:11:15.913468312 -0500 +@@ -9,3 +9,4 @@ Description: Base math and exception lib + Version: @ILMBASE_VERSION@ + Libs: -L${libdir} -lImath -lHalf -lIex -lIexMath -lIlmThread @PTHREAD_LIBS@ + Cflags: @PTHREAD_CFLAGS@ -I${OpenEXR_includedir} ++Requires.private: gl glu diff --git a/ilmbase-2.2.0-glibc_iszero.patch b/ilmbase-2.2.0-glibc_iszero.patch new file mode 100644 index 0000000..16f303c --- /dev/null +++ b/ilmbase-2.2.0-glibc_iszero.patch @@ -0,0 +1,93 @@ +diff -up ilmbase-2.2.0/Imath/ImathFun.h.glibc_iszero ilmbase-2.2.0/Imath/ImathFun.h +--- ilmbase-2.2.0/Imath/ImathFun.h.glibc_iszero 2014-08-09 21:03:39.000000000 -0500 ++++ ilmbase-2.2.0/Imath/ImathFun.h 2016-10-16 09:43:04.514932845 -0500 +@@ -132,7 +132,7 @@ cmpt (T a, T b, T t) + + template + inline bool +-iszero (T a, T t) ++(iszero) (T a, T t) + { + return (IMATH_INTERNAL_NAMESPACE::abs (a) <= t) ? 1 : 0; + } +diff -up ilmbase-2.2.0/ImathTest/testFrustum.cpp.glibc_iszero ilmbase-2.2.0/ImathTest/testFrustum.cpp +--- ilmbase-2.2.0/ImathTest/testFrustum.cpp.glibc_iszero 2014-08-09 21:03:40.000000000 -0500 ++++ ilmbase-2.2.0/ImathTest/testFrustum.cpp 2016-10-16 09:44:45.466666479 -0500 +@@ -88,10 +88,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES + IMATH_INTERNAL_NAMESPACE::V3f pt = (! ortho) ? o : + IMATH_INTERNAL_NAMESPACE::V3f (0.0f, frustum.top(), 0.0f); + float d = planes0[0].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + pt = pt * mView; + d = planes[0].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + + IMATH_INTERNAL_NAMESPACE::V3f right = IMATH_INTERNAL_NAMESPACE::V3f(1, 0, 0); + assert ((right ^ planes0[1].normal) > 0.0); +@@ -101,10 +101,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES + pt = (! ortho) ? o : + IMATH_INTERNAL_NAMESPACE::V3f (frustum.right(), 0.0f, 0.0f); + d = planes0[1].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + pt = pt * mView; + d = planes[1].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + + IMATH_INTERNAL_NAMESPACE::V3f down = IMATH_INTERNAL_NAMESPACE::V3f(0, -1, 0); + assert ((down ^ planes0[2].normal) > 0.0); +@@ -114,10 +114,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES + pt = (! ortho) ? o : + IMATH_INTERNAL_NAMESPACE::V3f (0.0f, frustum.bottom(), 0.0f); + d = planes0[2].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + pt = pt * mView; + d = planes[2].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + + IMATH_INTERNAL_NAMESPACE::V3f left = IMATH_INTERNAL_NAMESPACE::V3f(-1, 0, 0); + assert ((left ^ planes0[3].normal) > 0.0); +@@ -127,10 +127,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES + pt = (! ortho) ? o : + IMATH_INTERNAL_NAMESPACE::V3f (frustum.left(), 0.0f, 0.0f); + d = planes0[3].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + pt = pt * mView; + d = planes[3].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + + IMATH_INTERNAL_NAMESPACE::V3f front = IMATH_INTERNAL_NAMESPACE::V3f(0, 0, 1); + assert ((front ^ planes0[4].normal) > 0.0); +@@ -139,10 +139,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES + + pt = IMATH_INTERNAL_NAMESPACE::V3f (0.0f, 0.0f, -frustum.nearPlane()); + d = planes0[4].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + pt = pt * mView; + d = planes[4].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + + IMATH_INTERNAL_NAMESPACE::V3f back = IMATH_INTERNAL_NAMESPACE::V3f(0, 0, -1); + assert ((back ^ planes0[5].normal) > 0.0); +@@ -151,10 +151,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES + + pt = IMATH_INTERNAL_NAMESPACE::V3f (0.0f, 0.0f, -frustum.farPlane()); + d = planes0[5].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + pt = pt * mView; + d = planes[5].distanceTo (pt); +- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps)); ++ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps)); + } + } + } diff --git a/ilmbase-2.2.0-no_undefined.patch b/ilmbase-2.2.0-no_undefined.patch new file mode 100644 index 0000000..d641907 --- /dev/null +++ b/ilmbase-2.2.0-no_undefined.patch @@ -0,0 +1,24 @@ +diff -up ilmbase-2.2.0/IlmThread/Makefile.am.no_undefined ilmbase-2.2.0/IlmThread/Makefile.am +--- ilmbase-2.2.0/IlmThread/Makefile.am.no_undefined 2014-08-09 21:03:38.000000000 -0500 ++++ ilmbase-2.2.0/IlmThread/Makefile.am 2014-11-20 07:44:27.913588030 -0600 +@@ -14,7 +14,7 @@ libIlmThread_la_LDFLAGS = -version-info + if LIB_SUFFIX_EXISTS + libIlmThread_la_LDFLAGS += -release @LIB_SUFFIX@ + endif +-libIlmThread_la_LIBADD = ../Iex/libIex.la ++libIlmThread_la_LIBADD = ../Iex/libIex.la $(PTHREAD_LIBS) + + libIlmThreadincludedir = $(includedir)/OpenEXR + +diff -up ilmbase-2.2.0/IlmThread/Makefile.in.no_undefined ilmbase-2.2.0/IlmThread/Makefile.in +--- ilmbase-2.2.0/IlmThread/Makefile.in.no_undefined 2014-08-09 23:37:24.000000000 -0500 ++++ ilmbase-2.2.0/IlmThread/Makefile.in 2014-11-20 07:44:27.914587968 -0600 +@@ -251,7 +251,7 @@ libIlmThread_la_SOURCES = IlmThreadPool. + + libIlmThread_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ \ + -no-undefined $(am__append_1) +-libIlmThread_la_LIBADD = ../Iex/libIex.la ++libIlmThread_la_LIBADD = ../Iex/libIex.la $(PTHREAD_LIBS) + libIlmThreadincludedir = $(includedir)/OpenEXR + libIlmThreadinclude_HEADERS = IlmThreadPool.h IlmThread.h \ + IlmThreadSemaphore.h IlmThreadMutex.h \ diff --git a/ilmbase-2.2.0.tar.gz b/ilmbase-2.2.0.tar.gz deleted file mode 100644 index 197f1e0..0000000 Binary files a/ilmbase-2.2.0.tar.gz and /dev/null differ diff --git a/ilmbase-2.3.0.tar.gz b/ilmbase-2.3.0.tar.gz new file mode 100644 index 0000000..030b6b6 Binary files /dev/null and b/ilmbase-2.3.0.tar.gz differ diff --git a/ilmbase-config.h b/ilmbase-config.h new file mode 100644 index 0000000..eaa5b05 --- /dev/null +++ b/ilmbase-config.h @@ -0,0 +1,10 @@ +#include + +#if __WORDSIZE == 32 +#include "IlmBaseConfig-32.h" +#elif __WORDSIZE == 64 +#include "IlmBaseConfig-64.h" +#else +#error "Unknown word size" +#endif + diff --git a/ilmbase.spec b/ilmbase.spec index e40e1a9..a82ad1e 100644 --- a/ilmbase.spec +++ b/ilmbase.spec @@ -1,15 +1,22 @@ Name: ilmbase Summary: "Half" precision HDR file format libraries for OpenEXR -Version: 2.2.0 -Release: 16 +Version: 2.3.0 +Release: 1 License: BSD URL: http://www.openexr.com/ -Source0: http://download.savannah.nongnu.org/releases/openexr/ilmbase-%{version}.tar.gz -BuildRequires: gcc-c++ pkgconfig pkgconfig(gl) pkgconfig(glu) +Source0: https://github.com/openexr/openexr/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source1: ilmbase-config.h +BuildRequires: gcc-c++ pkgconfig pkgconfig(gl) pkgconfig(glu) make -# This workaroud patch should no longer be used with glibc-2.24.90-12.fc26 or later version,see: +## upstreamable patches +# explicitly add $(PTHREAD_LIBS) to libIlmThread linkage (helps PTHREAD_LIBS workaround in %%build) +Patch0001: ilmbase-2.2.0-no_undefined.patch +# add Requires.private: gl glu to IlmBase.pc +Patch0002: ilmbase-1.0.3-pkgconfig.patch +# workaround glibc iszero macro # https://bugzilla.redhat.com/show_bug.cgi?id=1383552 -# Patch0002: ilmbase-2.2.0-glibc_iszero.patch +Patch0003: ilmbase-2.2.0-glibc_iszero.patch + %description Half is a C++ class that encapsulates the ilm 16-bit floating-point format. @@ -34,14 +41,22 @@ This package contains headers and libraries for developing apps that use ilmbase %make_install %delete_la +# Fix multilibs header conflict +%ifarch x86_64 +%ifarch x86_64 +mv %{buildroot}%{_includedir}/OpenEXR/IlmBaseConfig.h \ + %{buildroot}%{_includedir}/OpenEXR/IlmBaseConfig-64.h +%else +mv %{buildroot}%{_includedir}/OpenEXR/IlmBaseConfig.h \ + %{buildroot}%{_includedir}/OpenEXR/IlmBaseConfig-32.h +%endif +install -pm 0644 %{SOURCE1} %{buildroot}%{_includedir}/OpenEXR/IlmBaseConfig.h +%endif + + %check export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig test "$(pkg-config --modversion IlmBase)" = "%{version}" -%ifarch %{ix86} -%make_build check -k ||: -%else -%make_build check -%endif %post /sbin/ldconfig @@ -50,9 +65,9 @@ test "$(pkg-config --modversion IlmBase)" = "%{version}" /sbin/ldconfig %files -%doc AUTHORS ChangeLog NEWS README -%license COPYING -%{_libdir}/lib*.so.12* +%doc AUTHORS ChangeLog NEWS README.md +%license LICENSE +%{_libdir}/lib*.so.24* %files devel %{_includedir}/OpenEXR/ @@ -60,5 +75,8 @@ test "$(pkg-config --modversion IlmBase)" = "%{version}" %{_libdir}/pkgconfig/IlmBase.pc %changelog +* Thu Jun 15 2023 chenchen - 2.3.0-1 +- Upgrade to version 2.3.0 + * Tue Feb 18 2020 xuxijian - 2.2.0-16 - Package init