[Libreoffice-commits] core.git: download.lst external/glm slideshow/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 6 08:54:02 UTC 2020


 download.lst                                      |    4 +-
 external/glm/UnpackedTarball_glm.mk               |    3 +
 external/glm/Wshadow-patch-fix.patch              |   11 +++++
 external/glm/Wsign-compare.patch.0                |   20 ++++++++++
 external/glm/Wunused-parameter.patch              |   18 +++++++++
 external/glm/c++20.patch.0                        |   22 +++++------
 external/glm/clang-cl.patch.0                     |   42 +++++++++++++++-------
 slideshow/source/engine/opengl/Operation.cxx      |    4 +-
 slideshow/source/engine/opengl/TransitionImpl.cxx |    2 -
 9 files changed, 98 insertions(+), 28 deletions(-)

New commits:
commit 46e53c0360a38f620cf8c86fd0a3dc46c8238e0e
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Feb 5 23:26:19 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Feb 6 09:53:29 2020 +0100

    Revert "upgrade to latest glm"
    
    This reverts commit 494092dc0c2f6fd04dbd973d6f76f1df720dbcf7.  For reasons that
    are still unclear, it appears to be the cause for CppunitTest_vcl_pdfexport
    often (but not always) failing in Windows debug buidls, both --disable-64-bit
    and --enable-64-bit.  At least the 32 bit builds seem to all fail with
    
    > Assertion failed: false && "out of range", file ...\include\tools/bigint.hxx, line 146
    
    Change-Id: I472a83fa709e79f7a6bf00b118c041cbc7500e6a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88069
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/download.lst b/download.lst
index 6c0a5fb87694..f1066cac4aad 100644
--- a/download.lst
+++ b/download.lst
@@ -90,8 +90,8 @@ export FREEHAND_SHA256SUM := 0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d909
 export FREEHAND_TARBALL := libfreehand-0.1.2.tar.xz
 export FREETYPE_SHA256SUM := db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
 export FREETYPE_TARBALL := freetype-2.9.1.tar.bz2
-export GLM_SHA256SUM := c5e167c042afd2d7ad642ace6b643863baeb33880781983563e1ab68a30d3e95
-export GLM_TARBALL := glm-0.9.9.7.zip
+export GLM_SHA256SUM := d0312c360efe04dd048b3311fe375ff36f1993b4c2e3cb58c81062990532904a
+export GLM_TARBALL := bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
 export GPGME_SHA256SUM := 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb
 export GPGME_TARBALL := gpgme-1.9.0.tar.bz2
 export GRAPHITE_SHA256SUM := d47d387161db7f7ebade1920aa7cbdc797e79772597d8b55e80b58d1071bcc36
diff --git a/external/glm/UnpackedTarball_glm.mk b/external/glm/UnpackedTarball_glm.mk
index 934621eac841..940d12372b94 100644
--- a/external/glm/UnpackedTarball_glm.mk
+++ b/external/glm/UnpackedTarball_glm.mk
@@ -16,6 +16,9 @@ $(eval $(call gb_UnpackedTarball_set_patchflags,glm,$(if $(filter MSC,$(COM)),--
 $(eval $(call gb_UnpackedTarball_set_patchlevel,glm,1))
 
 $(eval $(call gb_UnpackedTarball_add_patches,glm, \
+    external/glm/Wshadow-patch-fix.patch \
+    external/glm/Wsign-compare.patch.0 \
+    external/glm/Wunused-parameter.patch \
     external/glm/clang-cl.patch.0 \
     external/glm/c++20.patch.0 \
 ))
diff --git a/external/glm/Wshadow-patch-fix.patch b/external/glm/Wshadow-patch-fix.patch
new file mode 100644
index 000000000000..3c25f40bda51
--- /dev/null
+++ b/external/glm/Wshadow-patch-fix.patch
@@ -0,0 +1,11 @@
+--- a/glm/core/type_vec4.hpp
++++ b/glm/core/type_vec4.hpp
+@@ -185,7 +185,7 @@
+ 		template <int E0, int E1>
+ 		GLM_FUNC_DECL tvec4(T const & x_, glm::detail::swizzle<2, T, tvec2<T>, E0, E1, -1, -2> const & v, T const & w_)
+ 		{
+-			*this = tvec4<T>(x_, v(), w);
++			*this = tvec4<T>(x_, v(), w_);
+ 		}
+ 
+ 		template <int E0, int E1>
diff --git a/external/glm/Wsign-compare.patch.0 b/external/glm/Wsign-compare.patch.0
new file mode 100644
index 000000000000..ef97121ff97f
--- /dev/null
+++ b/external/glm/Wsign-compare.patch.0
@@ -0,0 +1,20 @@
+--- glm/gtx/bit.inl
++++ glm/gtx/bit.inl
+@@ -576,7 +576,7 @@
+ 		assert(ToBit <= sizeof(genIUType) * std::size_t(8));
+ 
+ 		genIUType Result = Value;
+-		for(std::size_t i = 0; i <= ToBit; ++i)
++		for(int i = 0; i <= ToBit; ++i)
+ 			Result |= (1 << i);
+ 		return Result;
+ 	}
+@@ -593,7 +593,7 @@
+ 		assert(ToBit <= sizeof(genIUType) * std::size_t(8));
+ 
+ 		genIUType Result = Value;
+-		for(std::size_t i = 0; i <= ToBit; ++i)
++		for(int i = 0; i <= ToBit; ++i)
+ 			Result &= ~(1 << i);
+ 		return Result;
+ 	}
diff --git a/external/glm/Wunused-parameter.patch b/external/glm/Wunused-parameter.patch
new file mode 100644
index 000000000000..de1239702679
--- /dev/null
+++ b/external/glm/Wunused-parameter.patch
@@ -0,0 +1,18 @@
+--- glm/glm/gtx/bit.inl
++++ glm/glm/gtx/bit.inl
+@@ -572,6 +572,7 @@
+ 		int const & ToBit
+ 	)
+ 	{
++		(void) FromBit;
+ 		assert(FromBit <= ToBit);
+ 		assert(ToBit <= sizeof(genIUType) * std::size_t(8));
+ 
+@@ -589,6 +589,7 @@
+ 		int const & ToBit
+ 	)
+ 	{
++		(void) FromBit;
+ 		assert(FromBit <= ToBit);
+ 		assert(ToBit <= sizeof(genIUType) * std::size_t(8));
+ 
diff --git a/external/glm/c++20.patch.0 b/external/glm/c++20.patch.0
index 34a40b5ef4c6..559adde48946 100644
--- a/external/glm/c++20.patch.0
+++ b/external/glm/c++20.patch.0
@@ -1,11 +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;
- 	}
- 
+--- glm/core/type_half.inl
++++ glm/core/type_half.inl
+@@ -40,7 +40,7 @@
+ 		volatile float f = 1e10;
+ 
+ 		for(int i = 0; i < 10; ++i)	
+-			f *= f;             // this will overflow before
++			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
index 44713a1968c5..edbc30b2408b 100644
--- a/external/glm/clang-cl.patch.0
+++ b/external/glm/clang-cl.patch.0
@@ -1,14 +1,32 @@
 # "#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__^M
