View | Details | Raw Unified | Return to bug 250399 | Differences between
and this patch

Collapse All | Expand All

(-)emulators/openmsx/Makefile (-5 / +2 lines)
Lines 1-8 Link Here
1
# $FreeBSD: head/emulators/openmsx/Makefile 551910 2020-10-10 08:51:40Z antoine $
1
# $FreeBSD: head/emulators/openmsx/Makefile 551910 2020-10-10 08:51:40Z antoine $
2
2
3
PORTNAME=	openmsx
3
PORTNAME=	openmsx
4
PORTVERSION=	0.15.0
4
PORTVERSION=	16.0
5
PORTREVISION=	2
6
CATEGORIES=	emulators
5
CATEGORIES=	emulators
7
6
8
MAINTAINER=	menelkir@itroll.org
7
MAINTAINER=	menelkir@itroll.org
Lines 11-18 Link Here
11
LICENSE=	GPLv2
10
LICENSE=	GPLv2
12
LICENSE_FILE=	${WRKSRC}/doc/GPL.txt
11
LICENSE_FILE=	${WRKSRC}/doc/GPL.txt
13
12
14
BROKEN=		fails to build
15
16
LIB_DEPENDS=	libpng.so:graphics/png \
13
LIB_DEPENDS=	libpng.so:graphics/png \
17
		libogg.so:audio/libogg \
14
		libogg.so:audio/libogg \
18
		libvorbis.so:audio/libvorbis \
15
		libvorbis.so:audio/libvorbis \
