[glm/f17] Update to glm-0.9.3.4 and work around problems

Joonas Sarajärvi muep at fedoraproject.org
Sun Sep 2 19:42:31 UTC 2012


commit cc1df445a7abba7df03cfcbfdfe694548cbbb525
Author: Joonas Sarajärvi <muep at iki.fi>
Date:   Sun Sep 2 22:25:10 2012 +0300

    Update to glm-0.9.3.4 and work around problems

 .gitignore                    |    1 +
 glm-no-gcc-integer-log2.patch |   15 +++++++++++++++
 glm.spec                      |   26 ++++++++++++++------------
 sources                       |    2 +-
 4 files changed, 31 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 94b35cc..6214021 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /glm-0.9.3.2.zip
+/glm-0.9.3.4.zip
diff --git a/glm-no-gcc-integer-log2.patch b/glm-no-gcc-integer-log2.patch
new file mode 100644
index 0000000..eb777e3
--- /dev/null
+++ b/glm-no-gcc-integer-log2.patch
@@ -0,0 +1,15 @@
+diff -ru glm-0.9.3.2-orig/glm/gtx/integer.inl glm-0.9.3.2/glm/gtx/integer.inl
+--- glm-0.9.3.2-orig/glm/gtx/integer.inl	2012-09-02 21:53:24.298350117 +0300
++++ glm-0.9.3.2/glm/gtx/integer.inl	2012-09-02 21:54:42.435203223 +0300
+@@ -60,10 +60,8 @@
+ 		template <typename T>
+ 		GLM_FUNC_QUALIFIER T operator() (T const & Value) const
+ 		{
+-#if(GLM_COMPILER & GLM_COMPILER_VC)
++#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))
+ 			return Value <= T(1) ? T(0) : T(32) - nlz(Value - T(1));
+-#elif(GLM_COMPILER & GLM_COMPILER_GCC)
+-			return Value <= T(1) ? T(0) : nlz(Value - T(1)) + 1;
+ #else
+ 			return T(32) - nlz(Value - T(1));
+ #endif
diff --git a/glm.spec b/glm.spec
index cf30253..7ec637c 100644
--- a/glm.spec
+++ b/glm.spec
@@ -2,13 +2,14 @@
 %global debug_package %{nil}
 
 Name:           glm
-Version:        0.9.3.2
-Release:        3%{?dist}
+Version:        0.9.3.4
+Release:        1%{?dist}
 Summary:        C++ mathematics library for graphics programming
 
 License:        MIT
 URL:            http://glm.g-truc.net/
 Source0:        http://downloads.sourceforge.net/ogl-math/%{name}-%{version}/%{name}-%{version}.zip
+Patch0:         glm-no-gcc-integer-log2.patch
 BuildRequires:  cmake
 
 %description
@@ -54,7 +55,6 @@ a programming manual for the %{name}-devel package.
 # When updating this package, take care to check if -c is
 # needed for the particular version.
 %setup -q
-
 # Remove some unnecessary binary files shipped in upstream
 # sources
 rm -r doc/build/
@@ -62,23 +62,21 @@ rm -r doc/build/
 # A couple of files had CRLF line-ends in them.
 sed -i 's/\r//' copying.txt
 sed -i 's/\r//' readme.txt
-sed -i 's/\r//' doc/api-0.9.3/tabs.css
-sed -i 's/\r//' doc/api-0.9.3/doxygen.css
-sed -i 's/\r//' doc/api-0.9.3/jquery.js
+sed -i 's/\r//' doc/html/tabs.css
+sed -i 's/\r//' doc/html/doxygen.css
+
+%patch0 -p1
 
 %build
 mkdir build
 cd build
-%{cmake} -DGLM_TEST_MODE=ON ..
+%{cmake} -DGLM_TEST_ENABLE=ON ..
 make %{?_smp_mflags}
 
 %check
 cd build
 
-# Remove the -E ^test-gtx_integer$ option when issue at
-# https://github.com/Groovounet/glm/issues/12
-# is resolved.
-ctest -E ^test-gtx_integer$ --output-on-failure
+ctest %{_smp_mflags} --output-on-failure
 
 %install
 cd build
@@ -93,9 +91,13 @@ find $RPM_BUILD_ROOT -name CMakeLists.txt -exec rm -f {} ';'
 
 %files doc
 %doc doc/%{name}-0.9.3.pdf
-%doc doc/api-0.9.3
+%doc doc/html/
 
 %changelog
+* Sun Sep 02 2012 Joonas Sarajärvi <muep at iki.fi> - 0.9.3.4-1
+- Update to a new upstream version
+- Work around problems in glm::log2 for integers
+
 * Sat Sep 01 2012 Joonas Sarajärvi <muep at iki.fi> - 0.9.3.2-3
 - Skip gtx_integer test that is known as broken
 
diff --git a/sources b/sources
index be25069..eb54a24 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-777793237f9612f825505f9e5ca04e30  glm-0.9.3.2.zip
+a0cea0871bd39f2d628c12f1181faffb  glm-0.9.3.4.zip


More information about the scm-commits mailing list