]> git.pld-linux.org Git - packages/GLM.git/commitdiff
switch to git snapshot (20230818)
authorJan Palus <atler@pld-linux.org>
Thu, 12 Oct 2023 14:40:10 +0000 (16:40 +0200)
committerJan Palus <atler@pld-linux.org>
Thu, 12 Oct 2023 14:40:10 +0000 (16:40 +0200)
- provides install target and cmake config
- include -fno-ipa-modref in CXXFLAGS to fix failing test:
  https://github.com/g-truc/glm/pull/1087

GLM.spec
x32.patch

index 4b730415b758fdfd1d4294df3f7ae2fbe3ee42d1..c4f98bb3a184e212448a5fd0dbd9a8638ed83e67 100644 (file)
--- a/GLM.spec
+++ b/GLM.spec
@@ -3,16 +3,20 @@
 %bcond_without tests           # build without tests
 %bcond_with    p7zip           # plain p7zip (compatible with both rpm4/rpm5)
 #
+%define                gitref  47585fde0c49fa77a2bf2fb1d2ead06999fd4b6e
+%define                snap    20230818
+%define                rel     1
+
 Summary:       OpenGL Mathematics (GLM) - C++ mathematics library for GLSL
 Summary(pl.UTF-8):     OpenGL Mathematics (GLM) - biblioteka matematyczna C++ dla GLSL
 Name:          GLM
-Version:       0.9.9.8
-Release:       1
+Version:       0.9.9.9
+Release:       0.%{snap}.%{rel}
 License:       MIT
 Group:         Development/Libraries
 #Source0Download: https://github.com/g-truc/glm/releases
-Source0:       https://github.com/g-truc/glm/releases/download/%{version}/glm-%{version}.7z
-# Source0-md5: c8342552801ebeb31497288192c4e793
+Source0:       https://github.com/g-truc/glm/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5: b288cb704cca5d1cd46be724ce61f428
 Patch0:                x32.patch
 URL:           https://glm.g-truc.net/
 BuildRequires: cmake >= 3.2
@@ -43,13 +47,14 @@ graficznych opartych na specyfikacji OpenGL Shading Language (GLSL).
 %setup -q -c -T -n glm
 7z x %{SOURCE0} -o..
 %else
-%setup -q -n glm
+%setup -q -n glm-%{gitref}
 %endif
 %patch0 -p1
 
 %build
 mkdir build
 cd build
+CXXFLAGS="%{rpmcxxflags} -fno-ipa-modref" \
 %cmake .. \
        -DGLM_TEST_ENABLE:BOOL=%{!?with_tests:OFF}%{?with_tests:ON}
 
@@ -60,9 +65,9 @@ cd build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_includedir}
 
-cp -a glm $RPM_BUILD_ROOT%{_includedir}
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -71,3 +76,4 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc manual.md readme.md
 %{_includedir}/glm
+%{_libdir}/cmake/glm
index 37c5572d9c98593a104e3424ad7e32beb0ef5999..00f7665c4b71881a363d78bf50a0d542c7653062 100644 (file)
--- a/x32.patch
+++ b/x32.patch
@@ -1,17 +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 @@
- {\r
-       int Error = 0;\r
-       \r
--      Error += ((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_32)) || ((sizeof(void*) == 8) && (GLM_MODEL == GLM_MODEL_64)) ? 0 : 1;\r
-+      Error += \r
-+              ((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_32)) || \r
-+              ((sizeof(void*) == 8) && (GLM_MODEL == GLM_MODEL_64))\r
-+#ifdef __ILP32__\r
-+              || ((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_64))\r
-+#endif\r
-+              ? 0 : 1;\r
-       \r
-       if(GLM_MODEL == GLM_MODEL_32)\r
-               std::printf("GLM_MODEL_32\n");\r
+ {
+       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");
This page took 0.182145 seconds and 4 git commands to generate.