Date: Fri, 1 Mar 2024 21:00:30 GMT From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: b35bdcd8fa50 - main - math/glm: update 0.9.9.8 =?utf-8?Q?=E2=86=92?= 1.0.1 Message-ID: <202403012100.421L0UTR026582@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=b35bdcd8fa500d1ed3d0764777e085e1980344fb commit b35bdcd8fa500d1ed3d0764777e085e1980344fb Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2024-03-01 18:13:40 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2024-03-01 21:00:07 +0000 math/glm: update 0.9.9.8 → 1.0.1 Some parts of glm were retroactively marked as experimental, and using now leads to a compile error - added override for this error to consumers which need it. --- astro/calcmysky/Makefile | 2 + games/aquaria/Makefile | 2 + games/irrlamb/Makefile | 2 + games/solarus/Makefile | 2 + graphics/libgltf/Makefile | 2 + math/glm/Makefile | 22 ++------ math/glm/distinfo | 6 +-- math/glm/files/glm.pc.in | 7 --- .../glm/files/patch-glm_ext_quaternion__common.inl | 11 ---- math/glm/files/patch-glm_gtx_bit.hpp | 60 ++++++++++++++++++++++ math/glm/files/patch-test_CMakeLists.txt | 19 +++++++ .../files/patch-test_core_core__func_matrix.cpp | 11 ++++ math/glm/pkg-plist | 18 +++++-- x11-wm/gamescope/Makefile | 2 + 14 files changed, 122 insertions(+), 44 deletions(-) diff --git a/astro/calcmysky/Makefile b/astro/calcmysky/Makefile index 3eab39699940..5655e1646eda 100644 --- a/astro/calcmysky/Makefile +++ b/astro/calcmysky/Makefile @@ -20,4 +20,6 @@ USE_QT= buildtools:build qmake:build core gui opengl widgets CMAKE_ARGS= -DQT_VERSION:STRING=5 +CXXFLAGS+= -DGLM_ENABLE_EXPERIMENTAL # GLM_GTX_transform is an experimental extension + .include <bsd.port.mk> diff --git a/games/aquaria/Makefile b/games/aquaria/Makefile index 6b3d54e6262a..084aa0db6905 100644 --- a/games/aquaria/Makefile +++ b/games/aquaria/Makefile @@ -40,6 +40,8 @@ CMAKE_OFF= AQUARIA_INTERNAL_FREETYPE \ LDFLAGS+= -Wl,--as-needed # avoid overlinking (vorbis deps) LDFLAGS_i386= -Wl,-z,notext -Wl,--no-check-dynamic-relocations +CXXFLAGS+= -DGLM_ENABLE_EXPERIMENTAL # GLM_GTX_transform is an experimental extension + DESKTOP_ENTRIES="${GH_PROJECT}" \ "" \ "${DATADIR}/${PORTNAME}.png" \ diff --git a/games/irrlamb/Makefile b/games/irrlamb/Makefile index bb825a855ed1..80e34d4311db 100644 --- a/games/irrlamb/Makefile +++ b/games/irrlamb/Makefile @@ -33,6 +33,8 @@ CONFIGURE_ENV= LOCALBASE="${LOCALBASE}" LDFLAGS_i386= -Wl,-znotext +CXXFLAGS+= -DGLM_ENABLE_EXPERIMENTAL # GLM_GTX_rotate_vector is an experimental extension + PORTDOCS= * PORTDATA= * diff --git a/games/solarus/Makefile b/games/solarus/Makefile index 88534c01e0e3..e70e74b5b0d0 100644 --- a/games/solarus/Makefile +++ b/games/solarus/Makefile @@ -29,6 +29,8 @@ USE_SDL= sdl2 ttf2 image2 USE_GL= gl glu USE_LDCONFIG= yes +CXXFLAGS+= -DGLM_ENABLE_EXPERIMENTAL # GLM_GTX_matrix_transform_2d is an experimental extension + OPTIONS_DEFINE= LUAJIT OPTIONS_DEFAULT_amd64= LUAJIT OPTIONS_DEFAULT_i386= LUAJIT diff --git a/graphics/libgltf/Makefile b/graphics/libgltf/Makefile index ed2a07c99fba..1fa844d1d89b 100644 --- a/graphics/libgltf/Makefile +++ b/graphics/libgltf/Makefile @@ -24,4 +24,6 @@ INSTALL_TARGET= install-strip PLIST_SUB= VERSION=${PORTVERSION:R} +CXXFLAGS+= -DGLM_ENABLE_EXPERIMENTAL # uses experimental extensions when checking for glm in configure + .include <bsd.port.mk> diff --git a/math/glm/Makefile b/math/glm/Makefile index ce47f1956dbb..1d05e34a5d41 100644 --- a/math/glm/Makefile +++ b/math/glm/Makefile @@ -1,20 +1,20 @@ PORTNAME= glm -PORTVERSION= 0.9.9.8 +PORTVERSION= 1.0.1 PORTEPOCH= 1 CATEGORIES= math graphics MAINTAINER= amdmi3@FreeBSD.org COMMENT= C++ mathematics library for software based on the OpenGL GLSL -WWW= https://glm.g-truc.net/ +WWW= https://github.com/g-truc/glm LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/copying.txt USES= cmake compiler:c++11-lang pkgconfig USE_GITHUB= yes GH_ACCOUNT= g-truc NO_ARCH= yes - -SUB_FILES= glm.pc +CMAKE_OFF= GLM_BUILD_LIBRARY PORTDOCS= * @@ -22,18 +22,4 @@ OPTIONS_DEFINE= TEST DOCS TEST_CMAKE_BOOL= GLM_TEST_ENABLE TEST_TEST_TARGET= test -post-patch: - @${REINPLACE_CMD} -e '/printf/ s|EndTime - StartTime|static_cast<long>(&)|' \ - ${WRKSRC}/test/core/core_func_matrix.cpp - -do-install: - @cd ${WRKSRC} && ${COPYTREE_SHARE} "glm" ${STAGEDIR}${PREFIX}/include \ - "-not -name CMakeLists.txt" - @${MKDIR} ${STAGEDIR}${PREFIX}/lib/cmake/glm - ${INSTALL_DATA} ${WRKSRC}/cmake/glm/*.cmake ${STAGEDIR}${PREFIX}/lib/cmake/glm - ${INSTALL_DATA} ${WRKDIR}/glm.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig - -do-install-DOCS-on: - @cd ${WRKSRC} && ${COPYTREE_SHARE} "doc *.md" ${STAGEDIR}${DOCSDIR} - .include <bsd.port.mk> diff --git a/math/glm/distinfo b/math/glm/distinfo index 63cca9cfb238..67f772622f58 100644 --- a/math/glm/distinfo +++ b/math/glm/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1615332075 -SHA256 (g-truc-glm-0.9.9.8_GH0.tar.gz) = 7d508ab72cb5d43227a3711420f06ff99b0a0cb63ee2f93631b162bfe1fe9592 -SIZE (g-truc-glm-0.9.9.8_GH0.tar.gz) = 4368032 +TIMESTAMP = 1709055434 +SHA256 (g-truc-glm-1.0.1_GH0.tar.gz) = 9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c +SIZE (g-truc-glm-1.0.1_GH0.tar.gz) = 4567161 diff --git a/math/glm/files/glm.pc.in b/math/glm/files/glm.pc.in deleted file mode 100644 index dccab04acd83..000000000000 --- a/math/glm/files/glm.pc.in +++ /dev/null @@ -1,7 +0,0 @@ -prefix=%%PREFIX%% -includedir=${prefix}/include - -Name: GLM -Description: OpenGL Mathematics -Version: 0.9.8 -Cflags: -I${includedir} diff --git a/math/glm/files/patch-glm_ext_quaternion__common.inl b/math/glm/files/patch-glm_ext_quaternion__common.inl deleted file mode 100644 index 6a489b479f5d..000000000000 --- a/math/glm/files/patch-glm_ext_quaternion__common.inl +++ /dev/null @@ -1,11 +0,0 @@ ---- glm/ext/quaternion_common.inl.orig 2020-04-13 17:41:16 UTC -+++ glm/ext/quaternion_common.inl -@@ -104,7 +104,7 @@ namespace glm - { - // Graphics Gems III, page 96 - T angle = acos(cosTheta); -- T phi = angle + k * glm::pi<T>(); -+ T phi = angle + static_cast<T>(k) * glm::pi<T>(); - return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle); - } - } diff --git a/math/glm/files/patch-glm_gtx_bit.hpp b/math/glm/files/patch-glm_gtx_bit.hpp new file mode 100644 index 000000000000..395022876680 --- /dev/null +++ b/math/glm/files/patch-glm_gtx_bit.hpp @@ -0,0 +1,60 @@ +This is needed to fix x11-wm/gamescope with glm 1.0.1 + +https://github.com/g-truc/glm/issues/1269 + +--- glm/gtx/bit.hpp.orig 2024-02-27 17:19:47 UTC ++++ glm/gtx/bit.hpp +@@ -46,7 +46,7 @@ namespace glm + /// @see gtc_round + /// @see gtx_bit + template<typename genIUType> +- GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value); ++ GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value); + + /// Return the power of two number which value is just higher the input value. + /// Deprecated, use ceilPowerOfTwo from GTC_round instead +@@ -54,7 +54,7 @@ namespace glm + /// @see gtc_round + /// @see gtx_bit + template<length_t L, typename T, qualifier Q> +- GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& value); ++ GLM_FUNC_DECL vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& value); + + /// Return the power of two number which value is just lower the input value. + /// Deprecated, use floorPowerOfTwo from GTC_round instead +@@ -62,7 +62,7 @@ namespace glm + /// @see gtc_round + /// @see gtx_bit + template<typename genIUType> +- GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value); ++ GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value); + + /// Return the power of two number which value is just lower the input value. + /// Deprecated, use floorPowerOfTwo from GTC_round instead +@@ -70,7 +70,7 @@ namespace glm + /// @see gtc_round + /// @see gtx_bit + template<length_t L, typename T, qualifier Q> +- GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& value); ++ GLM_FUNC_DECL vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& value); + + /// Return the power of two number which value is the closet to the input value. + /// Deprecated, use roundPowerOfTwo from GTC_round instead +@@ -78,7 +78,7 @@ namespace glm + /// @see gtc_round + /// @see gtx_bit + template<typename genIUType> +- GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value); ++ GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value); + + /// Return the power of two number which value is the closet to the input value. + /// Deprecated, use roundPowerOfTwo from GTC_round instead +@@ -86,7 +86,7 @@ namespace glm + /// @see gtc_round + /// @see gtx_bit + template<length_t L, typename T, qualifier Q> +- GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value); ++ GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value); + + /// @} + } //namespace glm diff --git a/math/glm/files/patch-test_CMakeLists.txt b/math/glm/files/patch-test_CMakeLists.txt new file mode 100644 index 000000000000..0a8b4d6b8c60 --- /dev/null +++ b/math/glm/files/patch-test_CMakeLists.txt @@ -0,0 +1,19 @@ +--- test/CMakeLists.txt.orig 2024-02-27 17:19:47 UTC ++++ test/CMakeLists.txt +@@ -11,7 +11,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + endif() + + if(NOT GLM_DISABLE_AUTO_DETECTION) +- add_compile_options(-Werror -Weverything) ++ add_compile_options(-Weverything) + endif() + + elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") +@@ -20,7 +20,6 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + endif() + + if(NOT GLM_DISABLE_AUTO_DETECTION) +- add_compile_options(-Werror) + # add_compile_options(-Wpedantic) + # add_compile_options(-Wall) + # add_compile_options(-Wextra) diff --git a/math/glm/files/patch-test_core_core__func_matrix.cpp b/math/glm/files/patch-test_core_core__func_matrix.cpp new file mode 100644 index 000000000000..080676114d84 --- /dev/null +++ b/math/glm/files/patch-test_core_core__func_matrix.cpp @@ -0,0 +1,11 @@ +--- test/core/core_func_matrix.cpp.orig 2024-02-27 17:19:47 UTC ++++ test/core/core_func_matrix.cpp +@@ -392,7 +392,7 @@ static int test_inverse_perf(std::size_t Count, std::s + //glm::uint Ulp = 0; + //Ulp = glm::max(glm::float_distance(*Dst, *Src), Ulp); + +- std::printf("inverse<%s>(%f): %lu\n", Message, static_cast<double>(Diff), EndTime - StartTime); ++ std::printf("inverse<%s>(%f): %lu\n", Message, static_cast<double>(Diff), (unsigned long)(EndTime - StartTime)); + + return 0; + } diff --git a/math/glm/pkg-plist b/math/glm/pkg-plist index b6f0eecf7cd2..03669b99b210 100644 --- a/math/glm/pkg-plist +++ b/math/glm/pkg-plist @@ -6,6 +6,7 @@ include/glm/detail/_swizzle.hpp include/glm/detail/_swizzle_func.hpp include/glm/detail/_vectorize.hpp include/glm/detail/compute_common.hpp +include/glm/detail/compute_vector_decl.hpp include/glm/detail/compute_vector_relational.hpp include/glm/detail/func_common.inl include/glm/detail/func_common_simd.inl @@ -62,6 +63,7 @@ include/glm/detail/type_vec4.inl include/glm/detail/type_vec4_simd.inl include/glm/exponential.hpp include/glm/ext.hpp +include/glm/ext/_matrix_vectorize.hpp include/glm/ext/matrix_clip_space.hpp include/glm/ext/matrix_clip_space.inl include/glm/ext/matrix_common.hpp @@ -120,6 +122,8 @@ include/glm/ext/matrix_int4x3.hpp include/glm/ext/matrix_int4x3_sized.hpp include/glm/ext/matrix_int4x4.hpp include/glm/ext/matrix_int4x4_sized.hpp +include/glm/ext/matrix_integer.hpp +include/glm/ext/matrix_integer.inl include/glm/ext/matrix_projection.hpp include/glm/ext/matrix_projection.inl include/glm/ext/matrix_relational.hpp @@ -170,6 +174,8 @@ include/glm/ext/scalar_integer.hpp include/glm/ext/scalar_integer.inl include/glm/ext/scalar_packing.hpp include/glm/ext/scalar_packing.inl +include/glm/ext/scalar_reciprocal.hpp +include/glm/ext/scalar_reciprocal.inl include/glm/ext/scalar_relational.hpp include/glm/ext/scalar_relational.inl include/glm/ext/scalar_uint_sized.hpp @@ -213,6 +219,8 @@ include/glm/ext/vector_integer.hpp include/glm/ext/vector_integer.inl include/glm/ext/vector_packing.hpp include/glm/ext/vector_packing.inl +include/glm/ext/vector_reciprocal.hpp +include/glm/ext/vector_reciprocal.inl include/glm/ext/vector_relational.hpp include/glm/ext/vector_relational.inl include/glm/ext/vector_uint1.hpp @@ -227,6 +235,7 @@ include/glm/ext/vector_ulp.hpp include/glm/ext/vector_ulp.inl include/glm/fwd.hpp include/glm/geometric.hpp +include/glm/glm.cppm include/glm/glm.hpp include/glm/gtc/bitfield.hpp include/glm/gtc/bitfield.inl @@ -255,7 +264,6 @@ include/glm/gtc/quaternion_simd.inl include/glm/gtc/random.hpp include/glm/gtc/random.inl include/glm/gtc/reciprocal.hpp -include/glm/gtc/reciprocal.inl include/glm/gtc/round.hpp include/glm/gtc/round.inl include/glm/gtc/type_aligned.hpp @@ -344,11 +352,12 @@ include/glm/gtx/normal.inl include/glm/gtx/normalize_dot.hpp include/glm/gtx/normalize_dot.inl include/glm/gtx/number_precision.hpp -include/glm/gtx/number_precision.inl include/glm/gtx/optimum_pow.hpp include/glm/gtx/optimum_pow.inl include/glm/gtx/orthonormalize.hpp include/glm/gtx/orthonormalize.inl +include/glm/gtx/pca.hpp +include/glm/gtx/pca.inl include/glm/gtx/perpendicular.hpp include/glm/gtx/perpendicular.inl include/glm/gtx/polar_coordinates.hpp @@ -417,6 +426,5 @@ include/glm/vec2.hpp include/glm/vec3.hpp include/glm/vec4.hpp include/glm/vector_relational.hpp -lib/cmake/glm/glmConfig-version.cmake -lib/cmake/glm/glmConfig.cmake -libdata/pkgconfig/glm.pc +%%DATADIR%%/glmConfig.cmake +%%DATADIR%%/glmConfigVersion.cmake diff --git a/x11-wm/gamescope/Makefile b/x11-wm/gamescope/Makefile index d6134b15e9ce..8a3a8a16af01 100644 --- a/x11-wm/gamescope/Makefile +++ b/x11-wm/gamescope/Makefile @@ -47,6 +47,8 @@ PLIST_FILES= bin/${PORTNAME} \ lib/libVkLayer_FROG_${PORTNAME}_wsi_${MESON_ARCH_FAMILY}.so \ share/vulkan/implicit_layer.d/VkLayer_FROG_${PORTNAME}_wsi.${MESON_ARCH_FAMILY}.json +CXXFLAGS+= -DGLM_ENABLE_EXPERIMENTAL # GLM_GTX_string_cast is an experimental extension + # https://github.com/freebsd/drm-kmod/issues/271 PORTSCOUT= ignore:1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403012100.421L0UTR026582>