summaryrefslogtreecommitdiff
path: root/games-emulation
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/Manifest.gzbin12046 -> 12038 bytes
-rw-r--r--games-emulation/bsnes-jg/Manifest2
-rw-r--r--games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild53
-rw-r--r--games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch67
-rw-r--r--games-emulation/gambatte-jg/Manifest2
-rw-r--r--games-emulation/gambatte-jg/gambatte-jg-9999.ebuild3
-rw-r--r--games-emulation/nestopia-jg/Manifest2
-rw-r--r--games-emulation/nestopia-jg/nestopia-jg-9999.ebuild1
-rw-r--r--games-emulation/sameboy-jg/Manifest4
-rw-r--r--games-emulation/sameboy-jg/files/sameboy-jg-0.16.2-strict-aliasing.patch115
-rw-r--r--games-emulation/sameboy-jg/sameboy-jg-0.16.2-r1.ebuild (renamed from games-emulation/sameboy-jg/sameboy-jg-0.15.8.ebuild)5
11 files changed, 247 insertions, 7 deletions
diff --git a/games-emulation/Manifest.gz b/games-emulation/Manifest.gz
index edd07b865362..db8fdd976dd1 100644
--- a/games-emulation/Manifest.gz
+++ b/games-emulation/Manifest.gz
Binary files differ
diff --git a/games-emulation/bsnes-jg/Manifest b/games-emulation/bsnes-jg/Manifest
index 6060a4d7ab95..47926823607f 100644
--- a/games-emulation/bsnes-jg/Manifest
+++ b/games-emulation/bsnes-jg/Manifest
@@ -1,5 +1,7 @@
AUX bsnes-jg-1.1.2-endianness.patch 3035 BLAKE2B 5b07ce5c7e4011fd69d97f812c64e95b31d26d8e403e84c3409c0f3bcdc9bf294c6114b288732e9e3cc6ec71d12f1498cd59f46f95de2a5aad8292aeb6693891 SHA512 b600dbbc27f497f45f9fa24acc74badbf63573114c7545c11de2571b65e249a1a8f46b5a4f0e23e0aff3884a9049c1302c92922274323273e7a72e1cae3babf8
+AUX bsnes-jg-1.1.2-strict-aliasing.patch 2277 BLAKE2B c91b7e92e387c812c368e3f7e6838200e51b0a9fb076a14c334650fb2e8522465bd21f9fa1afab855e5d10cc2749ee160f7573cdf34b5e00d2000baa2f6e962d SHA512 e02244bdcda681fa1cd80a6ab6863d46009afc8f35ad04821905266510f615bc5782b51196176c3d02c48e1ce8155567c246b23cc0332889e4f5347bc35a787b
DIST bsnes-1.1.2.tar.bz2 4183035 BLAKE2B 09e01845fb9e6208f5262e2abef14c46e9fa53cfdd025821345507fc68e520dc21ca69e5d712a7f821936166975865c26dc0be42549b551abdbb941e748949b1 SHA512 77cb82b6cba2941813de25273bd74b928ad380dccadb909ae3500ddf6f8906504f5400df95381569d35fc7b06e0330f9eb4d54d88d64a5c698925d54df62bada
EBUILD bsnes-jg-1.1.2-r1.ebuild 1021 BLAKE2B 472a32182ab4808fffd7b25ee8c016cc9c3a4ba82806e9e6038dfdb367364911c9edd59a0bd73dcd4f7f64fd5fcd930ebc24bfe6643db5b5e36bca9517db7433 SHA512 399c4c2c286c930e348c1e03544d45c7de285b8a7fb8a71070c10263281fafd075f145d3eff03fa8911b1f2cf253e9c078c05d67f96dc2339f79a0c9b9b81e96
+EBUILD bsnes-jg-1.1.2-r2.ebuild 1122 BLAKE2B 7dbe634f8b4d9e74ee5e5756daf7910bb1009d21fedd5537b0935d9ddee4ae7c9276af095b09f6cde3f99cf1b89aae271c3c95801e547ee0c1fb8de7ac0c5e62 SHA512 998c3ab5d632aea162aec5ef4d504aec1637f272dc80a679013111753150de68a6867864ce5911af15d1014c837a183e1b8ad1c9ba0eafd53ae23693b3a131a9
EBUILD bsnes-jg-9999.ebuild 959 BLAKE2B d8cf4bd1c1d164e337b993d98c2c3251b14cc1ca7a5382212e1b625f987a1b49a30549b7daada9d8c9b3dc507443f6681ed259b1c1a09976cb0351085db03249 SHA512 b86890283e595d516d6e110b51f6fafa22ff6065fe57f179b183f6f417a2259ff36f90dc97f9c1360a5dd994a733e42ed6ab923bf31cc45df64331caf9b00856
MISC metadata.xml 742 BLAKE2B cade709bfd60e69c0c66654b409dbe59fd2c5bfe552d8bf226409b8a5e30d7b34e6934341d7678d241ffcf780dd69a0acd9d0d71f59e399c18d77447f6363e50 SHA512 a60107630d02ba44937e23b97b0b796c45653e8da85c3131bfc3d578683cc2d81194094bd8da44f19ff67c5e3c22eac175e078cecdfa20237f514130d10d4e5e
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
+ {
diff --git a/games-emulation/gambatte-jg/Manifest b/games-emulation/gambatte-jg/Manifest
index 64629f12b840..28ac78a5fef0 100644
--- a/games-emulation/gambatte-jg/Manifest
+++ b/games-emulation/gambatte-jg/Manifest
@@ -1,4 +1,4 @@
DIST gambatte-0.5.1.tar.bz2 305331 BLAKE2B edde374d0ed2b5f8c9ca3060520f2ffa392a82378fcac0ad18ea6ca0a02bc5240c8dc9f72c6427f2c85f11fd4b68b1a92717c20f34ad71d27a1ee3e9eb5238cd SHA512 60ea7199b1f26bb403ac48d871ef5191cbd6de6794ecde72693d9360ca476b364dc9e6c5bd88d5e54e9835d67feb17d1b7453b48096736ef870bea473b0691a5
EBUILD gambatte-jg-0.5.1.ebuild 919 BLAKE2B 9d374581e9abaa4129992adcb86cafd8c73fb71b5fca284a4cd74044f627eeff2f40b0d233f217a2f0a4956009475bef3cf14ca3372b09285e4a69ded170da05 SHA512 4582983c0be84361c1585a3207d559e85e84229ed85673e8c057d2bfdf748ca93622a34c431601605d647fc186a4f7446fe216cb708a0ff51f783cb2790c3ca1
-EBUILD gambatte-jg-9999.ebuild 1470 BLAKE2B cefe155ef8014ebc668588c8fd384d62fce835980cc4f15f91784b45a8fac4ad2acfaf0be67c979579697e456013bcb6a3ae25c4f3a3a1e6e997699a91684f2d SHA512 0446d3918bf36e6b640c20a12dad1213fdab97ea081d07a0a016c1fb0d6a5cabbeee1a8c6d2fe0e051f2e26f0b323771a0ae7e55ec2fb8a357fe30c19b5af5db
+EBUILD gambatte-jg-9999.ebuild 1441 BLAKE2B 7d0d1e577644523fe9b0791b3ad138826b202eeb04ea54f355aa83da19d533be7430646f787e4a8ab8fa20fc561508d3d2444944f0163af742c31dad704bc0cd SHA512 54444488e1563476ba3ba0f2bdd33e0d7a6736661ccb6116acff9c592ea43ce09ae34f9aa803258ecb7ec4bf2bc444f2897b691f41ea646697db23bd82c93625
MISC metadata.xml 829 BLAKE2B 80f617ab969735cfb919892d1b2fcbe1c6f090c3726314039d5ca44245651b2556be0b33af59cb5550c30b445b1053cd861f71a01dc7c6efd3103be8e2b00be9 SHA512 748f3c506bcd68ec1a53598c0c9742b7fbb3ae84c4ab5fd6561bbfae310a48e771f124bcf2efcae6d30bfe77553ed504752b5f36ae2929e66d0227997ace10ca
diff --git a/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild b/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild
index 7cb90f422adf..f342303e1e39 100644
--- a/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild
+++ b/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild
@@ -29,8 +29,7 @@ REQUIRED_USE="|| ( examples jgmodule shared )"
DEPEND="
examples? (
- media-libs/libglvnd
- media-libs/libsdl2[opengl,sound,video]
+ media-libs/libsdl2[sound,video]
media-libs/speexdsp
)
jgmodule? (
diff --git a/games-emulation/nestopia-jg/Manifest b/games-emulation/nestopia-jg/Manifest
index 71eec0677649..b1a3d39cd93f 100644
--- a/games-emulation/nestopia-jg/Manifest
+++ b/games-emulation/nestopia-jg/Manifest
@@ -1,4 +1,4 @@
DIST nestopia-1.52.0.tar.bz2 451267 BLAKE2B a70e1251a5b9dcb17a5d8e8233c12cc90189a0471aa3faf955c15d7331e44c4a67d6ddd101326820c219c3b5e09780a7191a45c14267e6da156d968a5b9bfce0 SHA512 5b2876ec3dcc90b94b99184d964bdeee8f194e07f8b8efeb9f425a118c3cc51e3d54901d922988047bfcb7fa5f3be97ed4e694c1451046a98e99678625d1f6f4
EBUILD nestopia-jg-1.52.0.ebuild 899 BLAKE2B b28832fc70b7b04cbbc1206d3d6195624080bf3d69fdb7547c8f1eb49cbef01d17d10a84b2915ff68435548b8efe90b43334493957011cae3882d3d80079dacb SHA512 d055158116550a5c57cc4f5b2bb0aa98778a0c538c4ed6a45137e102f6a5988f084610fe3c82f452b278604038713be46bc2d70c5fd72ab55d342ea4b38b997d
-EBUILD nestopia-jg-9999.ebuild 916 BLAKE2B acceeab0098bd7fc50766218a4ed581776a99f3f3eb782591187f691b5ab72f9a3c677850d4365970105e9cf5bd681cb53770db12bee44b8fd49e31920658536 SHA512 a8522163394739711011ad33f3edd52fc3e9a6a20024c433fdb653f8e48e95a632d8136d6384b0dac085da8a7edfbf5ca6d4e1e8bc21cdb8d684bd305b66c610
+EBUILD nestopia-jg-9999.ebuild 899 BLAKE2B b28832fc70b7b04cbbc1206d3d6195624080bf3d69fdb7547c8f1eb49cbef01d17d10a84b2915ff68435548b8efe90b43334493957011cae3882d3d80079dacb SHA512 d055158116550a5c57cc4f5b2bb0aa98778a0c538c4ed6a45137e102f6a5988f084610fe3c82f452b278604038713be46bc2d70c5fd72ab55d342ea4b38b997d
MISC metadata.xml 817 BLAKE2B 47dbf60c4058974b2a3fe8a0a8d800e436d4a9cfe4af71cbdf36b77583b7f3766de2120e50c13129b5c61c5fbbb2930567b25133ff2ea2e9ab514f626e091ec3 SHA512 2a57f9aa3201ee331e8bd9d28d52996ac232cc6b0f4e411c73c91838c1623deaa83ae9245c438fb328aa7e29b2a386caf31cd8f1142a9bb6d88b227e85f40950
diff --git a/games-emulation/nestopia-jg/nestopia-jg-9999.ebuild b/games-emulation/nestopia-jg/nestopia-jg-9999.ebuild
index dac62fe4856d..0c8527af385d 100644
--- a/games-emulation/nestopia-jg/nestopia-jg-9999.ebuild
+++ b/games-emulation/nestopia-jg/nestopia-jg-9999.ebuild
@@ -23,7 +23,6 @@ SLOT="1"
DEPEND="
media-libs/jg:1=
- media-libs/soxr
"
RDEPEND="
${DEPEND}
diff --git a/games-emulation/sameboy-jg/Manifest b/games-emulation/sameboy-jg/Manifest
index c51824630c9d..8db851a821ee 100644
--- a/games-emulation/sameboy-jg/Manifest
+++ b/games-emulation/sameboy-jg/Manifest
@@ -1,6 +1,6 @@
-DIST sameboy-0.15.8.tar.bz2 3002961 BLAKE2B 5eacbc82d8c93ee85b774c554b3d3750088e8a4219d5b04daa9e6db0c70923ef823befc12831382a27ee007f117fddcfe35ff3549d7684b8587db9ffc486ccd6 SHA512 9074dfcbf400fe51e605ef0200f6ea8483650d605ab19177089c0e60f9996c15f265c5dec5fd0e6651392c9a9515e8380499e00bac837bb645220cd6ffa9c870
+AUX sameboy-jg-0.16.2-strict-aliasing.patch 3956 BLAKE2B ed3b15eaf554b4fc327fa00ad246e1ed36483a6c7f5a2daad5065fc7250aea00dc14d0250ff5f116528a43ea303e9b668ce45c8cf199949e90baece31cf3c100 SHA512 478ec132acb18bb7941495d96ae0e49f58800fabdfcfb19ff25bd087047794f2082f0b5fb32d8b55b8dd33a532b65424e26cd6933212f7e116b723cdc3605da2
DIST sameboy-0.16.2.tar.bz2 3556441 BLAKE2B 0972cb8ba200d8ac95a3d66e3b671c1adeeea71eebb4202b1985f7f72edebd42886aac48040bf034dab8d93fd52d15165551ee8dfaf6870a59ca7f574fc99e0f SHA512 bd456e248ec2d6ea0e8b017b705c829c6a94b1f7fe734769a86774c4b6983278cc5b4d61fdf8164844545bbd250b3c4f1fe725046ac7edb301268291d907f39f
-EBUILD sameboy-jg-0.15.8.ebuild 987 BLAKE2B 2dcce119bf6ad54ef4977b6053679c4587404de366365f5f8b929b543b4b6aa6a59f11d2be70252df5d81cbf7009ab1afa00236bc616d4e83b565f7199d66eb6 SHA512 130951e3bb86eea3730ebebefdad1527dce767f3dc38789f446954aa3ecacedae1cdc911c5e43f86f3c8947cc9b8ccefc32f9378af04a3936330a09591daa8be
+EBUILD sameboy-jg-0.16.2-r1.ebuild 1076 BLAKE2B e123afc0f7bec0ebb94d3d19b2d8c3733a31d1707241920c02b2322c53eb8724053e9bbc16e7614de13645da43339dfd912d7ffe6d201c497205ab8dca08079e SHA512 aca06a2716140a4f62d920f043872f39c25af39f6a5cb9b112180dc41b89bd098519fb58083c9d3ed9124ce57abd43d53938538922d0a520bfa2c773a082a853
EBUILD sameboy-jg-0.16.2.ebuild 987 BLAKE2B 2dcce119bf6ad54ef4977b6053679c4587404de366365f5f8b929b543b4b6aa6a59f11d2be70252df5d81cbf7009ab1afa00236bc616d4e83b565f7199d66eb6 SHA512 130951e3bb86eea3730ebebefdad1527dce767f3dc38789f446954aa3ecacedae1cdc911c5e43f86f3c8947cc9b8ccefc32f9378af04a3936330a09591daa8be
EBUILD sameboy-jg-9999.ebuild 987 BLAKE2B 2dcce119bf6ad54ef4977b6053679c4587404de366365f5f8b929b543b4b6aa6a59f11d2be70252df5d81cbf7009ab1afa00236bc616d4e83b565f7199d66eb6 SHA512 130951e3bb86eea3730ebebefdad1527dce767f3dc38789f446954aa3ecacedae1cdc911c5e43f86f3c8947cc9b8ccefc32f9378af04a3936330a09591daa8be
MISC metadata.xml 725 BLAKE2B 77295d1bcc5ed31dfc5d162fc2f88e03954fa5552e6ccb688e286c82c68a427edda2717509b3503325d79b5c1ffebc943e4f5ad4da4f24e6d9b9e9dd66b69fb5 SHA512 1c37d417d50220e6201719509c9f66be97d13482846a111728e1020fec3215f55309a48b63d1a13ff66d9c9976783cc767b6124d8888dc3792de7bdccb1d71af
diff --git a/games-emulation/sameboy-jg/files/sameboy-jg-0.16.2-strict-aliasing.patch b/games-emulation/sameboy-jg/files/sameboy-jg-0.16.2-strict-aliasing.patch
new file mode 100644
index 000000000000..f1c82ef78ea6
--- /dev/null
+++ b/games-emulation/sameboy-jg/files/sameboy-jg-0.16.2-strict-aliasing.patch
@@ -0,0 +1,115 @@
+https://bugs.gentoo.org/926077
+https://github.com/LIJI32/SameBoy/pull/593
+https://gitlab.com/jgemu/sameboy/-/merge_requests/50
+https://gitlab.com/jgemu/sameboy/-/commit/6a283f65cc4b9ee4896942afde745fa67e612fd3
+https://gitlab.com/jgemu/sameboy/-/commit/9067678fe0160fe5c2f10a7f6271f8293d5150d1
+
+From 6a283f65cc4b9ee4896942afde745fa67e612fd3 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
+---
+ Core/apu.c | 4 ++--
+ Core/apu.h | 11 +++++++++++
+ Makefile | 2 +-
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/Core/apu.c b/Core/apu.c
+index e621e82a..0f0ed16b 100644
+--- a/Core/apu.c
++++ b/Core/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/Core/apu.h b/Core/apu.h
+index c8700c80..15b54a87 100644
+--- a/Core/apu.h
++++ b/Core/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
+ {
+diff --git a/Makefile b/Makefile
+index c25f38b2..bc239893 100644
+--- a/Makefile
++++ b/Makefile
+@@ -164,7 +164,7 @@ endif
+
+ # These must come before the -Wno- flags
+ WARNINGS += -Werror -Wall -Wno-unknown-warning -Wno-unknown-warning-option -Wno-missing-braces
+-WARNINGS += -Wno-nonnull -Wno-unused-result -Wno-strict-aliasing -Wno-multichar -Wno-int-in-bool-context -Wno-format-truncation
++WARNINGS += -Wno-nonnull -Wno-unused-result -Wno-multichar -Wno-int-in-bool-context -Wno-format-truncation
+
+ # Only add this flag if the compiler supports it
+ ifeq ($(shell $(CC) -x c -c $(NULL) -o $(NULL) -Werror -Wpartial-availability 2> $(NULL); echo $$?),0)
+--
+GitLab
+
+
+From 9067678fe0160fe5c2f10a7f6271f8293d5150d1 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 9 Mar 2024 11:08:57 -0800
+Subject: [PATCH 2/2] build: remove -Wno-strict-aliasing + add
+ -Wno-missing-braces
+
+Upstream also uses -Wno-missing-braces
+
+See: https://github.com/LIJI32/SameBoy/pull/597
+---
+ jollygood/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jollygood/Makefile b/jollygood/Makefile
+index a0bd24b3..b1c22384 100644
+--- a/jollygood/Makefile
++++ b/jollygood/Makefile
+@@ -17,7 +17,7 @@ FLAGS_PB12 := -Os -std=c99
+ DEFS := -D_GNU_SOURCE -DGB_INTERNAL -DGB_DISABLE_REWIND -DGB_DISABLE_DEBUGGER \
+ -DGB_VERSION=\"$(VERSION)\"
+
+-WARNINGS := -Wall -Wno-strict-aliasing -Wno-multichar -Wno-unused-result
++WARNINGS := -Wall -Wno-missing-braces -Wno-multichar -Wno-unused-result
+ WARNINGS_PB12 := -Wall -Wextra -Wshadow
+
+ # Only relative include paths are used in sameboy
+--
+GitLab
+
diff --git a/games-emulation/sameboy-jg/sameboy-jg-0.15.8.ebuild b/games-emulation/sameboy-jg/sameboy-jg-0.16.2-r1.ebuild
index c41503e9640a..e417d12d3618 100644
--- a/games-emulation/sameboy-jg/sameboy-jg-0.15.8.ebuild
+++ b/games-emulation/sameboy-jg/sameboy-jg-0.16.2-r1.ebuild
@@ -33,6 +33,11 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ # https://bugs.gentoo.org/926077
+ "${FILESDIR}"/${P}-strict-aliasing.patch
+)
+
src_compile() {
emake -C jollygood \
CC="$(tc-getCC)" \