Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Adélie Package Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adélie Linux
Adélie Package Tree
Commits
e7ed8925
Verified
Commit
e7ed8925
authored
6 years ago
by
Max Rees
Committed by
Anna Wilcox
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
user/glm: fix big endian build
parent
7335907f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
user/glm/APKBUILD
+4
-2
4 additions, 2 deletions
user/glm/APKBUILD
user/glm/be.patch
+167
-0
167 additions, 0 deletions
user/glm/be.patch
with
171 additions
and
2 deletions
user/glm/APKBUILD
+
4
−
2
View file @
e7ed8925
...
...
@@ -8,7 +8,8 @@ url="https://glm.g-truc.net/"
arch
=
"noarch"
license
=
"MIT OR Custom:Happy-Bunny"
makedepends
=
"cmake"
source
=
"https://github.com/g-truc/glm/releases/download/
$pkgver
/
$pkgname
-
$pkgver
.zip"
source
=
"https://github.com/g-truc/glm/releases/download/
$pkgver
/
$pkgname
-
$pkgver
.zip
be.patch"
builddir
=
"
$srcdir
/
$pkgname
"
replaces
=
"glm-dev"
...
...
@@ -35,4 +36,5 @@ package() {
make
install
DESTDIR
=
"
$pkgdir
"
}
sha512sums
=
"ac256e8ba515a0a57e27cb9dc79325af7a6f014341c11ba34af604fc2df03ada6979c39c0e5a3fd7526a5dc6dd4af99586e60cefe13bb134ad4df2212193a253 glm-0.9.9.0.zip"
sha512sums
=
"ac256e8ba515a0a57e27cb9dc79325af7a6f014341c11ba34af604fc2df03ada6979c39c0e5a3fd7526a5dc6dd4af99586e60cefe13bb134ad4df2212193a253 glm-0.9.9.0.zip
954495cc875b9e70f1957f54cdaa44738268a5a1104036edcdfd74736f8a3385725f29032a533f2a5acbdbfa19d2fe4bc80ef9fdb49d3e8bdc5dc00db86c813a be.patch"
This diff is collapsed.
Click to expand it.
user/glm/be.patch
0 → 100644
+
167
−
0
View file @
e7ed8925
--- 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 <glm/gtc/epsilon.hpp>
#include <cstdio>
#include <vector>
+#include <arpa/inet.h>
void print_bits(float const& s)
{
@@ -155,7 +156,7 @@
glm::u8vec4 const v0(0xff, 0x77, 0x0, 0x33);
glm::uint32 const p0 = *reinterpret_cast<glm::uint32 const*>(&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 <cstring>
#include <limits>
+extern "C" {
+#include <endian.h>
+}
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;
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment