Date: Tue, 18 May 2021 17:17:09 GMT From: Matthias Andree <mandree@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 5ff95b962e88 - main - math/Imath: update to 3.0.2 Message-ID: <202105181717.14IHH9jZ050937@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=5ff95b962e88c8cdfd37855f9fc9d20229227d45 commit 5ff95b962e88c8cdfd37855f9fc9d20229227d45 Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2021-05-18 17:02:06 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2021-05-18 17:11:12 +0000 math/Imath: update to 3.0.2 removes patches cherry-picked from post-3.0.1 upstream Changelog: https://github.com/AcademySoftwareFoundation/Imath/releases/tag/v3.0.2 --- math/Imath/Makefile | 5 +- math/Imath/distinfo | 6 +- math/Imath/files/patch-1c8a010f9 | 49 ----------- math/Imath/files/patch-6ddc8294f | 183 --------------------------------------- math/Imath/pkg-plist | 8 +- 5 files changed, 9 insertions(+), 242 deletions(-) diff --git a/math/Imath/Makefile b/math/Imath/Makefile index 734e1a9770d9..0e2abc523b6f 100644 --- a/math/Imath/Makefile +++ b/math/Imath/Makefile @@ -1,8 +1,7 @@ # Based on the graphics/ilmbase port that was done by: nork@FreeBSD.org PORTNAME= Imath -PORTVERSION= 3.0.1 -PORTREVISION= 1 +PORTVERSION= 3.0.2 CATEGORIES= math devel graphics MAINTAINER= mandree@FreeBSD.org @@ -41,7 +40,7 @@ PYTHON_USES= python PYTHON_CMAKE_BOOL= PYTHON _MAJORVER= 3_0 -_VER= 27 +_VER= 28 _MINVER= 0 _PLVER= 0 diff --git a/math/Imath/distinfo b/math/Imath/distinfo index bf17cc48430c..d58c15600001 100644 --- a/math/Imath/distinfo +++ b/math/Imath/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1618044321 -SHA256 (AcademySoftwareFoundation-Imath-3.0.1-v3.0.1_GH0.tar.gz) = 9cd984bb6b0a9572dd4a373b1fab60bc4c992a52ec5c68328fe0f48f194ba3c0 -SIZE (AcademySoftwareFoundation-Imath-3.0.1-v3.0.1_GH0.tar.gz) = 527715 +TIMESTAMP = 1621270930 +SHA256 (AcademySoftwareFoundation-Imath-3.0.2-v3.0.2_GH0.tar.gz) = 85c9939390afd33e93e7bea9c2b8e5dcd37958daa5d70214c58e9b00320ebf29 +SIZE (AcademySoftwareFoundation-Imath-3.0.2-v3.0.2_GH0.tar.gz) = 528309 diff --git a/math/Imath/files/patch-1c8a010f9 b/math/Imath/files/patch-1c8a010f9 deleted file mode 100644 index d360dfcc1589..000000000000 --- a/math/Imath/files/patch-1c8a010f9 +++ /dev/null @@ -1,49 +0,0 @@ -From 1c8a010f9c48fb9c8dd5330337936802c3dee2bd Mon Sep 17 00:00:00 2001 -From: Larry Gritz <lg@larrygritz.com> -Date: Thu, 15 Apr 2021 17:41:11 -0700 -Subject: [PATCH] Don't impose C++14 on downstream projects (#137) - -We were setting - - target_compile_features(${objlib} PUBLIC cxx_std_${IMATH_CXX_STANDARD}) - -The PUBLIC forced downstream projects that consume the -ImathConfig*.cmake exports to use C++ standard at least as recent as -what Imath used to build (which defaults to 14). - -But this is unnecessary. There's nothing in Imath's headers that -requires anything beyond C++11. So this patch uses a more fine-grained -setting of target properties to express this more correctly. Now it -will be fine for a C++11 project to consume Imath (via its exported -configs) even if that Imath happened to be built with C++14. - -This change is exactly the same as -https://github.com/AcademySoftwareFoundation/openexr/pull/995 - -Signed-off-by: Larry Gritz <lg@larrygritz.com> ---- - config/LibraryDefine.cmake | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/config/LibraryDefine.cmake b/config/LibraryDefine.cmake -index 7770d71..faf430e 100644 ---- a/config/LibraryDefine.cmake -+++ b/config/LibraryDefine.cmake -@@ -14,7 +14,16 @@ function(IMATH_DEFINE_LIBRARY libname) - ${IMATH_CURLIB_HEADERS} - ${IMATH_CURLIB_SOURCES}) - -- target_compile_features(${objlib} PUBLIC cxx_std_${IMATH_CXX_STANDARD}) -+ # Use ${IMATH_CXX_STANDARD} to determine the standard we use to compile -+ # Imath itself. But the headers only require C++11 features, so that's -+ # all we need to pass on as interface reqirements to downstream projects. -+ # For example, it's fine for an Imath built with C++14 to be called from -+ # an app that is compiled with C++11; Imath needn't force the app to -+ # also use C++14. -+ target_compile_features(${objlib} -+ PRIVATE cxx_std_${IMATH_CXX_STANDARD} -+ INTERFACE cxx_std_11 ) -+ - if(IMATH_CURLIB_PRIV_EXPORT AND BUILD_SHARED_LIBS) - target_compile_definitions(${objlib} PRIVATE ${IMATH_CURLIB_PRIV_EXPORT}) - if(WIN32) diff --git a/math/Imath/files/patch-6ddc8294f b/math/Imath/files/patch-6ddc8294f deleted file mode 100644 index eeaeae4d0e88..000000000000 --- a/math/Imath/files/patch-6ddc8294f +++ /dev/null @@ -1,183 +0,0 @@ -From 6ddc8294f319dfd6ac27b511f65f5900f819eca5 Mon Sep 17 00:00:00 2001 -From: Cary Phillips <cary@ilm.com> -Date: Fri, 7 May 2021 14:27:47 -0700 -Subject: [PATCH] Fix regression in succf()/predf() (#140) - -And add more thorough test. - -Signed-off-by: Cary Phillips <cary@ilm.com> ---- - src/Imath/ImathFun.cpp | 4 +- - src/ImathTest/testFun.cpp | 86 +++++++++++++++++++++++++++++---------- - 2 files changed, 67 insertions(+), 23 deletions(-) - -diff --git a/src/Imath/ImathFun.cpp b/src/Imath/ImathFun.cpp -index 62ecadf..793927c 100644 ---- a/src/Imath/ImathFun.cpp -+++ b/src/Imath/ImathFun.cpp -@@ -27,7 +27,7 @@ succf (float f) noexcept - - u.i = 0x00000001; - } -- else if (u.i > 0) -+ else if (u.f > 0) - { - // Positive float, normalized or denormalized. - // Incrementing the largest positive float -@@ -65,7 +65,7 @@ predf (float f) noexcept - - u.i = 0x80000001; - } -- else if (u.i > 0) -+ else if (u.f > 0) - { - // Positive float, normalized or denormalized. - -diff --git a/src/ImathTest/testFun.cpp b/src/ImathTest/testFun.cpp -index abb2bd3..56db842 100644 ---- a/src/ImathTest/testFun.cpp -+++ b/src/ImathTest/testFun.cpp -@@ -8,6 +8,10 @@ - #endif - - #include "ImathFun.h" -+#if __cplusplus >= 202002L -+# include <bit> -+#endif -+#include <iostream> - #include <assert.h> - #include <iostream> - #include <stdio.h> -@@ -18,16 +22,32 @@ using namespace std; - #if ULONG_MAX == 18446744073709551615LU - typedef long unsigned int Int64; - #else --typedef long long unsigned int Int64; -+ typedef long long unsigned int Int64; -+#endif -+ -+#if __cplusplus < 202002L -+ template <typename To, typename From> -+ static inline To -+ bit_cast (From from) -+ { -+ static_assert (sizeof (From) == sizeof (To), "Type sizes do not match"); -+ union -+ { -+ From f; -+ To t; -+ } u; -+ u.f = from; -+ return u.t; -+ } - #endif - - void --testf (float f) -+testf (float f, bool changeExpected = true) - { - printf ("\n"); - -- float sf = IMATH_INTERNAL_NAMESPACE::succf (f); -- float pf = IMATH_INTERNAL_NAMESPACE::predf (f); -+ float sf = IMATH_INTERNAL_NAMESPACE::succf (f); -+ float pf = IMATH_INTERNAL_NAMESPACE::predf (f); - float spf = IMATH_INTERNAL_NAMESPACE::succf (IMATH_INTERNAL_NAMESPACE::predf (f)); - float psf = IMATH_INTERNAL_NAMESPACE::predf (IMATH_INTERNAL_NAMESPACE::succf (f)); - -@@ -36,15 +56,29 @@ testf (float f) - printf ("pf %.9g\n", pf); - printf ("spf %.9g\n", spf); - printf ("psf %.9g\n", psf); -+ -+ fflush (stdout); -+ -+ if (changeExpected) -+ { -+ assert (pf < f); -+ assert (f < sf); -+ } -+ else -+ { -+ // No bit change expected if input was inf or NaN -+ assert (bit_cast<unsigned> (pf) == bit_cast<unsigned> (f)); -+ assert (bit_cast<unsigned> (sf) == bit_cast<unsigned> (f)); -+ } - } - - void --testd (double d) -+testd (double d, bool changeExpected = true) - { - printf ("\n"); - -- double sd = IMATH_INTERNAL_NAMESPACE::succd (d); -- double pd = IMATH_INTERNAL_NAMESPACE::predd (d); -+ double sd = IMATH_INTERNAL_NAMESPACE::succd (d); -+ double pd = IMATH_INTERNAL_NAMESPACE::predd (d); - double spd = IMATH_INTERNAL_NAMESPACE::succd (IMATH_INTERNAL_NAMESPACE::predd (d)); - double psd = IMATH_INTERNAL_NAMESPACE::predd (IMATH_INTERNAL_NAMESPACE::succd (d)); - -@@ -53,6 +87,20 @@ testd (double d) - printf ("pd %.18lg\n", pd); - printf ("spd %.18lg\n", spd); - printf ("psd %.18lg\n", psd); -+ -+ fflush (stdout); -+ -+ if (changeExpected) -+ { -+ assert (pd < d); -+ assert (d < sd); -+ } -+ else -+ { -+ // No bit change expected if input was inf or NaN -+ assert (bit_cast<Int64> (pd) == bit_cast<Int64> (d)); -+ assert (bit_cast<Int64> (sd) == bit_cast<Int64> (d)); -+ } - } - - void -@@ -196,15 +244,13 @@ testFun() - testf (7); - testf (0.7); - -- union -- { -- float f; -- int i; -- } u; -+ union {float f; int i;} u; - u.i = 0x7f800000; // inf -- testf (u.f); -+ testf (u.f, false); -+ u.i = 0xff800000; // -inf -+ testf (u.f, false); - u.i = 0x7f800001; // nan -- testf (u.f); -+ testf (u.f, false); - u.i = 0x7f7fffff; // FLT_MAX - testf (u.f); - u.i = 0xff7fffff; // -FLT_MAX -@@ -218,15 +264,13 @@ testFun() - testd (7); - testd (0.7); - -- union -- { -- double d; -- Int64 i; -- } v; -+ union {double d; Int64 i;} v; - v.i = 0x7ff0000000000000ULL; // inf -- testd (v.d); -+ testd (v.d, false); -+ v.i = 0xfff0000000000000ULL; // -inf -+ testd (v.d, false); - v.i = 0x7ff0000000000001ULL; // NAN -- testd (v.d); -+ testd (v.d, false); - v.i = 0x7fefffffffffffffULL; // FLT_MAX - testd (v.d); - v.i = 0xffefffffffffffffULL; // -FLT_MAX diff --git a/math/Imath/pkg-plist b/math/Imath/pkg-plist index c123a91ee9d8..ad3f34a85cef 100644 --- a/math/Imath/pkg-plist +++ b/math/Imath/pkg-plist @@ -38,8 +38,8 @@ lib/cmake/Imath/ImathConfigVersion.cmake lib/cmake/Imath/ImathTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/Imath/ImathTargets.cmake lib/libImath-%%MAJORVER%%.so -lib/libImath-%%MAJORVER%%.so.27 -lib/libImath-%%MAJORVER%%.so.27.0.0 +lib/libImath-%%MAJORVER%%.so.%%VER%% +lib/libImath-%%MAJORVER%%.so.%%VER%%.0.0 lib/libImath.so libdata/pkgconfig/Imath.pc %%PYTHON%%include/Imath/PyImath.h @@ -83,8 +83,8 @@ libdata/pkgconfig/Imath.pc %%PYTHON%%include/Imath/PyImathVecOperators.h %%PYTHON%%lib/cmake/Imath/ImathConfig-%%CMAKE_BUILD_TYPE%%.cmake %%PYTHON%%lib/libPyImath_Python%%PYVER%%-%%MAJORVER%%.so -%%PYTHON%%lib/libPyImath_Python%%PYVER%%-%%MAJORVER%%.so.27 -%%PYTHON%%lib/libPyImath_Python%%PYVER%%-%%MAJORVER%%.so.27.0.0 +%%PYTHON%%lib/libPyImath_Python%%PYVER%%-%%MAJORVER%%.so.%%VER%% +%%PYTHON%%lib/libPyImath_Python%%PYVER%%-%%MAJORVER%%.so.%%VER%%.0.0 %%PYTHON%%%%PYTHON_SITELIBDIR%%/imath.so %%PYTHON%%%%PYTHON_SITELIBDIR%%/imathnumpy.so %%PYTHON%%libdata/pkgconfig/PyImath.pc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105181717.14IHH9jZ050937>