From 4bdf9187e43a706ac2a2d5687c61057babc9457c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Saraj=C3=A4rvi?= Date: Fri, 8 Mar 2013 10:22:31 +0200 Subject: [PATCH] Update to glm-0.9.4.2 --- .gitignore | 1 + glm-0.9.4.2-negative-multiple.patch | 48 +++++++++++++++++++++++++++++ glm-no-gcc-integer-log2.patch | 15 --------- glm.spec | 22 +++++++------ sources | 2 +- 5 files changed, 62 insertions(+), 26 deletions(-) create mode 100644 glm-0.9.4.2-negative-multiple.patch delete mode 100644 glm-no-gcc-integer-log2.patch diff --git a/.gitignore b/.gitignore index 6214021..35c32b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /glm-0.9.3.2.zip /glm-0.9.3.4.zip +/glm-0.9.4.2.zip diff --git a/glm-0.9.4.2-negative-multiple.patch b/glm-0.9.4.2-negative-multiple.patch new file mode 100644 index 0000000..fa899ac --- /dev/null +++ b/glm-0.9.4.2-negative-multiple.patch @@ -0,0 +1,48 @@ +diff -ru glm-0.9.4.2.orig/test/gtx/gtx_multiple.cpp glm-0.9.4.2/test/gtx/gtx_multiple.cpp +--- glm-0.9.4.2.orig/test/gtx/gtx_multiple.cpp 2012-12-22 14:39:48.000000000 +0200 ++++ glm-0.9.4.2/test/gtx/gtx_multiple.cpp 2013-03-07 23:53:19.101880834 +0200 +@@ -14,12 +14,17 @@ + { + int Error(0); + +- int Higher0 = glm::higherMultiple(-5, 4); +- Error += Higher0 == -4 ? 0 : 1; +- Error += glm::higherMultiple(-4, 4) == -4 ? 0 : 1; +- Error += glm::higherMultiple(-3, 4) == -4 ? 0 : 1; +- Error += glm::higherMultiple(-2, 4) == -4 ? 0 : 1; +- Error += glm::higherMultiple(-1, 4) == -4 ? 0 : 1; ++ // Upstream claims that negative input is not supported. ++ // Thus we do not test for it, to avoid test failure. ++ // ++ // See https://github.com/g-truc/glm/issues/51 ++ // int Higher0 = glm::higherMultiple(-5, 4); ++ // Error += Higher0 == -4 ? 0 : 1; ++ // Error += glm::higherMultiple(-4, 4) == -4 ? 0 : 1; ++ // Error += glm::higherMultiple(-3, 4) == -4 ? 0 : 1; ++ // Error += glm::higherMultiple(-2, 4) == -4 ? 0 : 1; ++ // Error += glm::higherMultiple(-1, 4) == -4 ? 0 : 1; ++ + Error += glm::higherMultiple(0, 4) == 0 ? 0 : 1; + Error += glm::higherMultiple(4, 4) == 4 ? 0 : 1; + Error += glm::higherMultiple(5, 4) == 8 ? 0 : 1; +@@ -35,11 +40,15 @@ + { + int Error(0); + +- Error += glm::lowerMultiple(-5, 4) == -4 ? 0 : 1; +- Error += glm::lowerMultiple(-4, 4) == -4 ? 0 : 1; +- Error += glm::lowerMultiple(-3, 4) == 0 ? 0 : 1; +- Error += glm::lowerMultiple(-2, 4) == 0 ? 0 : 1; +- Error += glm::lowerMultiple(-1, 4) == 0 ? 0 : 1; ++ // Upstream claims that negative input is not supported. ++ // Thus we do not test for it, to avoid test failure. ++ // ++ // See https://github.com/g-truc/glm/issues/51 ++ // Error += glm::lowerMultiple(-5, 4) == -4 ? 0 : 1; ++ // Error += glm::lowerMultiple(-4, 4) == -4 ? 0 : 1; ++ // Error += glm::lowerMultiple(-3, 4) == 0 ? 0 : 1; ++ // Error += glm::lowerMultiple(-2, 4) == 0 ? 0 : 1; ++ // Error += glm::lowerMultiple(-1, 4) == 0 ? 0 : 1; + Error += glm::lowerMultiple(0, 4) == 0 ? 0 : 1; + Error += glm::lowerMultiple(4, 4) == 4 ? 0 : 1; + Error += glm::lowerMultiple(5, 4) == 4 ? 0 : 1; diff --git a/glm-no-gcc-integer-log2.patch b/glm-no-gcc-integer-log2.patch deleted file mode 100644 index eb777e3..0000000 --- a/glm-no-gcc-integer-log2.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 - 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 5dd7174..4802423 100644 --- a/glm.spec +++ b/glm.spec @@ -2,14 +2,14 @@ %global debug_package %{nil} Name: glm -Version: 0.9.3.4 -Release: 3%{?dist} +Version: 0.9.4.2 +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 +Patch0: glm-0.9.4.2-negative-multiple.patch Patch1: glm-0.9.3.4-secondary.patch BuildRequires: cmake @@ -56,15 +56,14 @@ 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/ # A couple of files had CRLF line-ends in them. +# Check with rpmlint after updating the package that we are not +# forgetting to convert line endings in some files. sed -i 's/\r//' copying.txt sed -i 's/\r//' readme.txt -sed -i 's/\r//' doc/html/tabs.css -sed -i 's/\r//' doc/html/doxygen.css +sed -i 's/\r//' doc/api/tabs.css +sed -i 's/\r//' doc/api/doxygen.css %patch0 -p1 %ifnarch %{ix86} x86_64 @@ -94,10 +93,13 @@ find $RPM_BUILD_ROOT -name CMakeLists.txt -exec rm -f {} ';' %{_includedir}/%{name} %files doc -%doc doc/%{name}-0.9.3.pdf -%doc doc/html/ +%doc doc/%{name}.pdf +%doc doc/api/ %changelog +* Fri Mar 08 2013 Joonas Sarajärvi - 0.9.4.2-1 +- Update to upstream GLM version 0.9.4.2 + * Wed Feb 13 2013 Fedora Release Engineering - 0.9.3.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index eb54a24..1bdf7d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a0cea0871bd39f2d628c12f1181faffb glm-0.9.3.4.zip +2608a4e0e2d32b140abc5f17238c04f3 glm-0.9.4.2.zip