public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alfredo Tupone" <tupone@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/glm/files/, media-libs/glm/
Date: Fri, 13 Apr 2018 16:58:27 +0000 (UTC)	[thread overview]
Message-ID: <1523638645.2b7bb52573775e7a2a8334ba3c633d5b223d3d54.tupone@gentoo> (raw)

commit:     2b7bb52573775e7a2a8334ba3c633d5b223d3d54
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Sat Mar 31 06:25:53 2018 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri Apr 13 16:57:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b7bb525

media-libs/glm: Fix tests with GCC-7

Bug: https://bugs.gentoo.org/638312
Closes: https://bugs.gentoo.org/638312
Closes: https://github.com/gentoo/gentoo/pull/7730
Package-Manager: Portage-2.3.16, Repoman-2.3.6

 media-libs/glm/files/glm-0.9.8.5-gcc7_tests.patch | 70 +++++++++++++++++++++++
 media-libs/glm/glm-0.9.8.5-r1.ebuild              |  1 +
 2 files changed, 71 insertions(+)

diff --git a/media-libs/glm/files/glm-0.9.8.5-gcc7_tests.patch b/media-libs/glm/files/glm-0.9.8.5-gcc7_tests.patch
new file mode 100644
index 00000000000..d7744aed555
--- /dev/null
+++ b/media-libs/glm/files/glm-0.9.8.5-gcc7_tests.patch
@@ -0,0 +1,70 @@
+Bug: https://bugs.gentoo.org/638312
+Upstream commit: https://github.com/g-truc/glm/commit/e37cf6e47fa4305c82845103b17af58f6cfe23db
+
+From e37cf6e47fa4305c82845103b17af58f6cfe23db Mon Sep 17 00:00:00 2001
+From: Christophe Riccio <christophe.riccio@unity3d.com>
+Date: Thu, 17 Aug 2017 00:08:37 +0200
+Subject: [PATCH] Fixed GCC 7.1.0 failing tests #666
+
+---
+ test/core/core_type_mat2x4.cpp | 4 +++-
+ test/core/core_type_mat3x4.cpp | 4 +++-
+ test/core/core_type_mat4x4.cpp | 3 ++-
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/test/core/core_type_mat2x4.cpp b/test/core/core_type_mat2x4.cpp
+index 17afebf91..eea3e46f4 100644
+--- a/test/core/core_type_mat2x4.cpp
++++ b/test/core/core_type_mat2x4.cpp
+@@ -1,3 +1,5 @@
++#include <glm/gtc/epsilon.hpp>
++#include <glm/gtc/constants.hpp>
+ #include <glm/vector_relational.hpp>
+ #include <glm/mat2x2.hpp>
+ #include <glm/mat2x3.hpp>
+@@ -83,7 +85,7 @@ namespace cast
+ 		glm::mat2x4 Identity(1.0f);
+ 
+ 		for(glm::length_t i = 0, length = B.length(); i < length; ++i)
+-			Error += glm::all(glm::equal(B[i], Identity[i])) ? 0 : 1;
++			Error += glm::all(glm::epsilonEqual(B[i], Identity[i], glm::epsilon<float>())) ? 0 : 1;
+ 
+ 		return Error;
+ 	}
+diff --git a/test/core/core_type_mat3x4.cpp b/test/core/core_type_mat3x4.cpp
+index e3b78d31b..74a45d87a 100644
+--- a/test/core/core_type_mat3x4.cpp
++++ b/test/core/core_type_mat3x4.cpp
+@@ -1,3 +1,5 @@
++#include <glm/gtc/epsilon.hpp>
++#include <glm/gtc/constants.hpp>
+ #include <glm/vector_relational.hpp>
+ #include <glm/mat2x2.hpp>
+ #include <glm/mat2x3.hpp>
+@@ -87,7 +89,7 @@ namespace cast
+ 		glm::mat3x4 Identity(1.0f);
+ 
+ 		for(glm::length_t i = 0, length = B.length(); i < length; ++i)
+-			Error += glm::all(glm::equal(B[i], Identity[i])) ? 0 : 1;
++			Error += glm::all(glm::epsilonEqual(B[i], Identity[i], glm::epsilon<float>())) ? 0 : 1;
+ 
+ 		return Error;
+ 	}
+diff --git a/test/core/core_type_mat4x4.cpp b/test/core/core_type_mat4x4.cpp
+index 3966c2b7f..fd2aca8b4 100644
+--- a/test/core/core_type_mat4x4.cpp
++++ b/test/core/core_type_mat4x4.cpp
+@@ -1,3 +1,4 @@
++#include <glm/gtc/constants.hpp>
+ #include <glm/gtc/epsilon.hpp>
+ #include <glm/matrix.hpp>
+ #include <glm/mat2x2.hpp>
+@@ -263,7 +264,7 @@ namespace cast
+ 		glm::mat4x4 Identity(1.0f);
+ 
+ 		for(glm::length_t i = 0, length = B.length(); i < length; ++i)
+-			Error += glm::all(glm::equal(B[i], Identity[i])) ? 0 : 1;
++			Error += glm::all(glm::epsilonEqual(B[i], Identity[i], glm::epsilon<float>())) ? 0 : 1;
+ 
+ 		return Error;
+ 	}

diff --git a/media-libs/glm/glm-0.9.8.5-r1.ebuild b/media-libs/glm/glm-0.9.8.5-r1.ebuild
index 073f3bee1e2..b30d2b1a0f8 100644
--- a/media-libs/glm/glm-0.9.8.5-r1.ebuild
+++ b/media-libs/glm/glm-0.9.8.5-r1.ebuild
@@ -18,6 +18,7 @@ RDEPEND="virtual/opengl"
 
 PATCHES=(
 	"${FILESDIR}/glm-gcc73.patch"
+	"${FILESDIR}/${P}-gcc7_tests.patch"
 )
 
 src_configure() {


             reply	other threads:[~2018-04-13 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 16:58 Alfredo Tupone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-06 22:10 [gentoo-commits] repo/gentoo:master commit in: media-libs/glm/files/, media-libs/glm/ Andreas Sturmlechner
2024-01-25  6:50 Alfredo Tupone
2020-01-08  7:33 Alfredo Tupone
2019-10-29 21:22 Alfredo Tupone
2019-09-12  7:02 Alfredo Tupone
2019-09-10  6:48 Alfredo Tupone
2018-01-26 23:53 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1523638645.2b7bb52573775e7a2a8334ba3c633d5b223d3d54.tupone@gentoo \
    --to=tupone@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox