package/glm: bump to version 0.9.9.3
PATCH 1/1 package/glm: bump to version 0.9.9.3
- Disable tests as they are enabled by default since version 0.9.9.1:
https://github.com/g-truc/glm/commit/d307d390193f4027faec48ac79d7f74b2bec6e56
- Static and shared libraries are always built since version 0.9.9.1:
https://github.com/g-truc/glm/commit/a23dd2f800185a5e233534fed82fc5c2840fbe5c
So, add a patch to fix this behavior and disable them as GLM is header-ony
- Add hash for license file (now in manual.md#section0)
Fixes:
- http://autobuild.buildroot.org/results/3cf1fd3387bd4952470edcfcb93d44f58c9e7ff7
--- ...ts-add-BUILD_-SHARED-STATIC-_LIBS-options.patch | 62 ++++++++++++++++++++++ package/glm/glm.hash | 3 +- package/glm/glm.mk | 10 +++- 3 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch
package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch new file +62 -0
@@ -0,0 +1,62 @@ +From efd91329baae4ceeac47307c6634af999a07bb2e Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 16 Feb 2019 23:45:21 +0100 +Subject: [PATCH] CMakeLists: add BUILD_{SHARED,STATIC}_LIBS options + +Add BUILD_SHARED_LIBS and BUILD_STATIC_LIBS options to allow the user +to enable/disable building of shared and static library + +This is especially useful when cross-compiling as some toolchains are +not always able to build a shared or a static library + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/g-truc/glm/pull/871] +--- + CMakeLists.txt | 2 ++ + glm/CMakeLists.txt | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ceccb1e1..10bb1af0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,6 +12,8 @@ include(CMakePackageConfigHelpers) + enable_testing() + + option(GLM_QUIET "No CMake Message" OFF) ++option(BUILD_SHARED_LIBS "Build shared library" ON) ++option(BUILD_STATIC_LIBS "Build static library" ON) + option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF) + option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF) + option(GLM_TEST_ENABLE_CXX_14 "Enable C++ 14" OFF) +diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt +index 01c594f4..032340d4 100644 +--- a/glm/CMakeLists.txt ++++ b/glm/CMakeLists.txt +@@ -44,6 +44,7 @@ source_group("SIMD Files" FILES ${SIMD_HEADER}) + + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) + ++if(BUILD_STATIC_LIBS) + add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} +@@ -51,7 +52,9 @@ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}) ++endif() + ++if(BUILD_SHARED_LIBS) + add_library(glm_shared SHARED ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} +@@ -59,4 +62,5 @@ add_library(glm_shared SHARED ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}) ++endif() + +-- +2.14.1 +
package/glm/glm.hash +2 -1
@@ -1,2 +1,3 @@ # Locally calculated -sha256 a220e60f8711265595be3221e530d632d5823641ecd46a3a54bc174933bff14c glm-0.9.8.4.tar.gz +sha256 fba9fd177073a36c5a7798c74b28e79ba6deb8f4bb0d2dbfc0e207c27da7e12c glm-0.9.9.3.tar.gz +sha256 7b27b9d9be8ef1ad8d51d58eaefca1babc4287227c90344390a1759c86dc6d6f manual.md
package/glm/glm.mk +8 -2
@@ -4,14 +4,20 @@ # ################################################################################ -GLM_VERSION = 0.9.8.4 +GLM_VERSION = 0.9.9.3 GLM_SITE = $(call github,g-truc,glm,$(GLM_VERSION)) GLM_LICENSE = MIT -GLM_LICENSE_FILES = copying.txt +GLM_LICENSE_FILES = manual.md # GLM is a header-only library, it only makes sense # to have it installed into the staging directory. GLM_INSTALL_STAGING = YES GLM_INSTALL_TARGET = NO +# Don't build libraries as GLM is header-only +GLM_CONF_OPTS = \ + -DGLM_TEST_ENABLE=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_STATIC_LIBS=OFF + $(eval $(cmake-package))
Signature · 1 line
2.14.1
PATCH 1/1 package/glm: bump to version 0.9.9.3
Hello Fabrice,
Quoted 6 lines · On Sun, 17 Feb 2019 10:35:29 +0100 Fabrice Fontaine…
- Disable tests as they are enabled by default since version 0.9.9.1:
https://github.com/g-truc/glm/commit/d307d390193f4027faec48ac79d7f74b2bec6e56
- Static and shared libraries are always built since version 0.9.9.1:
https://github.com/g-truc/glm/commit/a23dd2f800185a5e233534fed82fc5c2840fbe5c
So, add a patch to fix this behavior and disable them as GLM is header-ony
I don't understand this. Why does the glm CMakeLists.txt has provision to build static and shared libraries if it's a header-only library ?
package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch line 47
Quoted 8 lines
++if(BUILD_STATIC_LIBS)
+ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch new file +6
-0+ ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} +@@ -51,7 +52,9 @@ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER})
I.e, what is this code doing ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/glm: bump to version 0.9.9.3
Dear Thomas,
Le dim. 17 f?vr. 2019 ? 15:54, Thomas Petazzoni
<[email protected]> a ?crit :
Quoted 13 lines
Hello Fabrice,
Quoted 6 lines · On Sun, 17 Feb 2019 10:35:29 +0100 Fabrice Fontaine…
- Disable tests as they are enabled by default since version 0.9.9.1:
https://github.com/g-truc/glm/commit/d307d390193f4027faec48ac79d7f74b2bec6e56
- Static and shared libraries are always built since version 0.9.9.1:
https://github.com/g-truc/glm/commit/a23dd2f800185a5e233534fed82fc5c2840fbe5c
So, add a patch to fix this behavior and disable them as GLM is header-ony
Quoted 2 lines
I don't understand this. Why does the glm CMakeLists.txt has provision to build static and shared libraries if it's a header-only library ?
Current version of glm already provides the possibility to build these libraries through GLM_STATIC_LIBRARY_ENABLE and GLM_SHARED_LIBRARY_ENABLE but these options are disabled by default. In the current version, if these two options are disabled, glm tries to build a glm_dummy executable with the only cpp file in the glm directory (i.e. glm/detail/glm.cpp which defines a glm namespace with all the glm structures). This glm_dummy executable raises some build failures.
I don't really understand how these libraries could be useful,. However, to keep current behavior, I decided to disable them. If I get a feedback on my PR, I'll ask upstream about it.
Quoted 12 lines
package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch line 47
Quoted 9 lines
++if(BUILD_STATIC_LIBS)
+ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch new file +6
-0+ ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} +@@ -51,7 +52,9 @@ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER})I.e, what is this code doing ?
Quoted 7 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Best Regards,
Fabrice
PATCH 1/1 package/glm: bump to version 0.9.9.3
Dear all,
Le dim. 17 f?vr. 2019 ? 17:53, Fabrice Fontaine
<[email protected]> a ?crit :
Quoted 19 lines
Dear Thomas,
Le dim. 17 f?vr. 2019 ? 15:54, Thomas Petazzoni
<[email protected]> a ?crit :Quoted 13 lines
Hello Fabrice,
Quoted 6 lines · On Sun, 17 Feb 2019 10:35:29 +0100 Fabrice Fontaine…
- Disable tests as they are enabled by default since version 0.9.9.1:
https://github.com/g-truc/glm/commit/d307d390193f4027faec48ac79d7f74b2bec6e56
- Static and shared libraries are always built since version 0.9.9.1:
https://github.com/g-truc/glm/commit/a23dd2f800185a5e233534fed82fc5c2840fbe5c
So, add a patch to fix this behavior and disable them as GLM is header-onyQuoted 2 lines
I don't understand this. Why does the glm CMakeLists.txt has provision to build static and shared libraries if it's a header-only library ?
Quoted 11 lines
Current version of glm already provides the possibility to build these libraries through
GLM_STATIC_LIBRARY_ENABLEandGLM_SHARED_LIBRARY_ENABLEbut these options are disabled by default. In the current version, if these two options are disabled, glm tries to build aglm_dummyexecutable with the only cpp file in the glm directory (i.e. glm/detail/glm.cpp which defines a glm namespace with all the glm structures). Thisglm_dummyexecutable raises some build failures.
I don't really understand how these libraries could be useful,. However, to keep current behavior, I decided to disable them. If I get a feedback on my PR, I'll ask upstream about it.
For your information, I asked upstream about it
(https://github.com/g-truc/glm/pull/871) but I got no answer. Then I sent a PR to remove those libraries which was merged
(https://github.com/g-truc/glm/pull/878) but reverted a few hours later (https://github.com/g-truc/glm/pull/879) so I think that's upstream really wants to keep those libraries.
Quoted 14 lines
Quoted 14 lines
package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch line 47
Quoted 9 lines
++if(BUILD_STATIC_LIBS)
+ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}package/glm/0001-CMakeLists-add-BUILD_-SHARED-STATIC-_LIBS-options.patch new file +6
-0+ ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} +@@ -51,7 +52,9 @@ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER})I.e, what is this code doing ?
Thanks,
Quoted 8 lines
Quoted 5 lines
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.comBest Regards,
Fabrice
Best Regards,
Fabrice