diff --git a/math/Imath/Makefile b/math/Imath/Makefile index 734e1a9770d9..0e2abc523b6f 100644 --- a/math/Imath/Makefile +++ b/math/Imath/Makefile @@ -1,59 +1,58 @@ # 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 COMMENT= C++/Python lib of 2D/3D vector, matrix, math ops for computer graphics LICENSE= BSD3CLAUSE USES= cmake compiler:c++14-lang pkgconfig USE_GITHUB= yes GH_TUPLE= AcademySoftwareFoundation:Imath:v${PORTVERSION} USE_LDCONFIG= yes CMAKE_ARGS+= -DCMAKE_DEBUG_POSTFIX= \ -DCMAKE_INSTALL_PREFIX=${PREFIX} PATCH_STRIP= -p1 PLIST_SUB= MAJORVER=${_MAJORVER} \ MINVER=${_MINVER} \ PLVER=${_PLVER} \ VER=${_VER} \ PYVER=${PYTHON_VER:S/./_/} PORTDOCS= README.md OPTIONS_DEFINE= DOCS LARGE_STACK PYTHON OPTIONS_SUB= yes LARGE_STACK_DESC= Enable sys-dependent large stack optimizations LARGE_STACK_CMAKE_BOOL= IMATH_ENABLE_LARGE_STACK PYTHON_BUILD_DEPENDS= ${PYNUMPY} PYTHON_LIB_DEPENDS= ${PY_BOOST} PYTHON_RUN_DEPENDS= ${PYNUMPY} PYTHON_USES= python PYTHON_CMAKE_BOOL= PYTHON _MAJORVER= 3_0 -_VER= 27 +_VER= 28 _MINVER= 0 _PLVER= 0 post-install: .for l in libImath ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${l}-${_MAJORVER}.so .endfor @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} do-test: cd ${BUILD_WRKSRC} && ctest -j ${MAKE_JOBS_NUMBER} .include 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 -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 ---- - 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 -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 ---- - 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 -+#endif -+#include - #include - #include - #include -@@ -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 -+ 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 (pf) == bit_cast (f)); -+ assert (bit_cast (sf) == bit_cast (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 (pd) == bit_cast (d)); -+ assert (bit_cast (sd) == bit_cast (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 @@ -1,90 +1,90 @@ include/Imath/ImathBox.h include/Imath/ImathBoxAlgo.h include/Imath/ImathColor.h include/Imath/ImathColorAlgo.h include/Imath/ImathConfig.h include/Imath/ImathEuler.h include/Imath/ImathExport.h include/Imath/ImathForward.h include/Imath/ImathFrame.h include/Imath/ImathFrustum.h include/Imath/ImathFrustumTest.h include/Imath/ImathFun.h include/Imath/ImathGL.h include/Imath/ImathGLU.h include/Imath/ImathInt64.h include/Imath/ImathInterval.h include/Imath/ImathLine.h include/Imath/ImathLineAlgo.h include/Imath/ImathMath.h include/Imath/ImathMatrix.h include/Imath/ImathMatrixAlgo.h include/Imath/ImathNamespace.h include/Imath/ImathPlane.h include/Imath/ImathPlatform.h include/Imath/ImathQuat.h include/Imath/ImathRandom.h include/Imath/ImathRoots.h include/Imath/ImathShear.h include/Imath/ImathSphere.h include/Imath/ImathTypeTraits.h include/Imath/ImathVec.h include/Imath/ImathVecAlgo.h include/Imath/half.h include/Imath/halfFunction.h include/Imath/halfLimits.h lib/cmake/Imath/ImathConfig.cmake 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 %%PYTHON%%include/Imath/PyImathAutovectorize.h %%PYTHON%%include/Imath/PyImathBasicTypes.h %%PYTHON%%include/Imath/PyImathBox.h %%PYTHON%%include/Imath/PyImathBoxArrayImpl.h %%PYTHON%%include/Imath/PyImathColor.h %%PYTHON%%include/Imath/PyImathColor3ArrayImpl.h %%PYTHON%%include/Imath/PyImathColor4Array2DImpl.h %%PYTHON%%include/Imath/PyImathColor4ArrayImpl.h %%PYTHON%%include/Imath/PyImathDecorators.h %%PYTHON%%include/Imath/PyImathEuler.h %%PYTHON%%include/Imath/PyImathExport.h %%PYTHON%%include/Imath/PyImathFixedArray.h %%PYTHON%%include/Imath/PyImathFixedArray2D.h %%PYTHON%%include/Imath/PyImathFixedMatrix.h %%PYTHON%%include/Imath/PyImathFixedVArray.h %%PYTHON%%include/Imath/PyImathFrustum.h %%PYTHON%%include/Imath/PyImathFun.h %%PYTHON%%include/Imath/PyImathLine.h %%PYTHON%%include/Imath/PyImathM44Array.h %%PYTHON%%include/Imath/PyImathMathExc.h %%PYTHON%%include/Imath/PyImathMatrix.h %%PYTHON%%include/Imath/PyImathOperators.h %%PYTHON%%include/Imath/PyImathPlane.h %%PYTHON%%include/Imath/PyImathQuat.h %%PYTHON%%include/Imath/PyImathRandom.h %%PYTHON%%include/Imath/PyImathShear.h %%PYTHON%%include/Imath/PyImathStringArray.h %%PYTHON%%include/Imath/PyImathStringArrayRegister.h %%PYTHON%%include/Imath/PyImathStringTable.h %%PYTHON%%include/Imath/PyImathTask.h %%PYTHON%%include/Imath/PyImathUtil.h %%PYTHON%%include/Imath/PyImathVec.h %%PYTHON%%include/Imath/PyImathVec2Impl.h %%PYTHON%%include/Imath/PyImathVec3ArrayImpl.h %%PYTHON%%include/Imath/PyImathVec3Impl.h %%PYTHON%%include/Imath/PyImathVec4ArrayImpl.h %%PYTHON%%include/Imath/PyImathVec4Impl.h %%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