diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/glm | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | external/glm/Makefile | 7 | ||||
-rw-r--r-- | external/glm/Module_glm.mk | 16 | ||||
-rw-r--r-- | external/glm/README | 3 | ||||
-rw-r--r-- | external/glm/UnpackedTarball_glm.mk | 23 | ||||
-rw-r--r-- | external/glm/c++20.patch.0 | 11 | ||||
-rw-r--r-- | external/glm/clang-cl.patch.0 | 14 |
6 files changed, 74 insertions, 0 deletions
diff --git a/external/glm/Makefile b/external/glm/Makefile new file mode 100644 index 0000000000..e4968cf85f --- /dev/null +++ b/external/glm/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/glm/Module_glm.mk b/external/glm/Module_glm.mk new file mode 100644 index 0000000000..617b067a2c --- /dev/null +++ b/external/glm/Module_glm.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,glm)) + +$(eval $(call gb_Module_add_targets,glm,\ + UnpackedTarball_glm \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/glm/README b/external/glm/README new file mode 100644 index 0000000000..30122f67b5 --- /dev/null +++ b/external/glm/README @@ -0,0 +1,3 @@ +Glm provides a header only library for OpenGL mathematics. + +It is available from http://glm.g-truc.net/0.9.4/index.html diff --git a/external/glm/UnpackedTarball_glm.mk b/external/glm/UnpackedTarball_glm.mk new file mode 100644 index 0000000000..934621eac8 --- /dev/null +++ b/external/glm/UnpackedTarball_glm.mk @@ -0,0 +1,23 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,glm)) + +$(eval $(call gb_UnpackedTarball_set_tarball,glm,$(GLM_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchflags,glm,$(if $(filter MSC,$(COM)),--binary))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,glm,1)) + +$(eval $(call gb_UnpackedTarball_add_patches,glm, \ + external/glm/clang-cl.patch.0 \ + external/glm/c++20.patch.0 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/glm/c++20.patch.0 b/external/glm/c++20.patch.0 new file mode 100644 index 0000000000..9fdd813a1e --- /dev/null +++ b/external/glm/c++20.patch.0 @@ -0,0 +1,11 @@ +--- glm/detail/type_half.inl ++++ glm/detail/type_half.inl +@@ -6,7 +6,7 @@ + volatile float f = 1e10;
+
+ for(int i = 0; i < 10; ++i)
+- f *= f; // this will overflow before the for loop terminates
++ f = f * f; // this will overflow before the for loop terminates
+ return f;
+ }
+
diff --git a/external/glm/clang-cl.patch.0 b/external/glm/clang-cl.patch.0 new file mode 100644 index 0000000000..e5536e1450 --- /dev/null +++ b/external/glm/clang-cl.patch.0 @@ -0,0 +1,14 @@ +# "#pragma intrinsic" not (yet?) handled in the "if (LangOpts.MicrosoftExt)" +# block in Preprocessor::RegisterBuiltinPragmas in Clang's lib/Lex/Pragma.cpp: +--- glm/detail/func_integer.inl ++++ glm/detail/func_integer.inl +@@ -3,7 +3,9 @@ + #include "_vectorize.hpp"
+ #if(GLM_ARCH & GLM_ARCH_X86 && GLM_COMPILER & GLM_COMPILER_VC)
+ # include <intrin.h>
++#if !defined __clang__
+ # pragma intrinsic(_BitScanReverse)
++#endif
+ #endif//(GLM_ARCH & GLM_ARCH_X86 && GLM_COMPILER & GLM_COMPILER_VC)
+ #include <limits>
+
|