diff mbox series

[meta-oe,09/55] glm: upgrade 0.9.9.8 -> 1.0.3

Message ID 20261125080732.2419614-15-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-multimedia] clightd: Port ALS sensor to libiio 1.0 | expand

Commit Message

Khem Raj Nov. 25, 2026, 8:06 a.m. UTC
- 1.0.0 adds GLM_EXT_scalar/vector_reciprocal, GLM_EXT_matrix_integer,
  iround/uround and constexpr dot/cross, and fixes decompose, quaternion
  pow/euler conversion, adjugate and angle sign
- 1.0.1 adds C++17 [[nodiscard]] support and aligned vec3 SIMD, and
  fixes shear and smoothstep SIMD
- 1.0.2 adds packed/aligned quaternion types,
  GLM_GTX_structured_bindings, GLM_GTX_iteration and
  infinitePerspectiveRH/LH; unit tests are no longer built by default
  (GLM_BUILD_TESTS)
- 1.0.3 adds reflection matrices, reverts the quaternion rotate
  direction change and fixes vec4 to vec3 conversion and swizzles with
  GLM_FORCE_SIZE_T_LENGTH
- GLM 1.1 will require C++17

1.0.3 is tagged on the 1.0 branch. Drop both patches: the quaternion fix
is upstream and the rest only touched the test suite, which is not built
by default anymore. Add an upstream check.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../0001-Do-not-use-Werror-with-clang.patch   |  32 ----
 .../glm/glm/0001-Silence-clang-warnings.patch | 145 ------------------
 .../glm/{glm_0.9.9.8.bb => glm_1.0.3.bb}      |   9 +-
 3 files changed, 4 insertions(+), 182 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch
 delete mode 100644 meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
 rename meta-oe/recipes-graphics/glm/{glm_0.9.9.8.bb => glm_1.0.3.bb} (85%)
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch b/meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch
deleted file mode 100644
index dee2749898..0000000000
--- a/meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch
+++ /dev/null
@@ -1,32 +0,0 @@ 
-From ee405855bca7d6399ff1a1aef952010056c84ff6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 1 Mar 2023 21:08:09 -0800
-Subject: [PATCH] Do not use -Werror with clang
-
-Too many warnings to handle for a distro build
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- test/CMakeLists.txt | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index e7f85f19..0b6fd980 100644
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -197,10 +197,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- 		message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
- 	endif()
- 
--	add_compile_options(-Werror -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)
--
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- 	if(NOT GLM_QUIET)
- 		message("GLM: GCC - ${CMAKE_CXX_COMPILER_ID} compiler")
--- 
-2.39.2
-
diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
deleted file mode 100644
index 10692dd423..0000000000
--- a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
+++ /dev/null
@@ -1,145 +0,0 @@ 
-From bd9b5060bc3b9581090d44f15b4e236566ea86a6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 4 Jun 2021 12:57:57 -0700
-Subject: [PATCH] Silence clang warnings
-
-Fixes
-glm/gtc/random.inl:25:17: error: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion]
-|                                 std::rand() % std::numeric_limits<uint8>::max());
-|                                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-glm/gtc/../ext/quaternion_common.inl:76:87: error: unused parameter 'k' [-Werror,-Wunused-parameter]
-    GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k)
-                                                                                      ^
-
-and
-
-test/gtx/gtx_fast_trigonometry.cpp:135:9: error: variable 'result' set but not used [-Werror,-Wunused-but-set-variable]
-|                 float result = 0.f;
-|                       ^
-
-Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/1055]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- glm/ext/quaternion_common.inl      |  2 +-
- glm/gtc/random.inl                 |  2 +-
- test/gtx/gtx_fast_trigonometry.cpp | 30 ++++++++++++------------------
- 3 files changed, 14 insertions(+), 20 deletions(-)
-
---- a/glm/ext/quaternion_common.inl
-+++ b/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);
-         }
-     }
---- a/test/gtx/gtx_fast_trigonometry.cpp
-+++ b/test/gtx/gtx_fast_trigonometry.cpp
-@@ -19,15 +19,14 @@ namespace fastCos
- 	{
- 		const float begin = -glm::pi<float>();
- 		const float end = glm::pi<float>();
--		float result = 0.f;
- 
- 		const std::clock_t timestamp1 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::fastCos(i);
-+			glm::fastCos(i);
- 
- 		const std::clock_t timestamp2 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::cos(i);
-+			glm::cos(i);
- 
- 		const std::clock_t timestamp3 = std::clock();
- 		const std::clock_t time_fast = timestamp2 - timestamp1;
-@@ -53,15 +52,14 @@ namespace fastSin
- 	{
- 		const float begin = -glm::pi<float>();
- 		const float end = glm::pi<float>();
--		float result = 0.f;
- 
- 		const std::clock_t timestamp1 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::fastSin(i);
-+			glm::fastSin(i);
- 
- 		const std::clock_t timestamp2 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::sin(i);
-+			glm::sin(i);
- 
- 		const std::clock_t timestamp3 = std::clock();
- 		const std::clock_t time_fast = timestamp2 - timestamp1;
-@@ -79,15 +77,14 @@ namespace fastTan
- 	{
- 		const float begin = -glm::pi<float>();
- 		const float end = glm::pi<float>();
--		float result = 0.f;
- 
- 		const std::clock_t timestamp1 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::fastTan(i);
-+			glm::fastTan(i);
- 
- 		const std::clock_t timestamp2 = std::clock();
- 		for (float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::tan(i);
-+			glm::tan(i);
- 
- 		const std::clock_t timestamp3 = std::clock();
- 		const std::clock_t time_fast = timestamp2 - timestamp1;
-@@ -105,15 +102,14 @@ namespace fastAcos
- 	{
- 		const float begin = -glm::pi<float>();
- 		const float end = glm::pi<float>();
--		float result = 0.f;
- 
- 		const std::clock_t timestamp1 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::fastAcos(i);
-+			glm::fastAcos(i);
- 
- 		const std::clock_t timestamp2 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::acos(i);
-+			glm::acos(i);
- 
- 		const std::clock_t timestamp3 = std::clock();
- 		const std::clock_t time_fast = timestamp2 - timestamp1;
-@@ -132,13 +128,12 @@ namespace fastAsin
- 	{
- 		const float begin = -glm::pi<float>();
- 		const float end = glm::pi<float>();
--		float result = 0.f;
- 		const std::clock_t timestamp1 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::fastAsin(i);
-+			glm::fastAsin(i);
- 		const std::clock_t timestamp2 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::asin(i);
-+			glm::asin(i);
- 		const std::clock_t timestamp3 = std::clock();
- 		const std::clock_t time_fast = timestamp2 - timestamp1;
- 		const std::clock_t time_default = timestamp3 - timestamp2;
-@@ -155,13 +150,12 @@ namespace fastAtan
- 	{
- 		const float begin = -glm::pi<float>();
- 		const float end = glm::pi<float>();
--		float result = 0.f;
- 		const std::clock_t timestamp1 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::fastAtan(i);
-+			glm::fastAtan(i);
- 		const std::clock_t timestamp2 = std::clock();
- 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
--			result = glm::atan(i);
-+			glm::atan(i);
- 		const std::clock_t timestamp3 = std::clock();
- 		const std::clock_t time_fast = timestamp2 - timestamp1;
- 		const std::clock_t time_default = timestamp3 - timestamp2;
diff --git a/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb b/meta-oe/recipes-graphics/glm/glm_1.0.3.bb
similarity index 85%
rename from meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb
rename to meta-oe/recipes-graphics/glm/glm_1.0.3.bb
index 7f29c1fab9..0c6d72ebd3 100644
--- a/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb
+++ b/meta-oe/recipes-graphics/glm/glm_1.0.3.bb
@@ -9,16 +9,15 @@  LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://copying.txt;md5=462e4b97f73ef12f8171c3c546ce4e8d"
 
 SRC_URI = " \
-    git://github.com/g-truc/glm;branch=master;protocol=https \
-    file://0001-Silence-clang-warnings.patch \
-    file://0001-Do-not-use-Werror-with-clang.patch \
+    git://github.com/g-truc/glm;branch=1.0;protocol=https;tag=${PV} \
     file://glmConfig.cmake.in \
     file://glmConfigVersion.cmake.in \
     file://glm.pc.in \
     file://glmTargets.cmake \
 "
-SRCREV = "efec5db081e3aad807d0731e172ac597f6a39447"
-PV .= "+0.9.9.9+git"
+SRCREV = "8d1fd52e5ab5590e2c81768ace50c72bae28f2ed"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
 
 inherit cmake