- #	pragma intrinsic(_BitScanReverse)
-+#endif
- #endif//(GLM_ARCH & GLM_ARCH_X86 && GLM_COMPILER & GLM_COMPILER_VC)
- #include <limits>
- 
+--- glm/core/func_integer.inl
++++ glm/core/func_integer.inl
+@@ -29,7 +29,9 @@
+ #if(GLM_ARCH != GLM_ARCH_PURE)
+ #if(GLM_COMPILER & GLM_COMPILER_VC)
+ #	include <intrin.h>
++#if !defined __clang__
+ #	pragma intrinsic(_BitScanReverse)
++#endif
+ #endif//(GLM_COMPILER & GLM_COMPILER_VC)
+ #endif//(GLM_ARCH != GLM_ARCH_PURE)
+ 
+
+# Fix check for availability of C++11 static_assert (it apparently should be
+# conditional on GLM_LANG_CXX11 instead of GLM_LANG_CXX0X, but just don't care
+# to try to fix that mess, and use __cplusplus value instead; unconditionally
+# using C++11 static_assert would fail in external/libgltf, which uses
+# external/glm but does not -std=c++11); falling back to BOOST_STATIC_ASSERT
+# would cause unnecessary warnings with clang-cl:
+--- glm/core/setup.hpp
++++ glm/core/setup.hpp
+@@ -628,7 +628,7 @@
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ // Static assert
+ 
+-#if(GLM_LANG == GLM_LANG_CXX0X)
++#if __cplusplus >= 201103L
+ #	define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
+ #elif(defined(BOOST_STATIC_ASSERT))
+ #	define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
diff --git a/slideshow/source/engine/opengl/Operation.cxx b/slideshow/source/engine/opengl/Operation.cxx
index e70f203edad7..6789fcc5ae6c 100644
--- a/slideshow/source/engine/opengl/Operation.cxx
+++ b/slideshow/source/engine/opengl/Operation.cxx
@@ -28,11 +28,11 @@
 
 #include <sal/config.h>
 
-#include <basegfx/numeric/ftools.hxx>
-
 #include <glm/gtc/matrix_transform.hpp>
 #include <glm/gtc/type_ptr.hpp>
 
+#include <basegfx/numeric/ftools.hxx>
+
 #include "Operation.hxx"
 
 SRotate::SRotate(const glm::vec3& Axis, const glm::vec3& Origin,
diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx
index d1926ab854f9..5078a8c23bfd 100644
--- a/slideshow/source/engine/opengl/TransitionImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionImpl.cxx
@@ -37,8 +37,8 @@
 
 #include <comphelper/random.hxx>
 
-#include "Operation.hxx"
 #include "TransitionImpl.hxx"
+#include "Operation.hxx"
 #include <math.h>
 
 TransitionScene::TransitionScene(TransitionScene const& rOther)


More information about the Libreoffice-commits mailing list