Hello community, here is the log from the commit of package ilmbase for openSUSE:Factory checked in at 2017-08-21 11:35:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ilmbase (Old) and /work/SRC/openSUSE:Factory/.ilmbase.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ilmbase" Mon Aug 21 11:35:29 2017 rev:13 rq:516763 version:2.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ilmbase/ilmbase.changes 2015-01-30 23:57:10.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ilmbase.new/ilmbase.changes 2017-08-21 11:35:30.759085102 +0200 @@ -1,0 +2,14 @@ +Sat Aug 12 21:52:23 UTC 2017 - [email protected] + +- Fix RPM groups. Diversify summaries. +- Drop useless --with-pic, this is only for static libs. + +------------------------------------------------------------------- +Wed Aug 9 01:26:21 CEST 2017 - [email protected] + +- simplify check section in specfile and remove hack for gcc45 +- add patches from debian to allow testsuite to pass + - testBox.patch allow fuzzy comparison of floats, doubles + - testBoxAlgo.patch allow fuzzy match of b12 == b2 + +------------------------------------------------------------------- New: ---- testBox.patch testBoxAlgo.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ilmbase.spec ++++++ --- /var/tmp/diff_new_pack.SLLjaJ/_old 2017-08-21 11:35:31.742946734 +0200 +++ /var/tmp/diff_new_pack.SLLjaJ/_new 2017-08-21 11:35:31.750945608 +0200 @@ -1,7 +1,7 @@ # # spec file for package ilmbase # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,10 @@ Source2: baselibs.conf # https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=openexr&download=1 Source3: ilmbase.keyring +#PATCH-FIX-OPENSUSE: testBox.patch allow fuzzy comparison of floats, doubles +Patch0: testBox.patch +#PATCH-FIX-OPENSUSE: testBoxAlgo.patch allow fuzzy match of b12 == b2 +Patch1: testBoxAlgo.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -63,9 +67,9 @@ Requires: libImath%{so_suffix} Requires: libstdc++-devel Summary: Base library for ILM software (OpenEXR) +# Renamed to libilmbase6 to met the Shared Library Policy License: BSD-3-Clause and GPL-2.0+ Group: Development/Libraries/C and C++ -# Renamed to libilmbase6 to met the Shared Library Policy Obsoletes: IlmBase-devel <= 1.0.1 Provides: IlmBase-devel = %{version} Obsoletes: libilmbase-devel <= 1.0.2 @@ -87,9 +91,9 @@ %_libdir/pkgconfig/IlmBase.pc %package -n libHalf12 -Summary: Base library for ILM software (OpenEXR) +Summary: 16-bit floating-point encapsulation class for OpenEXR License: BSD-3-Clause -Group: Development/Libraries/C and C++ +Group: System/Libraries %description -n libHalf12 %{summary}. @@ -103,9 +107,9 @@ %{_libdir}/libHalf.so.* %package -n libIexMath%{so_suffix} -Summary: Base library for ILM software (OpenEXR) +Summary: Exception-based vector/matrix library for OpenEXR License: BSD-3-Clause -Group: Development/Libraries/C and C++ +Group: System/Libraries %description -n libIexMath%{so_suffix} %{summary}. @@ -119,9 +123,9 @@ %{_libdir}/libIexMath*.so.* %package -n libIex%{so_suffix} -Summary: Base library for ILM software (OpenEXR) +Summary: Exception handling library for OpenEXR License: BSD-3-Clause -Group: Development/Libraries/C and C++ +Group: System/Libraries %description -n libIex%{so_suffix} %{summary}. @@ -135,9 +139,9 @@ %{_libdir}/libIex-*.so.* %package -n libIlmThread%{so_suffix} -Summary: Base library for ILM software (OpenEXR) +Summary: Thread abstraction library for OpenEXR License: BSD-3-Clause -Group: Development/Libraries/C and C++ +Group: System/Libraries %description -n libIlmThread%{so_suffix} %{summary}. @@ -151,9 +155,9 @@ %{_libdir}/libIlmThread*.so.* %package -n libImath%{so_suffix} -Summary: Base library for ILM software (OpenEXR) +Summary: Vector/matrix library for OpenEXR License: BSD-3-Clause -Group: Development/Libraries/C and C++ +Group: System/Libraries %description -n libImath%{so_suffix} %{summary}. @@ -168,6 +172,8 @@ %prep %setup -q +%patch0 -p1 +%patch1 -p1 # remove a non unix READMEs rm README.win32 @@ -175,7 +181,7 @@ %build ./bootstrap export PTHREAD_LIBS="-lpthread" -%configure --disable-static --with-pic +%configure --disable-static make %{?_smp_mflags} %install @@ -183,10 +189,6 @@ rm -f %{buildroot}%{_libdir}/*.la %check -#XXX: workaround for a build fail with gcc45 with -02 on i586 -%ifarch %ix86 -make CXXFLAGS="`echo "%{optflags}" | sed 's/O2/O1/'`" check -%endif make check %changelog ++++++ testBox.patch ++++++ Subject: testBox: allow fuzzy comparison of floats, doubles From: Steven Chamberlain <[email protected]> Date: Wed, 24 Feb 2016 01:10:11 +0000 Allow for inexact values, as long as the error is smaller than the epsilon of the data type. On 32-bit x86, allow even greater discrepency at double precision, due to possible double-rounding. See https://lists.nongnu.org/archive/html/openexr-devel/2015-12/msg00001.html Index: ilmbase/ImathTest/testBox.cpp =================================================================== --- ilmbase.orig/ImathTest/testBox.cpp +++ ilmbase/ImathTest/testBox.cpp @@ -47,6 +47,58 @@ using namespace IMATH_INTERNAL_NAMESPACE namespace { +template <class T> +bool +approximatelyEqual (const T &p1, const T &p2) +{ + /* int and short should be exact */ + return (p1 == p2); +} + +bool +approximatelyEqual (const Vec2<float> &p1, const Vec2<float> &p2) +{ + float e = limits<float>::epsilon(); + float m = 0; + + for (int i = 0; i < 2; ++i) + { + m = max (m, abs (p1[i])); + m = max (m, abs (p2[i])); + } + + for (int i = 0; i < 2; ++i) + if (!equalWithAbsError (p1[i], p2[i], m * e)) + return false; + + return true; +} + +bool +approximatelyEqual (const Vec2<double> &p1, const Vec2<double> &p2) +{ +#if defined(__i386__) || defined(_M_IX86) + /* double-rounding on 32-bit x86 may cause larger error: + use epsilon of float rather than double */ + double e = limits<float>::epsilon(); +#else + double e = limits<double>::epsilon(); +#endif + double m = 0; + + for (int i = 0; i < 2; ++i) + { + m = max (m, abs (p1[i])); + m = max (m, abs (p2[i])); + } + + for (int i = 0; i < 2; ++i) + if (!equalWithAbsError (p1[i], p2[i], m * e)) + return false; + + return true; +} + // // Test case generation utility - create a vector of IMATH_INTERNAL_NAMESPACE::Vec{2,3,4} // with all permutations of integers 1..T::dimensions(). @@ -250,7 +302,8 @@ testExtendByPoint(const char *type) IMATH_INTERNAL_NAMESPACE::Box<T> b; b.extendBy(p); - assert(b.min == p && b.max == p); + assert (approximatelyEqual (b.min, p)); + assert (approximatelyEqual (b.max, p)); } // @@ -283,7 +336,8 @@ testExtendByPoint(const char *type) b.extendBy(p); - assert(b.min == min && b.max == max); + assert (approximatelyEqual (b.min, min)); + assert (approximatelyEqual (b.max, max)); } } } @@ -358,7 +412,8 @@ testExtendByBox(const char *type) } b.extendBy(IMATH_INTERNAL_NAMESPACE::Box<T>(p0, p1)); - assert(b.min == min && b.max == max); + assert (approximatelyEqual (b.min, min)); + assert (approximatelyEqual (b.max, max)); } } } ++++++ testBoxAlgo.patch ++++++ Subject: testBoxAlgo: allow fuzzy match of b12 == b2 From: Steven Chamberlain <[email protected]> Date: Wed, 24 Feb 2016 01:04:11 +0000 Also fix a pre-existing typo. Index: ilmbase/ImathTest/testBoxAlgo.cpp =================================================================== --- ilmbase.orig/ImathTest/testBoxAlgo.cpp +++ ilmbase/ImathTest/testBoxAlgo.cpp @@ -886,10 +886,11 @@ boxMatrixTransform () assert (approximatelyEqual (b2.min, b4.min, e)); assert (approximatelyEqual (b2.max, b4.max, e)); - assert (approximatelyEqual (b3.max, b4.max, e)); + assert (approximatelyEqual (b3.min, b4.min, e)); assert (approximatelyEqual (b3.max, b4.max, e)); - assert (b21 == b2); + assert (approximatelyEqual (b2.min, b21.min, e)); + assert (approximatelyEqual (b2.max, b21.max, e)); assert (b31 == b3); M[0][3] = 1;
