diff --git a/srcpkgs/glm/patches/be.patch b/srcpkgs/glm/patches/be.patch new file mode 100644 index 00000000000..737dde75b29 --- /dev/null +++ b/srcpkgs/glm/patches/be.patch @@ -0,0 +1,169 @@ +Taken from Adélie Linux. + +--- glm-0.9.9.0/test/gtc/gtc_packing.cpp ++++ glm-0.9.9.0/test/gtc/gtc_packing.cpp +@@ -3,6 +3,7 @@ + #include + #include + #include ++#include + + void print_bits(float const& s) + { +@@ -155,7 +156,7 @@ + + 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; + +--- glm-0.9.9.0/glm/gtc/packing.inl ++++ glm-0.9.9.0/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 @@ + { + 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 @@ + { + 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 @@ + { + 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 @@ + { + 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 @@ + { + 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 @@ + { + 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 @@ + { + 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 @@ + { + 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/srcpkgs/glm/template b/srcpkgs/glm/template index ae1a892e664..47369d94e0d 100644 --- a/srcpkgs/glm/template +++ b/srcpkgs/glm/template @@ -1,16 +1,17 @@ # Template file for 'glm' pkgname=glm -version=0.9.9.7 +version=0.9.9.8 revision=1 -archs=noarch wrksrc=glm +build_style=cmake hostmakedepends="dos2unix unzip" short_desc="C++ mathematics library for graphics programming" maintainer="Orphaned " license="MIT" homepage="http://glm.g-truc.net" distfiles="https://github.com/g-truc/glm/releases/download/${version}/glm-${version}.zip" -checksum=6b79c3d06d9745d1cce3f38c0c15666596f9aefff25ddb74df3af0a02f011ee1 +checksum=37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c +patch_args="-Np1" # No longer has install target # Install manually