pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/openrct2 games/openrct2: teach it about big-endi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cfc1ce767ff0
branches:  trunk
changeset: 390068:cfc1ce767ff0
user:      he <he%pkgsrc.org@localhost>
date:      Thu Dec 15 19:26:35 2022 +0000

description:
games/openrct2: teach it about big-endian hosts.

Fixes build on NetBSD/macppc.

diffstat:

 games/openrct2/distinfo                            |   3 ++-
 games/openrct2/patches/patch-src_openrct2_common.h |  19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 35c8b7534ffd -r cfc1ce767ff0 games/openrct2/distinfo
--- a/games/openrct2/distinfo   Thu Dec 15 18:45:07 2022 +0000
+++ b/games/openrct2/distinfo   Thu Dec 15 19:26:35 2022 +0000
@@ -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_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 -r 35c8b7534ffd -r cfc1ce767ff0 games/openrct2/patches/patch-src_openrct2_common.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/openrct2/patches/patch-src_openrct2_common.h        Thu Dec 15 19:26:35 2022 +0000
@@ -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



Home | Main Index | Thread Index | Old Index