summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-12-27 18:47:31 -0800
committerKhem Raj <raj.khem@gmail.com>2019-12-29 10:32:10 -0800
commitc2d649925e2e9fde05154aa77566adf297d8ea84 (patch)
treeafd78e504e0e21d57de2d5a6b501372761b04979
parentfe1e5f8a9c3437094fe5b7065a5d3665b56e8a5b (diff)
downloadmeta-openembedded-c2d649925e2e9fde05154aa77566adf297d8ea84.tar.gz
glm: Upgrade to 0.9.9.6
License-Update: Use copying.txt for checksum, no change in licenses as such Fix type conversion warnings Upstream conveniently deleted cmake install/uninstall pieces, therefore apply the bandaids as needed see [1] [1] https://github.com/g-truc/glm/issues/947 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch158
-rw-r--r--meta-oe/recipes-graphics/glm/glm/glm.pc.in7
-rw-r--r--meta-oe/recipes-graphics/glm/glm/glmConfig.cmake.in20
-rw-r--r--meta-oe/recipes-graphics/glm/glm/glmConfigVersion.cmake.in31
-rw-r--r--meta-oe/recipes-graphics/glm/glm/glmTargets.cmake107
-rw-r--r--meta-oe/recipes-graphics/glm/glm_0.9.9.5.bb23
-rw-r--r--meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb39
7 files changed, 362 insertions, 23 deletions
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 000000000..2eb50a5a3
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch
@@ -0,0 +1,158 @@
1From 461861cd2e34294830b121db834c05ff39424f6f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 27 Dec 2019 18:42:51 -0800
4Subject: [PATCH] Fix Wimplicit-int-float-conversion warnings with clang 10+
5
6This is a new warning in clang which will be available in clang 10
7onwards
8
9Fixes
10error: implicit conversion from 'const int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion]
11
12Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/986]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 glm/gtx/scalar_multiplication.hpp | 2 +-
16 test/gtx/gtx_fast_trigonometry.cpp | 32 +++++++++++++++---------------
17 2 files changed, 17 insertions(+), 17 deletions(-)
18
19diff --git a/glm/gtx/scalar_multiplication.hpp b/glm/gtx/scalar_multiplication.hpp
20index f391f8de..496ba193 100644
21--- a/glm/gtx/scalar_multiplication.hpp
22+++ b/glm/gtx/scalar_multiplication.hpp
23@@ -54,7 +54,7 @@ namespace glm
24 template<typename T> \
25 return_type_scalar_multiplication<T, Vec> \
26 operator/(Vec lh, T const& s){ \
27- return lh *= 1.0f / s; \
28+ return lh *= 1.0f / static_cast<float>(s); \
29 }
30
31 GLM_IMPLEMENT_SCAL_MULT(vec2)
32diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp
33index f3bf17bf..f3c4e957 100644
34--- a/test/gtx/gtx_fast_trigonometry.cpp
35+++ b/test/gtx/gtx_fast_trigonometry.cpp
36@@ -239,12 +239,12 @@ namespace taylorCos
37 std::vector<glm::vec4> Results;
38 Results.resize(Samples);
39
40- float Steps = (End - Begin) / Samples;
41+ float Steps = (End - Begin) / float(Samples);
42
43 std::clock_t const TimeStampBegin = std::clock();
44
45 for(std::size_t i = 0; i < Samples; ++i)
46- Results[i] = fastCosNew(AngleShift + glm::vec4(Begin + Steps * i));
47+ Results[i] = fastCosNew(AngleShift + glm::vec4(Begin + Steps * float(i)));
48
49 std::clock_t const TimeStampEnd = std::clock();
50
51@@ -280,12 +280,12 @@ namespace taylorCos
52 std::vector<glm::vec4> Results;
53 Results.resize(Samples);
54
55- float Steps = (End - Begin) / Samples;
56+ float Steps = (End - Begin) / float(Samples);
57
58 std::clock_t const TimeStampBegin = std::clock();
59
60 for(std::size_t i = 0; i < Samples; ++i)
61- Results[i] = taylorCos::fastCosDeterminisctic(AngleShift + glm::vec4(Begin + Steps * i));
62+ Results[i] = taylorCos::fastCosDeterminisctic(AngleShift + glm::vec4(Begin + Steps * float(i)));
63
64 std::clock_t const TimeStampEnd = std::clock();
65
66@@ -327,12 +327,12 @@ namespace taylorCos
67 std::vector<glm::vec4> Results;
68 Results.resize(Samples);
69
70- float Steps = (End - Begin) / Samples;
71+ float Steps = (End - Begin) / float(Samples);
72
73 std::clock_t const TimeStampBegin = std::clock();
74
75 for(std::size_t i = 0; i < Samples; ++i)
76- Results[i] = taylorCos::fastRefCos(AngleShift + glm::vec4(Begin + Steps * i));
77+ Results[i] = taylorCos::fastRefCos(AngleShift + glm::vec4(Begin + Steps * float(i)));
78
79 std::clock_t const TimeStampEnd = std::clock();
80
81@@ -349,12 +349,12 @@ namespace taylorCos
82 std::vector<glm::vec4> Results;
83 Results.resize(Samples);
84
85- float Steps = (End - Begin) / Samples;
86+ float Steps = (End - Begin) / float(Samples);
87
88 std::clock_t const TimeStampBegin = std::clock();
89
90 for(std::size_t i = 0; i < Samples; ++i)
91- Results[i] = glm::fastCos(AngleShift + glm::vec4(Begin + Steps * i));
92+ Results[i] = glm::fastCos(AngleShift + glm::vec4(Begin + Steps * float(i)));
93
94 std::clock_t const TimeStampEnd = std::clock();
95
96@@ -371,12 +371,12 @@ namespace taylorCos
97 std::vector<glm::vec4> Results;
98 Results.resize(Samples);
99
100- float Steps = (End - Begin) / Samples;
101+ float Steps = (End - Begin) / float(Samples);
102
103 std::clock_t const TimeStampBegin = std::clock();
104
105 for(std::size_t i = 0; i < Samples; ++i)
106- Results[i] = glm::cos(AngleShift + glm::vec4(Begin + Steps * i));
107+ Results[i] = glm::cos(AngleShift + glm::vec4(Begin + Steps * float(i)));
108
109 std::clock_t const TimeStampEnd = std::clock();
110
111@@ -466,12 +466,12 @@ namespace taylor2
112 std::vector<float> Results;
113 Results.resize(Samples);
114
115- float Steps = (End - Begin) / Samples;
116+ float Steps = (End - Begin) / float(Samples);
117
118 std::clock_t const TimeStampBegin = std::clock();
119
120 for(std::size_t i = 0; i < Samples; ++i)
121- Results[i] = taylorCosA(AngleShift.x + Begin + Steps * i);
122+ Results[i] = taylorCosA(AngleShift.x + Begin + Steps * float(i));
123
124 std::clock_t const TimeStampEnd = std::clock();
125
126@@ -488,12 +488,12 @@ namespace taylor2
127 std::vector<float> Results;
128 Results.resize(Samples);
129
130- float Steps = (End - Begin) / Samples;
131+ float Steps = (End - Begin) / float(Samples);
132
133 std::clock_t const TimeStampBegin = std::clock();
134
135 for(std::size_t i = 0; i < Samples; ++i)
136- Results[i] = taylorCosB(AngleShift.x + Begin + Steps * i);
137+ Results[i] = taylorCosB(AngleShift.x + Begin + Steps * float(i));
138
139 std::clock_t const TimeStampEnd = std::clock();
140
141@@ -510,12 +510,12 @@ namespace taylor2
142 std::vector<float> Results;
143 Results.resize(Samples);
144
145- float Steps = (End - Begin) / Samples;
146+ float Steps = (End - Begin) / float(Samples);
147
148 std::clock_t const TimeStampBegin = std::clock();
149
150 for(std::size_t i = 0; i < Samples; ++i)
151- Results[i] = taylorCosC(AngleShift.x + Begin + Steps * i);
152+ Results[i] = taylorCosC(AngleShift.x + Begin + Steps * float(i));
153
154 std::clock_t const TimeStampEnd = std::clock();
155
156--
1572.24.1
158
diff --git a/meta-oe/recipes-graphics/glm/glm/glm.pc.in b/meta-oe/recipes-graphics/glm/glm/glm.pc.in
new file mode 100644
index 000000000..54052e287
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm/glm.pc.in
@@ -0,0 +1,7 @@
1prefix=/usr
2includedir=${prefix}/include
3
4Name: GLM
5Description: OpenGL Mathematics
6Version: @VERSION@
7Cflags: -I${includedir}
diff --git a/meta-oe/recipes-graphics/glm/glm/glmConfig.cmake.in b/meta-oe/recipes-graphics/glm/glm/glmConfig.cmake.in
new file mode 100644
index 000000000..8ab23a18d
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm/glmConfig.cmake.in
@@ -0,0 +1,20 @@
1set(GLM_VERSION "@VERSION@")
2
3
4####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
5get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
6
7macro(set_and_check _var _file)
8 set(${_var} "${_file}")
9 if(NOT EXISTS "${_file}")
10 message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
11 endif()
12endmacro()
13
14####################################################################################
15
16set_and_check(GLM_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include")
17
18if (NOT CMAKE_VERSION VERSION_LESS "3.0")
19 include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake")
20endif()
diff --git a/meta-oe/recipes-graphics/glm/glm/glmConfigVersion.cmake.in b/meta-oe/recipes-graphics/glm/glm/glmConfigVersion.cmake.in
new file mode 100644
index 000000000..561a0db61
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm/glmConfigVersion.cmake.in
@@ -0,0 +1,31 @@
1# This is a basic version file for the Config-mode of find_package().
2# It is used by write_basic_package_version_file() as input file for configure_file()
3# to create a version-file which can be installed along a config.cmake file.
4#
5# The created file sets PACKAGE_VERSION_EXACT if the current version string and
6# the requested version string are exactly the same and it sets
7# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
8# The variable CVF_VERSION must be set before calling configure_file().
9
10set(PACKAGE_VERSION "@VERSION@")
11
12if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
13 set(PACKAGE_VERSION_COMPATIBLE FALSE)
14else()
15 set(PACKAGE_VERSION_COMPATIBLE TRUE)
16 if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
17 set(PACKAGE_VERSION_EXACT TRUE)
18 endif()
19endif()
20
21# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
22if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
23 return()
24endif()
25
26# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
27if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
28 math(EXPR installedBits "8 * 8")
29 set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
30 set(PACKAGE_VERSION_UNSUITABLE FALSE)
31endif()
diff --git a/meta-oe/recipes-graphics/glm/glm/glmTargets.cmake b/meta-oe/recipes-graphics/glm/glm/glmTargets.cmake
new file mode 100644
index 000000000..905b67731
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm/glmTargets.cmake
@@ -0,0 +1,107 @@
1# Generated by CMake
2
3if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
4 message(FATAL_ERROR "CMake >= 2.6.0 required")
5endif()
6cmake_policy(PUSH)
7cmake_policy(VERSION 2.6)
8#----------------------------------------------------------------
9# Generated CMake target import file.
10#----------------------------------------------------------------
11
12# Commands may need to know the format version.
13set(CMAKE_IMPORT_FILE_VERSION 1)
14
15# Protect against multiple inclusion, which would fail when already imported targets are added once more.
16set(_targetsDefined)
17set(_targetsNotDefined)
18set(_expectedTargets)
19foreach(_expectedTarget glm)
20 list(APPEND _expectedTargets ${_expectedTarget})
21 if(NOT TARGET ${_expectedTarget})
22 list(APPEND _targetsNotDefined ${_expectedTarget})
23 endif()
24 if(TARGET ${_expectedTarget})
25 list(APPEND _targetsDefined ${_expectedTarget})
26 endif()
27endforeach()
28if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
29 unset(_targetsDefined)
30 unset(_targetsNotDefined)
31 unset(_expectedTargets)
32 set(CMAKE_IMPORT_FILE_VERSION)
33 cmake_policy(POP)
34 return()
35endif()
36if(NOT "${_targetsDefined}" STREQUAL "")
37 message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
38endif()
39unset(_targetsDefined)
40unset(_targetsNotDefined)
41unset(_expectedTargets)
42
43
44# Compute the installation prefix relative to this file.
45get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
46# Use original install prefix when loaded through a
47# cross-prefix symbolic link such as /lib -> /usr/lib.
48get_filename_component(_realCurr "${_IMPORT_PREFIX}" REALPATH)
49get_filename_component(_realOrig "/usr/lib/cmake/glm" REALPATH)
50if(_realCurr STREQUAL _realOrig)
51 set(_IMPORT_PREFIX "/usr/lib/cmake/glm")
52endif()
53unset(_realOrig)
54unset(_realCurr)
55get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
56get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
57get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
58if(_IMPORT_PREFIX STREQUAL "/")
59 set(_IMPORT_PREFIX "")
60endif()
61
62# Create imported target glm
63add_library(glm INTERFACE IMPORTED)
64
65set_target_properties(glm PROPERTIES
66 INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
67)
68
69if(CMAKE_VERSION VERSION_LESS 3.0.0)
70 message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.")
71endif()
72
73# Load information for each installed configuration.
74get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
75file(GLOB CONFIG_FILES "${_DIR}/glmTargets-*.cmake")
76foreach(f ${CONFIG_FILES})
77 include(${f})
78endforeach()
79
80# Cleanup temporary variables.
81set(_IMPORT_PREFIX)
82
83# Loop over all imported files and verify that they actually exist
84foreach(target ${_IMPORT_CHECK_TARGETS} )
85 foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
86 if(NOT EXISTS "${file}" )
87 message(FATAL_ERROR "The imported target \"${target}\" references the file
88 \"${file}\"
89but this file does not exist. Possible reasons include:
90* The file was deleted, renamed, or moved to another location.
91* An install or uninstall procedure did not complete successfully.
92* The installation package was faulty and contained
93 \"${CMAKE_CURRENT_LIST_FILE}\"
94but not all the files it references.
95")
96 endif()
97 endforeach()
98 unset(_IMPORT_CHECK_FILES_FOR_${target})
99endforeach()
100unset(_IMPORT_CHECK_TARGETS)
101
102# This file does not depend on other imported targets which have
103# been exported from the same project but in a separate export set.
104
105# Commands beyond this point should not need to know the version.
106set(CMAKE_IMPORT_FILE_VERSION)
107cmake_policy(POP)
diff --git a/meta-oe/recipes-graphics/glm/glm_0.9.9.5.bb b/meta-oe/recipes-graphics/glm/glm_0.9.9.5.bb
deleted file mode 100644
index f367e4eae..000000000
--- a/meta-oe/recipes-graphics/glm/glm_0.9.9.5.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1SUMMARY = "OpenGL Mathematics Library"
2DESCRIPTION = "OpenGL Mathematics (GLM) is a header only C++ \
3mathematics library for graphics software based on the OpenGL \
4Shading Language (GLSL) specifications."
5HOMEPAGE = "https://glm.g-truc.net"
6BUGTRACKER = "https://github.com/g-truc/glm/issues"
7SECTION = "libs"
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://readme.md;beginline=21;endline=22;md5=3075b5727d36f29edccf97b93e72b790"
10
11SRC_URI = " \
12 git://github.com/g-truc/glm;branch=master \
13"
14# v0.9.9.5
15SRCREV = "d162eee1e6f7c317a09229fe6ceab8ec6ab9a4b4"
16
17S = "${WORKDIR}/git"
18
19inherit cmake
20
21RDEPENDS_${PN}-dev = ""
22
23BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb b/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
new file mode 100644
index 000000000..e2f4dbebc
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
@@ -0,0 +1,39 @@
1SUMMARY = "OpenGL Mathematics Library"
2DESCRIPTION = "OpenGL Mathematics (GLM) is a header only C++ \
3mathematics library for graphics software based on the OpenGL \
4Shading Language (GLSL) specifications."
5HOMEPAGE = "https://glm.g-truc.net"
6BUGTRACKER = "https://github.com/g-truc/glm/issues"
7SECTION = "libs"
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://copying.txt;md5=4a735e33f271f57404fda17e80085411"
10
11SRC_URI = " \
12 git://github.com/g-truc/glm;branch=master \
13 file://0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch \
14 file://glmConfig.cmake.in \
15 file://glmConfigVersion.cmake.in \
16 file://glm.pc.in \
17 file://glmTargets.cmake \
18"
19SRCREV = "4db8f89aace8f04c839b606e15b39fb8383ec732"
20
21S = "${WORKDIR}/git"
22
23inherit cmake
24
25do_install() {
26 install -d ${D}${includedir} ${D}${docdir}/glm ${D}${libdir}/pkgconfig ${D}${libdir}/cmake/glm
27 cp -R --no-dereference --preserve=mode,links ${S}/glm ${D}${includedir}
28 cp -R --no-dereference --preserve=mode,links ${S}/doc ${D}${docdir}/glm
29 rm ${D}${includedir}/glm/CMakeLists.txt
30 sed "s/@VERSION@/${PV}/" ${WORKDIR}/glmConfigVersion.cmake.in > ${D}${libdir}/cmake/glm/glmConfigVersion.cmake
31 sed "s/@VERSION@/${PV}/" ${WORKDIR}/glmConfig.cmake.in > ${D}${libdir}/cmake/glm/glmConfig.cmake
32 sed "s/@VERSION@/${PV}/" ${WORKDIR}/glm.pc.in > ${D}${libdir}/pkgconfig/glm.pc
33 install -Dm644 ${WORKDIR}/glmTargets.cmake ${D}${libdir}/cmake/glm/glmTargets.cmake
34
35}
36
37RDEPENDS_${PN}-dev = ""
38
39BBCLASSEXTEND = "native"