Lines 29-35 Link Here
29
USE_GITHUB=	yes
26
USE_GITHUB=	yes
30
GH_ACCOUNT=	openMSX
27
GH_ACCOUNT=	openMSX
31
GH_PROJECT=	openMSX
28
GH_PROJECT=	openMSX
32
GH_TAGNAME=	0f2b558
29
GH_TAGNAME=	a46a814
33
30
34
BINARY_ALIAS=	python3=${PYTHON_CMD}
31
BINARY_ALIAS=	python3=${PYTHON_CMD}
35
32
(-)emulators/openmsx/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1588351340
1
TIMESTAMP = 1602852184
2
SHA256 (openMSX-openMSX-0.15.0-0f2b558_GH0.tar.gz) = 4be0852c3eed442771dc450ad5385a5b30c97927be543da91bd685e5484d560d
2
SHA256 (openMSX-openMSX-16.0-a46a814_GH0.tar.gz) = 56d66cd7baa4e93febf36fba9ed3e0efa65fb2095432aa659c37e364c23852ac
3
SIZE (openMSX-openMSX-0.15.0-0f2b558_GH0.tar.gz) = 5589585
3
SIZE (openMSX-openMSX-16.0-a46a814_GH0.tar.gz) = 5605130
(-)emulators/openmsx/files/patch-src_utils_endian.hh (+88 lines)
Line 0 Link Here
1
--- src/utils/endian.hh.orig	2020-08-25 21:16:08 UTC
2
+++ src/utils/endian.hh
3
@@ -9,23 +9,23 @@
4
 namespace Endian {
5
 
6
 // Reverse bytes in a 16-bit number: 0x1234 becomes 0x3412
7
-[[nodiscard]] static inline uint16_t bswap16(uint16_t x)
8
+[[nodiscard]] static inline uint16_t byteswap16(uint16_t x)
9
 {
10
 	// This sequence generates 'optimal' code on a wide range of gcc/clang
11
 	// versions (a single rotate instruction on x86). The newer compiler
12
 	// versions also do 'the right thing' for the simpler expression below.
13
-	// Those newer compilers also support __builtin_bswap16() but that
14
+	// Those newer compilers also support __builtin_byteswap16() but that
15
 	// doesn't generate better code (and is less portable).
16
 	return ((x & 0x00FF) << 8) | ((x & 0xFF00) >> 8);
17
 	//return (x << 8) | (x >> 8);
18
 }
19
 
20
 // Reverse bytes in a 32-bit number: 0x12345678 becomes 0x78563412
21
-[[nodiscard]] static inline uint32_t bswap32(uint32_t x)
22
+[[nodiscard]] static inline uint32_t byteswap32(uint32_t x)
23
 {
24
 #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
25
 	// Starting from gcc-4.3 there's a builtin function for this.
26
-	// E.g. on x86 this is translated to a single 'bswap' instruction.
27
+	// E.g. on x86 this is translated to a single 'byteswap' instruction.
28
 	return __builtin_bswap32(x);
29
 #else
30
 	return  (x << 24)               |
31
@@ -36,22 +36,22 @@ namespace Endian {
32
 }
33
 
34
 // Reverse bytes in a 64-bit value: 0x1122334455667788 becomes 0x8877665544332211
35
-[[nodiscard]] static inline uint64_t bswap64(uint64_t x)
36
+[[nodiscard]] static inline uint64_t byteswap64(uint64_t x)
37
 {
38
 #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
39
 	// Starting from gcc-4.3 there's a builtin function for this.
40
-	// E.g. on x86 this is translated to a single 'bswap' instruction.
41
+	// E.g. on x86 this is translated to a single 'byteswap' instruction.
42
 	return __builtin_bswap64(x);
43
 #else
44
-	return (uint64_t(bswap32(x >>  0)) << 32) |
45
-	       (uint64_t(bswap32(x >> 32)) <<  0);
46
+	return (uint64_t(byteswap32(x >>  0)) << 32) |
47
+	       (uint64_t(byteswap32(x >> 32)) <<  0);
48
 #endif
49
 }
50
 
51
-// Use overloading to get a (statically) polymorphic bswap() function.
52
-[[nodiscard]] static inline uint16_t bswap(uint16_t x) { return bswap16(x); }
53
-[[nodiscard]] static inline uint32_t bswap(uint32_t x) { return bswap32(x); }
54
-[[nodiscard]] static inline uint64_t bswap(uint64_t x) { return bswap64(x); }
55
+// Use overloading to get a (statically) polymorphic byteswap() function.
56
+[[nodiscard]] static inline uint16_t byteswap(uint16_t x) { return byteswap16(x); }
57
+[[nodiscard]] static inline uint32_t byteswap(uint32_t x) { return byteswap32(x); }
58
+[[nodiscard]] static inline uint64_t byteswap(uint64_t x) { return byteswap64(x); }
59
 
60
 
61
 // Identity operator, simply returns the given value.
62
@@ -61,7 +61,7 @@ struct Ident {
63
 
64
 // Byte-swap operator, swap bytes in the given value (16 or 32 bit).
65
 struct BSwap {
66
-	template <typename T> [[nodiscard]] inline T operator()(T t) const { return bswap(t); }
67
+	template <typename T> [[nodiscard]] inline T operator()(T t) const { return byteswap(t); }
68
 };
69
 
70
 // Helper class that stores a value and allows to read/write that value. Though
71
@@ -165,7 +165,7 @@ static inline void writeL32(void* p, uint32_t x)
72
 
73
 template<bool SWAP, typename T> static ALWAYS_INLINE void write_UA(void* p, T x)
74
 {
75
-	if (SWAP) x = bswap(x);
76
+	if (SWAP) x = byteswap(x);
77
 	memcpy(p, &x, sizeof(x));
78
 }
79
 static ALWAYS_INLINE void write_UA_B16(void* p, uint16_t x)
80
@@ -197,7 +197,7 @@ template<bool SWAP, typename T> [[nodiscard]] static A
81
 {
82
 	T x;
83
 	memcpy(&x, p, sizeof(x));
84
-	if (SWAP) x = bswap(x);
85
+	if (SWAP) x = byteswap(x);
86
 	return x;
87
 }
88
 [[nodiscard]] static ALWAYS_INLINE uint16_t read_UA_B16(const void* p)
(-)emulators/openmsx/files/patch-src_utils_sha1.cc (+11 lines)
Line 0 Link Here
1
--- src/utils/sha1.cc.orig	2020-10-16 15:25:27 UTC
2
+++ src/utils/sha1.cc
3
@@ -123,7 +123,7 @@ static inline __m128i _mm_cmple_epu8(__m128i a, __m128
4
 // load 64-bit (possibly unaligned) and swap bytes
5
 static inline uint64_t loadSwap64(const char* s)
6
 {
7
-	return Endian::bswap64(*reinterpret_cast<const uint64_t*>(s));
8
+	return Endian::byteswap64(*reinterpret_cast<const uint64_t*>(s));
9
 }
10
 
11
 #else
(-)emulators/openmsx/files/patch-src_utils_tiger.cc (+15 lines)
Line 0 Link Here
1
--- src/utils/tiger.cc.orig	2020-10-16 15:12:50 UTC
2
+++ src/utils/tiger.cc
3
@@ -662,9 +662,9 @@ static inline void initState(uint64_t state[3])
4
 static inline void returnState(uint64_t state[3])
5
 {
6
 	if (OPENMSX_BIGENDIAN) {
7
-		state[0] = Endian::bswap64(state[0]);
8
-		state[1] = Endian::bswap64(state[1]);
9
-		state[2] = Endian::bswap64(state[2]);
10
+		state[0] = Endian::byteswap64(state[0]);
11
+		state[1] = Endian::byteswap64(state[1]);
12
+		state[2] = Endian::byteswap64(state[2]);
13
 	}
14
 }
15
 

Return to bug 250399