diff options
author | he <he@pkgsrc.org> | 2022-12-15 19:26:35 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2022-12-15 19:26:35 +0000 |
commit | 438811812e9a08ecd047a4ef714685e114ef97d1 (patch) | |
tree | f9259ee0d133ba2dd087cba4b18c16e0267d94d5 | |
parent | e6282f81972488817d5a2d302020fa7f2684cd16 (diff) | |
download | pkgsrc-438811812e9a08ecd047a4ef714685e114ef97d1.tar.gz |
games/openrct2: teach it about big-endian hosts.
Fixes build on NetBSD/macppc.
-rw-r--r-- | games/openrct2/distinfo | 3 | ||||
-rw-r--r-- | games/openrct2/patches/patch-src_openrct2_common.h | 19 |
2 files changed, 21 insertions, 1 deletions
diff --git a/games/openrct2/distinfo b/games/openrct2/distinfo index 3a5a933d733..ce6dedd9a60 100644 --- a/games/openrct2/distinfo +++ b/games/openrct2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2021/11/09 11:36:08 nia Exp $ +$NetBSD: distinfo,v 1.6 2022/12/15 19:26:35 he Exp $ BLAKE2s (openrct2-0.2.4.tar.gz) = 3f96cb44eae26acf77605e6e166fd2c85a0632db82a77019feefd5b30c803699 SHA512 (openrct2-0.2.4.tar.gz) = 956044b5fa5e55256a33f352d2d1e8a4eb6738b98dc9894807b3628b5c5c08f3229c952fbf8b33ad867771f88c6d7e17ad1a8a4e050f8f269a6152d013afce03 @@ -7,6 +7,7 @@ SHA1 (patch-src_openrct2-ui_UiContext.Linux.cpp) = 36bd777ed772a0f18d76f69921422 SHA1 (patch-src_openrct2-ui_title_TitleSequencePlayer.cpp) = 35a4ee2a47fe6f5bfd536e199a369361cb1b12fa SHA1 (patch-src_openrct2_CMakeLists.txt) = a0553c147661396405a607f5ef62f10fc9b55f6c SHA1 (patch-src_openrct2_Version.h) = 5402d56aaedcac51d333d95c49f88472d9de7e91 +SHA1 (patch-src_openrct2_common.h) = 4e9458b7768291d11599f66a12e5587b8bba8a8a SHA1 (patch-src_openrct2_core_FileStream.hpp) = b1b69a0cb86207fd0c9d25beda3a063ee232b4fe SHA1 (patch-src_openrct2_platform_Linux.cpp) = 9562e6a0314a1c37192e8715bac39e1d9fd7faba SHA1 (patch-src_openrct2_platform_Platform.Linux.cpp) = 426b2bcbb6bf59d5093cbc27ef3f638a054cf1e8 diff --git a/games/openrct2/patches/patch-src_openrct2_common.h b/games/openrct2/patches/patch-src_openrct2_common.h new file mode 100644 index 00000000000..3a0e50615b9 --- /dev/null +++ b/games/openrct2/patches/patch-src_openrct2_common.h @@ -0,0 +1,19 @@ +$NetBSD: patch-src_openrct2_common.h,v 1.1 2022/12/15 19:26:35 he Exp $ + +Take a stab at supporting big-endian ports. + +--- src/openrct2/common.h.orig 2019-10-28 20:18:47.000000000 +0000 ++++ src/openrct2/common.h +@@ -73,6 +73,12 @@ const constexpr auto ror64 = ror<uint64_ + # define HIBYTE(w) ((uint8_t)(((uint16_t)(w) >> 8) & 0xFF)) + # endif // __BYTE_ORDER__ + ++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ++# define RCT2_ENDIANESS __ORDER_BIG_ENDIAN__ ++# define LOBYTE(w) ((uint8_t)(((uint16_t)(w) >> 8) & 0xFF)) ++# define HIBYTE(w) ((uint8_t)(w)) ++# endif ++ + # ifndef RCT2_ENDIANESS + # error Unknown endianess! + # endif // RCT2_ENDIANESS |