From: Rafael Sadowski Subject: UPDATE: graphics/glm To: ports@openbsd.org Date: Mon, 20 Oct 2025 11:20:22 +0200 This is cmake4 related. Simple update glm to 1.0.2. OK? diff --git a/graphics/glm/Makefile b/graphics/glm/Makefile index e387cdfefcb..124fdc11a5a 100644 --- a/graphics/glm/Makefile +++ b/graphics/glm/Makefile @@ -1,9 +1,8 @@ COMMENT= C++ mathematics header-only library for OpenGL software -GH_TAGNAME= 0.9.9.8 +GH_TAGNAME= 1.0.2 GH_PROJECT= glm GH_ACCOUNT= g-truc -REVISION= 2 CATEGORIES= graphics math @@ -19,16 +18,8 @@ COMPILER= base-clang ports-gcc # it's kind-of a NO_BUILD port, but doing so means you can't # run the tests. -CONFIGURE_ARGS += -DGLM_TEST_ENABLE=ON - -# https://github.com/g-truc/glm/pull/1121 -CXXFLAGS += -Wno-unused-but-set-variable +CONFIGURE_ARGS += -D=GLM_BUILD_TESTS=ON PKG_ARCH= * -do-install: - cp -Rp ${WRKSRC}/glm ${PREFIX}/include - ${INSTALL_DATA_DIR} ${PREFIX}/lib/cmake - cp -Rp ${WRKSRC}/cmake/glm/ ${PREFIX}/lib/cmake - .include diff --git a/graphics/glm/distinfo b/graphics/glm/distinfo index 21e2636c579..3a61a63219a 100644 --- a/graphics/glm/distinfo +++ b/graphics/glm/distinfo @@ -1,2 +1,2 @@ -SHA256 (glm-0.9.9.8.tar.gz) = fVCKtyy11DIno3EUIPBv+ZsKDLY+4vk2MbFiv+H+lZI= -SIZE (glm-0.9.9.8.tar.gz) = 4368032 +SHA256 (glm-1.0.2.tar.gz) = Ge3y6GApfvqxx0lQ5gdr9NrZ3kg4JryV4uDyx1ikP2U= +SIZE (glm-1.0.2.tar.gz) = 4597309 diff --git a/graphics/glm/patches/patch-glm_ext_quaternion_common_inl b/graphics/glm/patches/patch-glm_ext_quaternion_common_inl deleted file mode 100644 index 467645db247..00000000000 --- a/graphics/glm/patches/patch-glm_ext_quaternion_common_inl +++ /dev/null @@ -1,16 +0,0 @@ -glm-0.9.9.8/glm-0.9.9.8/glm/../glm/gtc/../ext/quaternion_common.inl:107:29: error: implicit conversion from 'int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion] - T phi = angle + k * glm::pi(); - ^ ~ - -Index: glm/ext/quaternion_common.inl ---- glm/ext/quaternion_common.inl.orig -+++ 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 phi = angle + static_cast(k) * glm::pi(); - return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle); - } - } diff --git a/graphics/glm/patches/patch-glm_gtc_random_inl b/graphics/glm/patches/patch-glm_gtc_random_inl deleted file mode 100644 index 100e426148f..00000000000 --- a/graphics/glm/patches/patch-glm_gtc_random_inl +++ /dev/null @@ -1,17 +0,0 @@ -From 63a229359efd1b8ad35c63110027687a42343112 Mon Sep 17 00:00:00 2001 -From: Baldvin Kovacs -Date: Thu, 10 Feb 2022 22:12:46 +0100 -Subject: [PATCH] Fix implicit conversion compiler error in glm/gtc/random.inl - -Index: glm/gtc/random.inl ---- glm/gtc/random.inl.orig -+++ glm/gtc/random.inl -@@ -22,7 +22,7 @@ namespace detail - GLM_FUNC_QUALIFIER static vec<1, uint8, P> call() - { - return vec<1, uint8, P>( -- std::rand() % std::numeric_limits::max()); -+ static_cast(std::rand() % std::numeric_limits::max())); - } - }; - diff --git a/graphics/glm/patches/patch-test_CMakeLists_txt b/graphics/glm/patches/patch-test_CMakeLists_txt index 25af1174f8a..d413a231c00 100644 --- a/graphics/glm/patches/patch-test_CMakeLists_txt +++ b/graphics/glm/patches/patch-test_CMakeLists_txt @@ -1,20 +1,20 @@ Index: test/CMakeLists.txt --- test/CMakeLists.txt.orig +++ test/CMakeLists.txt -@@ -77,6 +77,7 @@ if(GLM_TEST_ENABLE_FAST_MATH) - - if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU")) - add_compile_options(-ffast-math) +@@ -11,6 +11,7 @@ if (GLM_TEST_ENABLE_SIMD_FMA) + add_definitions(-DGLM_FORCE_FMA) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-mfma) + add_definitions(-mfpmath=387) - - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - add_compile_options(/fp:fast) -@@ -197,7 +198,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler") endif() + endif() -- add_compile_options(-Werror -Weverything) -+ add_compile_options(-Weverything) - add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types) - add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral) +@@ -23,7 +24,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + if(NOT GLM_DISABLE_AUTO_DETECTION) +- add_compile_options(-Werror -Weverything) ++ add_compile_options(-Weverything) + endif() + elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") diff --git a/graphics/glm/patches/patch-test_core_core_func_matrix_cpp b/graphics/glm/patches/patch-test_core_core_func_matrix_cpp index adf56146689..5b394721588 100644 --- a/graphics/glm/patches/patch-test_core_core_func_matrix_cpp +++ b/graphics/glm/patches/patch-test_core_core_func_matrix_cpp @@ -3,12 +3,12 @@ Index: test/core/core_func_matrix.cpp --- test/core/core_func_matrix.cpp.orig +++ test/core/core_func_matrix.cpp -@@ -297,7 +297,7 @@ int test_inverse_perf(std::size_t Count, std::size_t I +@@ -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(Diff), EndTime - StartTime); -+ std::printf("inverse<%s>(%f): %lld\n", Message, static_cast(Diff), EndTime - StartTime); +- std::printf("inverse<%s>(%f): %lu\n", Message, static_cast(Diff), static_cast(EndTime - StartTime)); ++ std::printf("inverse<%s>(%f): %lld\n", Message, static_cast(Diff), static_cast(EndTime - StartTime)); return 0; } diff --git a/graphics/glm/pkg/PLIST b/graphics/glm/pkg/PLIST index 2f333a2c462..c96cc4f9d62 100644 --- a/graphics/glm/pkg/PLIST +++ b/graphics/glm/pkg/PLIST @@ -1,5 +1,4 @@ include/glm/ -include/glm/CMakeLists.txt include/glm/common.hpp include/glm/detail/ include/glm/detail/_features.hpp @@ -9,6 +8,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,10 +62,11 @@ include/glm/detail/type_vec3.hpp include/glm/detail/type_vec3.inl include/glm/detail/type_vec4.hpp include/glm/detail/type_vec4.inl -include/glm/detail/type_vec4_simd.inl +include/glm/detail/type_vec_simd.inl include/glm/exponential.hpp include/glm/ext/ 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 @@ -124,6 +125,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 @@ -174,6 +177,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 @@ -217,6 +222,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 @@ -231,6 +238,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/ include/glm/gtc/bitfield.hpp @@ -260,7 +268,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 @@ -308,7 +315,7 @@ include/glm/gtx/fast_square_root.hpp include/glm/gtx/fast_square_root.inl include/glm/gtx/fast_trigonometry.hpp include/glm/gtx/fast_trigonometry.inl -include/glm/gtx/float_notmalize.inl +include/glm/gtx/float_normalize.inl include/glm/gtx/functions.hpp include/glm/gtx/functions.inl include/glm/gtx/gradient_paint.hpp @@ -323,6 +330,8 @@ include/glm/gtx/intersect.hpp include/glm/gtx/intersect.inl include/glm/gtx/io.hpp include/glm/gtx/io.inl +include/glm/gtx/iteration.hpp +include/glm/gtx/iteration.inl include/glm/gtx/log_base.hpp include/glm/gtx/log_base.inl include/glm/gtx/matrix_cross_product.hpp @@ -350,11 +359,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 @@ -379,6 +389,8 @@ include/glm/gtx/std_based_type.hpp include/glm/gtx/std_based_type.inl include/glm/gtx/string_cast.hpp include/glm/gtx/string_cast.inl +include/glm/gtx/structured_bindings.hpp +include/glm/gtx/structured_bindings.inl include/glm/gtx/texture.hpp include/glm/gtx/texture.inl include/glm/gtx/transform.hpp @@ -424,7 +436,8 @@ include/glm/vec2.hpp include/glm/vec3.hpp include/glm/vec4.hpp include/glm/vector_relational.hpp -lib/cmake/ -lib/cmake/glm/ -lib/cmake/glm/glmConfig-version.cmake -lib/cmake/glm/glmConfig.cmake +@static-lib lib/libglm.a +share/glm/ +share/glm/glmConfig${MODCMAKE_BUILD_SUFFIX} +share/glm/glmConfig.cmake +share/glm/glmConfigVersion.cmake