[packages/GLM] - fix tests on x32

baggins baggins at pld-linux.org
Thu Mar 19 23:45:31 CET 2020


commit 395fffb0e93a2e72094e855b7fd3a30ad43bf754
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Mar 19 23:45:19 2020 +0100

    - fix tests on x32

 GLM.spec  |  2 ++
 x32.patch | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)
---
diff --git a/GLM.spec b/GLM.spec
index 84e32a6..d23cff6 100644
--- a/GLM.spec
+++ b/GLM.spec
@@ -14,6 +14,7 @@ Group:		Development/Libraries
 Source0:	https://github.com/g-truc/glm/releases/download/%{version}/glm-%{version}.7z
 # Source0-md5:	546245878ba4fc64f9af03c1c88b9ec9
 Patch0:		%{name}-opt.patch
+Patch1:		x32.patch
 URL:		https://glm.g-truc.net/
 BuildRequires:	cmake >= 3.2
 %if %{with p7zip}
@@ -43,6 +44,7 @@ graficznych opartych na specyfikacji OpenGL Shading Language (GLSL).
 %setup -q -n glm
 %endif
 %patch0 -p1
+%patch1 -p1
 
 %build
 mkdir build
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..37c5572
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,17 @@
+--- glm/test/core/core_setup_message.cpp.orig	2020-03-19 23:36:32.000000000 +0100
++++ glm/test/core/core_setup_message.cpp	2020-03-19 23:43:46.417701188 +0100
+@@ -155,7 +155,13 @@
+ {
+ 	int Error = 0;
+ 	
+-	Error += ((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_32)) || ((sizeof(void*) == 8) && (GLM_MODEL == GLM_MODEL_64)) ? 0 : 1;
++	Error += 
++		((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_32)) || 
++		((sizeof(void*) == 8) && (GLM_MODEL == GLM_MODEL_64))
++#ifdef __ILP32__
++		|| ((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_64))
++#endif
++		? 0 : 1;
+ 	
+ 	if(GLM_MODEL == GLM_MODEL_32)
+ 		std::printf("GLM_MODEL_32\n");
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/GLM.git/commitdiff/395fffb0e93a2e72094e855b7fd3a30ad43bf754



More information about the pld-cvs-commit mailing list