From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A861F1382C5 for ; Fri, 5 Feb 2021 21:57:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA44BE087E; Fri, 5 Feb 2021 21:57:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A920CE087E for ; Fri, 5 Feb 2021 21:57:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0ECC8343075 for ; Fri, 5 Feb 2021 21:57:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B789E478 for ; Fri, 5 Feb 2021 21:57:21 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1612562236.c74dcd154317d93fc07455b0f03bb442d592ca35.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/glm/, media-libs/glm/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/glm/files/glm-0.9.9.8-big-endian-tests.patch media-libs/glm/glm-0.9.9.8-r1.ebuild X-VCS-Directories: media-libs/glm/files/ media-libs/glm/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c74dcd154317d93fc07455b0f03bb442d592ca35 X-VCS-Branch: master Date: Fri, 5 Feb 2021 21:57:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5e2f11b5-4367-4ec7-b783-a0ab73ec4b23 X-Archives-Hash: b947097c860b77b94fcabcb90806bd0a commit: c74dcd154317d93fc07455b0f03bb442d592ca35 Author: Sam James gentoo org> AuthorDate: Fri Feb 5 21:57:16 2021 +0000 Commit: Sam James gentoo org> CommitDate: Fri Feb 5 21:57:16 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c74dcd15 media-libs/glm: fix tests on big endian arches Closes: https://bugs.gentoo.org/673972 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Sam James gentoo.org> .../glm/files/glm-0.9.9.8-big-endian-tests.patch | 186 +++++++++++++++++++++ media-libs/glm/glm-0.9.9.8-r1.ebuild | 3 +- 2 files changed, 187 insertions(+), 2 deletions(-) diff --git a/media-libs/glm/files/glm-0.9.9.8-big-endian-tests.patch b/media-libs/glm/files/glm-0.9.9.8-big-endian-tests.patch new file mode 100644 index 00000000000..cc8b1b637a8 --- /dev/null +++ b/media-libs/glm/files/glm-0.9.9.8-big-endian-tests.patch @@ -0,0 +1,186 @@ +https://github.com/g-truc/glm/commit/06ce42e72324b32b1f4c37c646e99950c2bd5f6b.patch +https://bugs.gentoo.org/673972 + +Not yet applied upstream because is not available on non-Linux platforms. + +From 06ce42e72324b32b1f4c37c646e99950c2bd5f6b Mon Sep 17 00:00:00 2001 +From: Max Rees +Date: Sun, 15 Mar 2020 15:13:27 -0400 +Subject: [PATCH] Fix test suite on big endian platforms + +--- + glm/gtc/packing.inl | 55 ++++++++++++++++++++++++++++++++++++++++ + test/gtc/gtc_packing.cpp | 3 ++- + 2 files changed, 57 insertions(+), 1 deletion(-) + +diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl +index 8c906e16c..b1c99a507 100644 +--- a/glm/gtc/packing.inl ++++ b/glm/gtc/packing.inl +@@ -9,6 +9,9 @@ + #include "../detail/type_half.hpp" + #include + #include ++extern "C" { ++#include ++} + + namespace glm{ + namespace detail +@@ -183,9 +186,15 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + uint x : 3; + uint y : 3; + uint z : 2; ++#else ++ uint z : 2; ++ uint y : 3; ++ uint x : 3; ++#endif + } data; + uint8 pack; + }; +@@ -194,8 +203,13 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + uint x : 4; + uint y : 4; ++#else ++ uint y : 4; ++ uint x : 4; ++#endif + } data; + uint8 pack; + }; +@@ -204,10 +218,17 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + uint x : 4; + uint y : 4; + uint z : 4; + uint w : 4; ++#else ++ uint w : 4; ++ uint z : 4; ++ uint y : 4; ++ uint x : 4; ++#endif + } data; + uint16 pack; + }; +@@ -216,9 +237,15 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + uint x : 5; + uint y : 6; + uint z : 5; ++#else ++ uint z : 5; ++ uint y : 6; ++ uint x : 5; ++#endif + } data; + uint16 pack; + }; +@@ -227,10 +254,17 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + uint x : 5; + uint y : 5; + uint z : 5; + uint w : 1; ++#else ++ uint w : 1; ++ uint z : 5; ++ uint y : 5; ++ uint x : 5; ++#endif + } data; + uint16 pack; + }; +@@ -239,10 +273,17 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + uint x : 10; + uint y : 10; + uint z : 10; + uint w : 2; ++#else ++ uint w : 2; ++ uint z : 10; ++ uint y : 10; ++ uint x : 10; ++#endif + } data; + uint32 pack; + }; +@@ -251,10 +292,17 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + int x : 10; + int y : 10; + int z : 10; + int w : 2; ++#else ++ int w : 2; ++ int z : 10; ++ int y : 10; ++ int x : 10; ++#endif + } data; + uint32 pack; + }; +@@ -263,10 +311,17 @@ namespace detail + { + struct + { ++#if BYTE_ORDER == LITTLE_ENDIAN + uint x : 9; + uint y : 9; + uint z : 9; + uint w : 5; ++#else ++ uint w : 5; ++ uint z : 9; ++ uint y : 9; ++ uint x : 9; ++#endif + } data; + uint32 pack; + }; +diff --git a/test/gtc/gtc_packing.cpp b/test/gtc/gtc_packing.cpp +index df5b3bb1a..fbaaa5bcc 100644 +--- a/test/gtc/gtc_packing.cpp ++++ b/test/gtc/gtc_packing.cpp +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + void print_bits(float const& s) + { +@@ -156,7 +157,7 @@ int test_U3x10_1x2() + + glm::u8vec4 const v0(0xff, 0x77, 0x0, 0x33); + glm::uint32 const p0 = *reinterpret_cast(&v0[0]); +- glm::uint32 const r0 = 0x330077ff; ++ glm::uint32 const r0 = htonl(0xff770033); + + Error += p0 == r0 ? 0 : 1; + diff --git a/media-libs/glm/glm-0.9.9.8-r1.ebuild b/media-libs/glm/glm-0.9.9.8-r1.ebuild index 10f370ff15e..96a90be0b01 100644 --- a/media-libs/glm/glm-0.9.9.8-r1.ebuild +++ b/media-libs/glm/glm-0.9.9.8-r1.ebuild @@ -15,11 +15,10 @@ KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~sparc x86" IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86_avx2" RESTRICT="!test? ( test )" -RDEPEND="" - PATCHES=( "${FILESDIR}"/${PN}-0.9.9.6-simd.patch "${FILESDIR}"/${P}-clang.patch + "${FILESDIR}"/${PN}-0.9.9.8-big-endian-tests.patch ) src_configure() {