diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-03 03:04:04 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-03 03:04:04 +0000 |
commit | 212000bb5eabdfeb9a6e7a9b8f28e2740cae555a (patch) | |
tree | dbbe26e892147b95a24336cc44d791dbe0c0ce5f /games-emulation/bsnes-jg | |
parent | 37a097af13d675b83911ac006ee9ee22d2163f9a (diff) |
gentoo auto-resync : 03:11:2024 - 03:04:03
Diffstat (limited to 'games-emulation/bsnes-jg')
-rw-r--r-- | games-emulation/bsnes-jg/Manifest | 10 | ||||
-rw-r--r-- | games-emulation/bsnes-jg/bsnes-jg-1.1.2-r2.ebuild | 53 | ||||
-rw-r--r-- | games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild | 79 | ||||
-rw-r--r-- | games-emulation/bsnes-jg/bsnes-jg-9999.ebuild | 51 | ||||
-rw-r--r-- | games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-endianness.patch | 58 | ||||
-rw-r--r-- | games-emulation/bsnes-jg/files/bsnes-jg-1.1.2-strict-aliasing.patch | 67 | ||||
-rw-r--r-- | games-emulation/bsnes-jg/metadata.xml | 4 |
7 files changed, 129 insertions, 193 deletions
diff --git a/games-emulation/bsnes-jg/Manifest b/games-emulation/bsnes-jg/Manifest index eada53766ccb..7e225dfae308 100644 --- a/games-emulation/bsnes-jg/Manifest +++ b/games-emulation/bsnes-jg/Manifest @@ -1,8 +1,6 @@ -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 DIST bsnes-1.2.0.tar.bz2 4277380 BLAKE2B 03abb6efdf2e2fe487ddea780f9a3053092e718695d7f875304a008f5e3e967c443f3ad40d7c8a82b07d66c52ead5d258018fd004cb205efaaa872b122057c98 SHA512 96aaeecf10508bc7672c30fa24b34e0d32e34c4190928109a141f4a1d73fb6f007844f9b7154ffc57028ddb9e99b5c281a214b9517ce5de618cf229722ff1e20 -EBUILD bsnes-jg-1.1.2-r2.ebuild 1122 BLAKE2B 7dbe634f8b4d9e74ee5e5756daf7910bb1009d21fedd5537b0935d9ddee4ae7c9276af095b09f6cde3f99cf1b89aae271c3c95801e547ee0c1fb8de7ac0c5e62 SHA512 998c3ab5d632aea162aec5ef4d504aec1637f272dc80a679013111753150de68a6867864ce5911af15d1014c837a183e1b8ad1c9ba0eafd53ae23693b3a131a9 +DIST bsnes-2.0.0.tar.bz2 4318300 BLAKE2B 7b93502a7dd68427069d0a33161927709f327352a3da3637cea416b31293750b249f3d750bba093a5a3430c5c2ab42b5e29e8b707377b29254651091a2b0aaed SHA512 95f970a16c7efdfd5f0dca1a8bcfd7d5785e4e2635eb4c36fdade350be52c8c950736df84a9a5bb108a98c4b9b936f12f2a0ea7d9974737e105b1b0c034f6dbd EBUILD bsnes-jg-1.2.0.ebuild 959 BLAKE2B d8cf4bd1c1d164e337b993d98c2c3251b14cc1ca7a5382212e1b625f987a1b49a30549b7daada9d8c9b3dc507443f6681ed259b1c1a09976cb0351085db03249 SHA512 b86890283e595d516d6e110b51f6fafa22ff6065fe57f179b183f6f417a2259ff36f90dc97f9c1360a5dd994a733e42ed6ab923bf31cc45df64331caf9b00856 -EBUILD bsnes-jg-9999.ebuild 959 BLAKE2B d8cf4bd1c1d164e337b993d98c2c3251b14cc1ca7a5382212e1b625f987a1b49a30549b7daada9d8c9b3dc507443f6681ed259b1c1a09976cb0351085db03249 SHA512 b86890283e595d516d6e110b51f6fafa22ff6065fe57f179b183f6f417a2259ff36f90dc97f9c1360a5dd994a733e42ed6ab923bf31cc45df64331caf9b00856 -MISC metadata.xml 742 BLAKE2B cade709bfd60e69c0c66654b409dbe59fd2c5bfe552d8bf226409b8a5e30d7b34e6934341d7678d241ffcf780dd69a0acd9d0d71f59e399c18d77447f6363e50 SHA512 a60107630d02ba44937e23b97b0b796c45653e8da85c3131bfc3d578683cc2d81194094bd8da44f19ff67c5e3c22eac175e078cecdfa20237f514130d10d4e5e +EBUILD bsnes-jg-2.0.0.ebuild 1578 BLAKE2B 31761008f6b753d03cfa51e429100605e157a8fe73a99c4bebcce5394ba026c17ece97dcd5ad18e61e64e3dcc639eccf2c5b40f055061bd74f84039732508091 SHA512 1a986ae424ad279372744846f8e4417553dc738bf8f6c7a14ba9232f15f75d4d19b24c3995a51cfb039a235840faf9029c51f7de4b8c2c0d37fb2d7dfe12f183 +EBUILD bsnes-jg-9999.ebuild 1578 BLAKE2B 31761008f6b753d03cfa51e429100605e157a8fe73a99c4bebcce5394ba026c17ece97dcd5ad18e61e64e3dcc639eccf2c5b40f055061bd74f84039732508091 SHA512 1a986ae424ad279372744846f8e4417553dc738bf8f6c7a14ba9232f15f75d4d19b24c3995a51cfb039a235840faf9029c51f7de4b8c2c0d37fb2d7dfe12f183 +MISC metadata.xml 874 BLAKE2B 18742e6e4601562b455d7682d5e912c4330f6e62b540dc20bb69ec47a98df1d5897363395ddaa72241aa431d6f50dd81fa61c7a9e1b51f7bf3bdebd7d661edf9 SHA512 4d81b4a7b0c3ac87d365ab0a3432648cacad72f0598b3458d78e8476ac8bcc73a2e68fc8a5134c0941a9db2effcb9633568965cf42d9f3f2c8d6eece1569a34b 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/bsnes-jg-2.0.0.ebuild b/games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild new file mode 100644 index 000000000000..261d967b3f3f --- /dev/null +++ b/games-emulation/bsnes-jg/bsnes-jg-2.0.0.ebuild @@ -0,0 +1,79 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DIR="objs/doc" + +inherit docs 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 + examples? ( 0BSD ) +" +SLOT="1" +IUSE="examples +jgmodule shared" +REQUIRED_USE=" + || ( examples jgmodule shared ) + doc? ( shared ) +" + +DEPEND=" + media-libs/libsamplerate + examples? ( media-libs/libsdl2[sound,video] ) + jgmodule? ( media-libs/jg:1= ) +" +RDEPEND=" + ${DEPEND} + jgmodule? ( games-emulation/jgrf ) +" +BDEPEND=" + virtual/pkgconfig +" + +src_configure() { + local makeopts=( + PREFIX="${EPREFIX}"/usr + DISABLE_MODULE=$(usex jgmodule 0 1) + ENABLE_EXAMPLE=$(usex examples 1 0) + ENABLE_SHARED=$(usex shared 1 0) + ) + export MY_MAKEOPTS="${makeopts[@]}" +} + +src_compile() { + local mymakeargs=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + PKG_CONFIG="$(tc-getPKG_CONFIG)" + ${MY_MAKEOPTS} + ) + emake "${mymakeargs[@]}" + use doc && emake doxyfile + docs_compile +} + +src_install() { + local mymakeargs=( + DESTDIR="${D}" + DOCDIR="${EPREFIX}"/usr/share/doc/${PF} + LIBDIR="${EPREFIX}/usr/$(get_libdir)" + ${MY_MAKEOPTS} + ) + emake install "${mymakeargs[@]}" + use doc && einstalldocs +} diff --git a/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild b/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild index 243ad0946b1d..261d967b3f3f 100644 --- a/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild +++ b/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild @@ -3,7 +3,10 @@ EAPI=8 -inherit toolchain-funcs +DOCS_BUILDER="doxygen" +DOCS_DIR="objs/doc" + +inherit docs toolchain-funcs MY_PN=${PN%-*} MY_P=${MY_PN}-${PV} @@ -18,29 +21,59 @@ else KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" fi -LICENSE="ISC GPL-3+ LGPL-2.1+ MIT ZLIB" +LICENSE=" + ISC GPL-3+ LGPL-2.1+ MIT ZLIB + examples? ( 0BSD ) +" SLOT="1" +IUSE="examples +jgmodule shared" +REQUIRED_USE=" + || ( examples jgmodule shared ) + doc? ( shared ) +" DEPEND=" - media-libs/jg:1= media-libs/libsamplerate + examples? ( media-libs/libsdl2[sound,video] ) + jgmodule? ( media-libs/jg:1= ) " RDEPEND=" ${DEPEND} - games-emulation/jgrf + jgmodule? ( games-emulation/jgrf ) " BDEPEND=" virtual/pkgconfig " +src_configure() { + local makeopts=( + PREFIX="${EPREFIX}"/usr + DISABLE_MODULE=$(usex jgmodule 0 1) + ENABLE_EXAMPLE=$(usex examples 1 0) + ENABLE_SHARED=$(usex shared 1 0) + ) + export MY_MAKEOPTS="${makeopts[@]}" +} + src_compile() { - emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" PKG_CONFIG="$(tc-getPKG_CONFIG)" + local mymakeargs=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + PKG_CONFIG="$(tc-getPKG_CONFIG)" + ${MY_MAKEOPTS} + ) + emake "${mymakeargs[@]}" + use doc && emake doxyfile + docs_compile } src_install() { - emake install \ - DESTDIR="${D}" \ - PREFIX="${EPREFIX}"/usr \ - DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \ + local mymakeargs=( + DESTDIR="${D}" + DOCDIR="${EPREFIX}"/usr/share/doc/${PF} LIBDIR="${EPREFIX}/usr/$(get_libdir)" + ${MY_MAKEOPTS} + ) + emake install "${mymakeargs[@]}" + use doc && einstalldocs } 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 - { diff --git a/games-emulation/bsnes-jg/metadata.xml b/games-emulation/bsnes-jg/metadata.xml index 8d62f9db73ee..3904aaeb005d 100644 --- a/games-emulation/bsnes-jg/metadata.xml +++ b/games-emulation/bsnes-jg/metadata.xml @@ -9,6 +9,10 @@ <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> + <use> + <flag name="jgmodule">Build module for The Jolly Good API</flag> + <flag name="shared">Build shared library</flag> + </use> <longdescription> bsnes-jg is a cycle accurate emulator for the Super Famicom/Super Nintendo Entertainment System, including support for the Super Game Boy, |