* [gentoo-commits] repo/gentoo:master commit in: games-emulation/bsnes-jg/files/, games-emulation/bsnes-jg/
@ 2024-01-05 5:24 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-01-05 5:24 UTC (permalink / raw
To: gentoo-commits
commit: 65681f9674bb4393c8047f98fe43744632e97ac6
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Dec 10 00:44:57 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 5 05:24:05 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65681f96
games-emulation/bsnes-jg: fix arm endianness detection
Reported in comment #9 in issue #891201.
Bug: https://bugs.gentoo.org/891201
Upstream-PR: https://gitlab.com/jgemu/bsnes/-/merge_requests/371
Upstream-Commit: https://gitlab.com/jgemu/bsnes/-/commit/647e868f3d97bd937c46ecf312bbfbc25b816dc1
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/34205
Signed-off-by: Sam James <sam <AT> gentoo.org>
games-emulation/bsnes-jg/bsnes-jg-1.1.2-r1.ebuild | 50 +++++++++++++++++++
.../bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch | 58 ++++++++++++++++++++++
2 files changed, 108 insertions(+)
diff --git a/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r1.ebuild b/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r1.ebuild
new file mode 100644
index 000000000000..049dd7e7771d
--- /dev/null
+++ b/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_PN=${PN%-*}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="Jolly Good Fork of bsnes"
+HOMEPAGE="https://gitlab.com/jgemu/bsnes"
+if [[ "${PV}" == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/jgemu/${MY_PN}.git"
+else
+ SRC_URI="https://gitlab.com/jgemu/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2"
+ S="${WORKDIR}/${MY_P}"
+ KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
+fi
+
+LICENSE="ISC GPL-3+ LGPL-2.1+ MIT ZLIB"
+SLOT="1"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-endianness.patch # 891201#c9
+)
+
+DEPEND="
+ media-libs/jg:1=
+ media-libs/libsamplerate
+"
+RDEPEND="
+ ${DEPEND}
+ games-emulation/jgrf
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}"/usr \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+}
diff --git a/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch b/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch
new file mode 100644
index 000000000000..5c2b7b55627c
--- /dev/null
+++ b/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch
@@ -0,0 +1,58 @@
+https://bugs.gentoo.org/891201#c9
+https://gitlab.com/jgemu/bsnes/-/merge_requests/371
+https://gitlab.com/jgemu/bsnes/-/commit/647e868f3d97bd937c46ecf312bbfbc25b816dc1
+
+From 647e868f3d97bd937c46ecf312bbfbc25b816dc1 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 9 Dec 2023 07:12:12 -0800
+Subject: [PATCH] processor: update endian.hpp
+
+Reference: https://sourceforge.net/p/predef/wiki/Endianness/
+---
+ src/processor/endian.hpp | 25 ++++++++++++++-----------
+ 1 file changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/src/processor/endian.hpp b/src/processor/endian.hpp
+index 3b6d93e..7d6ad04 100644
+--- a/src/processor/endian.hpp
++++ b/src/processor/endian.hpp
+@@ -1,25 +1,28 @@
+ #pragma once
+
++// Reference: https://sourceforge.net/p/predef/wiki/Endianness/
++
+ #if defined(__APPLE__)
+ #include <machine/endian.h>
+ #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined (__DragonFly__)
+ #include <sys/endian.h>
+ #endif
+
+-#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN) \
+- || (defined( _BYTE_ORDER) && defined( _LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN) \
+- || (defined( BYTE_ORDER) && defined( LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN) \
+- || defined(__LITTLE_ENDIAN__) \
+- || defined(__i386__) || defined(__amd64__) || defined(__aarch64__) \
+- || defined(_M_IX86) || defined(_M_AMD64)
++#if (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) \
++ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
++ || (defined(__FLOAT_WORD_ORDER__) && __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
++ || defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__THUMBEL__) \
++ || defined(__AARCH64EL__) || defined(_MIPSEL) || defined(__MIPSEL) \
++ || defined(__MIPSEL__) || defined(_WIN32) || defined(_WIN64)
+ //little-endian: uint8_t[] { 0x01, 0x02, 0x03, 0x04 } == 0x04030201
+ #define order_lsb2(a,b) a,b
+ #define order_lsb4(a,b,c,d) a,b,c,d
+-#elif(defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN) \
+- || (defined( _BYTE_ORDER) && defined( _BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN) \
+- || (defined( BYTE_ORDER) && defined( BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) \
+- || defined(__BIG_ENDIAN__) \
+- || defined(__powerpc__) || defined(_M_PPC)
++#elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) \
++ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \
++ || (defined(__FLOAT_WORD_ORDER__) && __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__) \
++ || defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) \
++ || defined(__AARCH64EB__) || defined(_MIPSEB) || defined(__MIPSEB) \
++ || defined(__MIPSEB__) || defined(__powerpc__) || defined(_M_PPC)
+ //big-endian: uint8_t[] { 0x01, 0x02, 0x03, 0x04 } == 0x01020304
+ #define order_lsb2(a,b) b,a
+ #define order_lsb4(a,b,c,d) d,c,b,a
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/bsnes-jg/files/, games-emulation/bsnes-jg/
@ 2024-03-21 2:19 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-03-21 2:19 UTC (permalink / raw
To: gentoo-commits
commit: 7d3a275c4d3a648219cf757d3ec160e082557c2e
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Mar 21 01:41:04 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 21 02:15:45 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d3a275c
games-emulation/bsnes-jg: fix strict aliasing
Closes: https://bugs.gentoo.org/926077
Upstream-PR: https://github.com/LIJI32/SameBoy/pull/593
Upstream-Commit: https://github.com/LIJI32/SameBoy/commit/8739da61c013e20e1cc94f0619c622a65c713408
Upstream-PR: https://gitlab.com/jgemu/bsnes/-/merge_requests/419
Upstream-Commit: https://gitlab.com/jgemu/bsnes/-/commit/966545bb79cc9810fbcedbe34fd52f7b9b5ef04e
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/35847
Signed-off-by: Sam James <sam <AT> gentoo.org>
games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild | 53 +++++++++++++++++
.../files/bsnes-jg-1.1.2-strict-aliasing.patch | 67 ++++++++++++++++++++++
2 files changed, 120 insertions(+)
diff --git a/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild b/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild
new file mode 100644
index 000000000000..fe035e7a3b86
--- /dev/null
+++ b/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_PN=${PN%-*}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="Jolly Good Fork of bsnes"
+HOMEPAGE="https://gitlab.com/jgemu/bsnes"
+if [[ "${PV}" == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/jgemu/${MY_PN}.git"
+else
+ SRC_URI="https://gitlab.com/jgemu/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2"
+ S="${WORKDIR}/${MY_P}"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+fi
+
+LICENSE="ISC GPL-3+ LGPL-2.1+ MIT ZLIB"
+SLOT="1"
+
+DEPEND="
+ media-libs/jg:1=
+ media-libs/libsamplerate
+"
+RDEPEND="
+ ${DEPEND}
+ games-emulation/jgrf
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ # https://bugs.gentoo.org/891201#c9
+ "${FILESDIR}"/${P}-endianness.patch
+ # https://bugs.gentoo.org/926077
+ "${FILESDIR}"/${P}-strict-aliasing.patch
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}"/usr \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+}
diff --git a/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch b/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch
new file mode 100644
index 000000000000..106ea27730da
--- /dev/null
+++ b/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch
@@ -0,0 +1,67 @@
+https://bugs.gentoo.org/926077
+https://github.com/LIJI32/SameBoy/pull/593
+https://gitlab.com/jgemu/bsnes/-/merge_requests/419
+https://gitlab.com/jgemu/bsnes/-/commit/966545bb79cc9810fbcedbe34fd52f7b9b5ef04e
+
+From 966545bb79cc9810fbcedbe34fd52f7b9b5ef04e Mon Sep 17 00:00:00 2001
+From: Lior Halphon <LIJI32@gmail.com>
+Date: Sat, 9 Mar 2024 11:08:01 -0800
+Subject: [PATCH 1/2] Avoid strict aliasing violations. Closes #593
+
+Backported from:
+
+https://github.com/LIJI32/SameBoy/commit/8739da61c013e20e1cc94f0619c622a65c713408
+---
+ deps/gb/apu.c | 4 ++--
+ deps/gb/apu.h | 11 +++++++++++
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/deps/gb/apu.c b/deps/gb/apu.c
+index e621e82a..0f0ed16b 100644
+--- a/deps/gb/apu.c
++++ b/deps/gb/apu.c
+@@ -100,7 +100,7 @@ static void update_sample(GB_gameboy_t *gb, GB_channel_t index, int8_t value, un
+ output.left = output.right = 0;
+ }
+
+- if (*(uint32_t *)&(gb->apu_output.current_sample[index]) != *(uint32_t *)&output) {
++ if (gb->apu_output.current_sample[index].packed != output.packed) {
+ refresh_channel(gb, index, cycles_offset);
+ gb->apu_output.current_sample[index] = output;
+ }
+@@ -131,7 +131,7 @@ static void update_sample(GB_gameboy_t *gb, GB_channel_t index, int8_t value, un
+ if (likely(!gb->apu_output.channel_muted[index])) {
+ output = (GB_sample_t){(0xF - value * 2) * left_volume, (0xF - value * 2) * right_volume};
+ }
+- if (*(uint32_t *)&(gb->apu_output.current_sample[index]) != *(uint32_t *)&output) {
++ if (gb->apu_output.current_sample[index].packed != output.packed) {
+ refresh_channel(gb, index, cycles_offset);
+ gb->apu_output.current_sample[index] = output;
+ }
+diff --git a/deps/gb/apu.h b/deps/gb/apu.h
+index c8700c80..15b54a87 100644
+--- a/deps/gb/apu.h
++++ b/deps/gb/apu.h
+@@ -25,11 +25,22 @@
+
+ /* APU ticks are 2MHz, triggered by an internal APU clock. */
+
++#ifdef GB_INTERNAL
++typedef union
++{
++ struct {
++ int16_t left;
++ int16_t right;
++ };
++ uint32_t packed;
++} GB_sample_t;
++#else
+ typedef struct
+ {
+ int16_t left;
+ int16_t right;
+ } GB_sample_t;
++#endif
+
+ typedef struct
+ {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/bsnes-jg/files/, games-emulation/bsnes-jg/
@ 2024-11-02 12:46 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2024-11-02 12:46 UTC (permalink / raw
To: gentoo-commits
commit: 265e25919ebc7649db92f49c1006121682d2db74
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Sep 22 16:30:16 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Nov 2 12:46:00 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=265e2591
games-emulation/bsnes-jg: drop 1.1.2-r2
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
games-emulation/bsnes-jg/Manifest | 1 -
games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild | 53 -----------------
.../bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch | 58 -------------------
.../files/bsnes-jg-1.1.2-strict-aliasing.patch | 67 ----------------------
4 files changed, 179 deletions(-)
diff --git a/games-emulation/bsnes-jg/Manifest b/games-emulation/bsnes-jg/Manifest
index d57ef55561ba..93f311490918 100644
--- a/games-emulation/bsnes-jg/Manifest
+++ b/games-emulation/bsnes-jg/Manifest
@@ -1,3 +1,2 @@
-DIST bsnes-1.1.2.tar.bz2 4183035 BLAKE2B 09e01845fb9e6208f5262e2abef14c46e9fa53cfdd025821345507fc68e520dc21ca69e5d712a7f821936166975865c26dc0be42549b551abdbb941e748949b1 SHA512 77cb82b6cba2941813de25273bd74b928ad380dccadb909ae3500ddf6f8906504f5400df95381569d35fc7b06e0330f9eb4d54d88d64a5c698925d54df62bada
DIST bsnes-1.2.0.tar.bz2 4277380 BLAKE2B 03abb6efdf2e2fe487ddea780f9a3053092e718695d7f875304a008f5e3e967c443f3ad40d7c8a82b07d66c52ead5d258018fd004cb205efaaa872b122057c98 SHA512 96aaeecf10508bc7672c30fa24b34e0d32e34c4190928109a141f4a1d73fb6f007844f9b7154ffc57028ddb9e99b5c281a214b9517ce5de618cf229722ff1e20
DIST bsnes-2.0.0.tar.bz2 4318300 BLAKE2B 7b93502a7dd68427069d0a33161927709f327352a3da3637cea416b31293750b249f3d750bba093a5a3430c5c2ab42b5e29e8b707377b29254651091a2b0aaed SHA512 95f970a16c7efdfd5f0dca1a8bcfd7d5785e4e2635eb4c36fdade350be52c8c950736df84a9a5bb108a98c4b9b936f12f2a0ea7d9974737e105b1b0c034f6dbd
diff --git a/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild b/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild
deleted file mode 100644
index fe035e7a3b86..000000000000
--- a/games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-MY_PN=${PN%-*}
-MY_P=${MY_PN}-${PV}
-DESCRIPTION="Jolly Good Fork of bsnes"
-HOMEPAGE="https://gitlab.com/jgemu/bsnes"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://gitlab.com/jgemu/${MY_PN}.git"
-else
- SRC_URI="https://gitlab.com/jgemu/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2"
- S="${WORKDIR}/${MY_P}"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
-fi
-
-LICENSE="ISC GPL-3+ LGPL-2.1+ MIT ZLIB"
-SLOT="1"
-
-DEPEND="
- media-libs/jg:1=
- media-libs/libsamplerate
-"
-RDEPEND="
- ${DEPEND}
- games-emulation/jgrf
-"
-BDEPEND="
- virtual/pkgconfig
-"
-
-PATCHES=(
- # https://bugs.gentoo.org/891201#c9
- "${FILESDIR}"/${P}-endianness.patch
- # https://bugs.gentoo.org/926077
- "${FILESDIR}"/${P}-strict-aliasing.patch
-)
-
-src_compile() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
-}
-
-src_install() {
- emake install \
- DESTDIR="${D}" \
- PREFIX="${EPREFIX}"/usr \
- DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)"
-}
diff --git a/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch b/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch
deleted file mode 100644
index 5c2b7b55627c..000000000000
--- a/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-https://bugs.gentoo.org/891201#c9
-https://gitlab.com/jgemu/bsnes/-/merge_requests/371
-https://gitlab.com/jgemu/bsnes/-/commit/647e868f3d97bd937c46ecf312bbfbc25b816dc1
-
-From 647e868f3d97bd937c46ecf312bbfbc25b816dc1 Mon Sep 17 00:00:00 2001
-From: orbea <orbea@riseup.net>
-Date: Sat, 9 Dec 2023 07:12:12 -0800
-Subject: [PATCH] processor: update endian.hpp
-
-Reference: https://sourceforge.net/p/predef/wiki/Endianness/
----
- src/processor/endian.hpp | 25 ++++++++++++++-----------
- 1 file changed, 14 insertions(+), 11 deletions(-)
-
-diff --git a/src/processor/endian.hpp b/src/processor/endian.hpp
-index 3b6d93e..7d6ad04 100644
---- a/src/processor/endian.hpp
-+++ b/src/processor/endian.hpp
-@@ -1,25 +1,28 @@
- #pragma once
-
-+// Reference: https://sourceforge.net/p/predef/wiki/Endianness/
-+
- #if defined(__APPLE__)
- #include <machine/endian.h>
- #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined (__DragonFly__)
- #include <sys/endian.h>
- #endif
-
--#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN) \
-- || (defined( _BYTE_ORDER) && defined( _LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN) \
-- || (defined( BYTE_ORDER) && defined( LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN) \
-- || defined(__LITTLE_ENDIAN__) \
-- || defined(__i386__) || defined(__amd64__) || defined(__aarch64__) \
-- || defined(_M_IX86) || defined(_M_AMD64)
-+#if (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) \
-+ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
-+ || (defined(__FLOAT_WORD_ORDER__) && __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
-+ || defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__THUMBEL__) \
-+ || defined(__AARCH64EL__) || defined(_MIPSEL) || defined(__MIPSEL) \
-+ || defined(__MIPSEL__) || defined(_WIN32) || defined(_WIN64)
- //little-endian: uint8_t[] { 0x01, 0x02, 0x03, 0x04 } == 0x04030201
- #define order_lsb2(a,b) a,b
- #define order_lsb4(a,b,c,d) a,b,c,d
--#elif(defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN) \
-- || (defined( _BYTE_ORDER) && defined( _BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN) \
-- || (defined( BYTE_ORDER) && defined( BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) \
-- || defined(__BIG_ENDIAN__) \
-- || defined(__powerpc__) || defined(_M_PPC)
-+#elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) \
-+ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \
-+ || (defined(__FLOAT_WORD_ORDER__) && __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__) \
-+ || defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) \
-+ || defined(__AARCH64EB__) || defined(_MIPSEB) || defined(__MIPSEB) \
-+ || defined(__MIPSEB__) || defined(__powerpc__) || defined(_M_PPC)
- //big-endian: uint8_t[] { 0x01, 0x02, 0x03, 0x04 } == 0x01020304
- #define order_lsb2(a,b) b,a
- #define order_lsb4(a,b,c,d) d,c,b,a
diff --git a/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch b/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch
deleted file mode 100644
index 106ea27730da..000000000000
--- a/games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-https://bugs.gentoo.org/926077
-https://github.com/LIJI32/SameBoy/pull/593
-https://gitlab.com/jgemu/bsnes/-/merge_requests/419
-https://gitlab.com/jgemu/bsnes/-/commit/966545bb79cc9810fbcedbe34fd52f7b9b5ef04e
-
-From 966545bb79cc9810fbcedbe34fd52f7b9b5ef04e Mon Sep 17 00:00:00 2001
-From: Lior Halphon <LIJI32@gmail.com>
-Date: Sat, 9 Mar 2024 11:08:01 -0800
-Subject: [PATCH 1/2] Avoid strict aliasing violations. Closes #593
-
-Backported from:
-
-https://github.com/LIJI32/SameBoy/commit/8739da61c013e20e1cc94f0619c622a65c713408
----
- deps/gb/apu.c | 4 ++--
- deps/gb/apu.h | 11 +++++++++++
- 2 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/deps/gb/apu.c b/deps/gb/apu.c
-index e621e82a..0f0ed16b 100644
---- a/deps/gb/apu.c
-+++ b/deps/gb/apu.c
-@@ -100,7 +100,7 @@ static void update_sample(GB_gameboy_t *gb, GB_channel_t index, int8_t value, un
- output.left = output.right = 0;
- }
-
-- if (*(uint32_t *)&(gb->apu_output.current_sample[index]) != *(uint32_t *)&output) {
-+ if (gb->apu_output.current_sample[index].packed != output.packed) {
- refresh_channel(gb, index, cycles_offset);
- gb->apu_output.current_sample[index] = output;
- }
-@@ -131,7 +131,7 @@ static void update_sample(GB_gameboy_t *gb, GB_channel_t index, int8_t value, un
- if (likely(!gb->apu_output.channel_muted[index])) {
- output = (GB_sample_t){(0xF - value * 2) * left_volume, (0xF - value * 2) * right_volume};
- }
-- if (*(uint32_t *)&(gb->apu_output.current_sample[index]) != *(uint32_t *)&output) {
-+ if (gb->apu_output.current_sample[index].packed != output.packed) {
- refresh_channel(gb, index, cycles_offset);
- gb->apu_output.current_sample[index] = output;
- }
-diff --git a/deps/gb/apu.h b/deps/gb/apu.h
-index c8700c80..15b54a87 100644
---- a/deps/gb/apu.h
-+++ b/deps/gb/apu.h
-@@ -25,11 +25,22 @@
-
- /* APU ticks are 2MHz, triggered by an internal APU clock. */
-
-+#ifdef GB_INTERNAL
-+typedef union
-+{
-+ struct {
-+ int16_t left;
-+ int16_t right;
-+ };
-+ uint32_t packed;
-+} GB_sample_t;
-+#else
- typedef struct
- {
- int16_t left;
- int16_t right;
- } GB_sample_t;
-+#endif
-
- typedef struct
- {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/bsnes-jg/files/, games-emulation/bsnes-jg/
@ 2024-11-03 11:57 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2024-11-03 11:57 UTC (permalink / raw
To: gentoo-commits
commit: 3b8502a9362d474c52ddf4288b45e0f925b7429d
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Nov 2 20:16:33 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Nov 3 11:57:29 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b8502a9
games-emulation/bsnes-jg: fix install with USE=example
Upstream-PR: https://gitlab.com/jgemu/bsnes/-/merge_requests/431
Upstream-Commit: https://gitlab.com/jgemu/bsnes/-/commit/a94bae4241ffe91f868fb0e359686769e05b7d3c
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/39186
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild | 4 ++
.../files/bsnes-jg-2.0.0-install-data.patch | 53 ++++++++++++++++++++++
2 files changed, 57 insertions(+)
diff --git a/games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild b/games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild
index 261d967b3f3f..41088f14d458 100644
--- a/games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild
+++ b/games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild
@@ -45,6 +45,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${P}-install-data.patch
+)
+
src_configure() {
local makeopts=(
PREFIX="${EPREFIX}"/usr
diff --git a/games-emulation/bsnes-jg/files/bsnes-jg-2.0.0-install-data.patch b/games-emulation/bsnes-jg/files/bsnes-jg-2.0.0-install-data.patch
new file mode 100644
index 000000000000..9c34e3c9b617
--- /dev/null
+++ b/games-emulation/bsnes-jg/files/bsnes-jg-2.0.0-install-data.patch
@@ -0,0 +1,53 @@
+Upstream-PR: https://gitlab.com/jgemu/bsnes/-/merge_requests/431
+Upstream-Commit: https://gitlab.com/jgemu/bsnes/-/commit/a94bae4241ffe91f868fb0e359686769e05b7d3c
+
+From a94bae4241ffe91f868fb0e359686769e05b7d3c Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 2 Nov 2024 10:12:49 -0700
+Subject: [PATCH] build: fix installing data files with the example
+
+During install with DISABLE_MODULE=1 and ENABLE_EXAMPLE=1 it will fail
+to install the .bml files.
+---
+ Makefile | 8 ++++----
+ mk/jg.mk | 6 ++++++
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7371ff4..5a7800b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -236,10 +236,10 @@ $(DATA_BIN_TARGET): $(DATA_BASE:%=$(SOURCEDIR)/%) $(BIN_OUT)/.tag
+
+ install-data: all
+ @mkdir -p $(DESTDIR)$(DATADIR)/jollygood/$(NAME)
+- cp $(NAME)/boards.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
+- cp $(NAME)/BSMemory.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
+- cp $(NAME)/SufamiTurbo.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
+- cp $(NAME)/SuperFamicom.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
++ cp $(DATA_OUT)/boards.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
++ cp $(DATA_OUT)/BSMemory.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
++ cp $(DATA_OUT)/SufamiTurbo.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
++ cp $(DATA_OUT)/SuperFamicom.bml $(DESTDIR)$(DATADIR)/jollygood/$(NAME)/
+
+ install-docs::
+ cp $(DEPDIR)/byuuML/LICENSE $(DESTDIR)$(DOCDIR)/LICENSE-byuuML
+diff --git a/mk/jg.mk b/mk/jg.mk
+index 5086d35..a6789b4 100644
+--- a/mk/jg.mk
++++ b/mk/jg.mk
+@@ -143,6 +143,12 @@ else
+ endif
+ endif
+
++ifeq (,$(filter 0,$(ENABLE_EXAMPLE) $(DISABLE_MODULE)))
++ override DATA_OUT := $(BIN_OUT)
++else
++ override DATA_OUT := $(NAME)
++endif
++
+ ifeq ($(INSTALL_SHARED), 0)
+ override HEADERS :=
+ override SYMBOLS_LIST :=
+--
+GitLab
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-03 11:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 5:24 [gentoo-commits] repo/gentoo:master commit in: games-emulation/bsnes-jg/files/, games-emulation/bsnes-jg/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-03-21 2:19 Sam James
2024-11-02 12:46 Joonas Niilola
2024-11-03 11:57 Joonas Niilola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox