[oe,meta-oe,4/5] glm: Upgrade to 0.9.9.6

Message ID 20191228080740.63169-4-raj.khem@gmail.com
State New
Headers show
Series
  • [oe,meta-oe,1/5] jsoncpp: Upgrade to 1.9.2
Related show

Commit Message

Khem Raj Dec. 28, 2019, 8:07 a.m.
License-Update: Use copying.txt for checksum, no change in licenses as
such

Fix type conversion warnings

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...t-float-conversion-warnings-with-cla.patch | 158 ++++++++++++++++++
 .../glm/{glm_0.9.9.5.bb => glm_0.9.9.6.bb}    |   8 +-
 2 files changed, 163 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch
 rename meta-oe/recipes-graphics/glm/{glm_0.9.9.5.bb => glm_0.9.9.6.bb} (66%)

-- 
2.24.1

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch b/meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch
new file mode 100644
index 0000000000..2eb50a5a3a
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch
@@ -0,0 +1,158 @@ 
+From 461861cd2e34294830b121db834c05ff39424f6f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 27 Dec 2019 18:42:51 -0800
+Subject: [PATCH] Fix Wimplicit-int-float-conversion warnings with clang 10+
+
+This is a new warning in clang which will be available in clang 10
+onwards
+
+Fixes
+error: implicit conversion from 'const int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion]
+
+Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/986]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ glm/gtx/scalar_multiplication.hpp  |  2 +-
+ test/gtx/gtx_fast_trigonometry.cpp | 32 +++++++++++++++---------------
+ 2 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/glm/gtx/scalar_multiplication.hpp b/glm/gtx/scalar_multiplication.hpp
+index f391f8de..496ba193 100644
+--- a/glm/gtx/scalar_multiplication.hpp
++++ b/glm/gtx/scalar_multiplication.hpp
+@@ -54,7 +54,7 @@ namespace glm
+ 	template<typename T> \
+ 	return_type_scalar_multiplication<T, Vec> \
+ 	operator/(Vec lh, T const& s){ \
+-		return lh *= 1.0f / s; \
++		return lh *= 1.0f / static_cast<float>(s); \
+ 	}
+ 
+ GLM_IMPLEMENT_SCAL_MULT(vec2)
+diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp
+index f3bf17bf..f3c4e957 100644
+--- a/test/gtx/gtx_fast_trigonometry.cpp
++++ b/test/gtx/gtx_fast_trigonometry.cpp
+@@ -239,12 +239,12 @@ namespace taylorCos
+ 		std::vector<glm::vec4> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = fastCosNew(AngleShift + glm::vec4(Begin + Steps * i));
++			Results[i] = fastCosNew(AngleShift + glm::vec4(Begin + Steps * float(i)));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+@@ -280,12 +280,12 @@ namespace taylorCos
+ 		std::vector<glm::vec4> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = taylorCos::fastCosDeterminisctic(AngleShift + glm::vec4(Begin + Steps * i));
++			Results[i] = taylorCos::fastCosDeterminisctic(AngleShift + glm::vec4(Begin + Steps * float(i)));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+@@ -327,12 +327,12 @@ namespace taylorCos
+ 		std::vector<glm::vec4> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = taylorCos::fastRefCos(AngleShift + glm::vec4(Begin + Steps * i));
++			Results[i] = taylorCos::fastRefCos(AngleShift + glm::vec4(Begin + Steps * float(i)));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+@@ -349,12 +349,12 @@ namespace taylorCos
+ 		std::vector<glm::vec4> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = glm::fastCos(AngleShift + glm::vec4(Begin + Steps * i));
++			Results[i] = glm::fastCos(AngleShift + glm::vec4(Begin + Steps * float(i)));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+@@ -371,12 +371,12 @@ namespace taylorCos
+ 		std::vector<glm::vec4> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = glm::cos(AngleShift + glm::vec4(Begin + Steps * i));
++			Results[i] = glm::cos(AngleShift + glm::vec4(Begin + Steps * float(i)));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+@@ -466,12 +466,12 @@ namespace taylor2
+ 		std::vector<float> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = taylorCosA(AngleShift.x + Begin + Steps * i);
++			Results[i] = taylorCosA(AngleShift.x + Begin + Steps * float(i));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+@@ -488,12 +488,12 @@ namespace taylor2
+ 		std::vector<float> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = taylorCosB(AngleShift.x + Begin + Steps * i);
++			Results[i] = taylorCosB(AngleShift.x + Begin + Steps * float(i));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+@@ -510,12 +510,12 @@ namespace taylor2
+ 		std::vector<float> Results;
+ 		Results.resize(Samples);
+ 
+-		float Steps = (End - Begin) / Samples;
++		float Steps = (End - Begin) / float(Samples);
+ 
+ 		std::clock_t const TimeStampBegin = std::clock();
+ 
+ 		for(std::size_t i = 0; i < Samples; ++i)
+-			Results[i] = taylorCosC(AngleShift.x + Begin + Steps * i);
++			Results[i] = taylorCosC(AngleShift.x + Begin + Steps * float(i));
+ 
+ 		std::clock_t const TimeStampEnd = std::clock();
+ 
+-- 
+2.24.1
+
diff --git a/meta-oe/recipes-graphics/glm/glm_0.9.9.5.bb b/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
similarity index 66%
rename from meta-oe/recipes-graphics/glm/glm_0.9.9.5.bb
rename to meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
index f367e4eae0..817b8392b2 100644
--- a/meta-oe/recipes-graphics/glm/glm_0.9.9.5.bb
+++ b/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
@@ -6,13 +6,13 @@  HOMEPAGE = "https://glm.g-truc.net"
 BUGTRACKER = "https://github.com/g-truc/glm/issues"
 SECTION = "libs"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://readme.md;beginline=21;endline=22;md5=3075b5727d36f29edccf97b93e72b790"
+LIC_FILES_CHKSUM = "file://copying.txt;md5=4a735e33f271f57404fda17e80085411"
 
 SRC_URI = " \
     git://github.com/g-truc/glm;branch=master \
+    file://0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch \
 "
-# v0.9.9.5
-SRCREV = "d162eee1e6f7c317a09229fe6ceab8ec6ab9a4b4"
+SRCREV = "4db8f89aace8f04c839b606e15b39fb8383ec732"
 
 S = "${WORKDIR}/git"
 
@@ -21,3 +21,5 @@  inherit cmake
 RDEPENDS_${PN}-dev = ""
 
 BBCLASSEXTEND = "native"
+
+OECMAKE_GENERATOR = "Unix Makefiles"