summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/aranym')
-rw-r--r--app-emulation/aranym/aranym-1.1.0-r1.ebuild (renamed from app-emulation/aranym/aranym-1.1.0.ebuild)23
-rw-r--r--app-emulation/aranym/files/aranym-1.1.0-ar.patch24
-rw-r--r--app-emulation/aranym/files/aranym-1.1.0-clang-16-register.patch219
-rw-r--r--app-emulation/aranym/files/aranym-1.1.0-configure-bashisms.patch37
-rw-r--r--app-emulation/aranym/files/aranym-1.1.0-configure-clang16.patch30
-rw-r--r--app-emulation/aranym/files/aranym-1.1.0-libcwrap.patch24
-rw-r--r--app-emulation/aranym/metadata.xml2
7 files changed, 354 insertions, 5 deletions
diff --git a/app-emulation/aranym/aranym-1.1.0.ebuild b/app-emulation/aranym/aranym-1.1.0-r1.ebuild
index fe2c0f728ab6..f471b146140f 100644
--- a/app-emulation/aranym/aranym-1.1.0.ebuild
+++ b/app-emulation/aranym/aranym-1.1.0-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools multibuild xdg
+inherit autotools flag-o-matic multibuild toolchain-funcs xdg
DESCRIPTION="Atari Running on Any Machine, VM running Atari ST/TT/Falcon OS and TOS/GEM apps"
HOMEPAGE="https://aranym.github.io"
@@ -20,10 +20,10 @@ REQUIRED_USE="|| ( jit pmmu standard ) lilo? ( pmmu )"
RDEPEND="
dev-libs/gmp:0=
media-libs/libsdl2[video]
- clipboard? ( !kernel_Winnt? (
+ clipboard? (
media-libs/libsdl2[X]
x11-libs/libX11
- ) )
+ )
jpeg? ( virtual/jpeg )
kernel_linux? ( virtual/libudev )
lilo? ( sys-libs/zlib )
@@ -38,6 +38,11 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-1.1.0-conditional-installs.patch
+ "${FILESDIR}"/${PN}-1.1.0-libcwrap.patch
+ "${FILESDIR}"/${PN}-1.1.0-ar.patch
+ "${FILESDIR}"/${PN}-1.1.0-clang-16-register.patch
+ "${FILESDIR}"/${PN}-1.1.0-configure-clang16.patch
+ "${FILESDIR}"/${PN}-1.1.0-configure-bashisms.patch
)
ECONF_SOURCE="${S}"
@@ -49,6 +54,16 @@ src_prepare() {
}
src_configure() {
+ # configure probe fatally errors out since it tries to peek at LTO'ed code using grep
+ # https://bugs.gentoo.org/854510
+ # https://github.com/aranym/aranym/commit/52c56bba30ddea27a0a7179da89cac1c71228de6
+ #
+ # Fixed in git master. Try removing this on the next version bump.
+ filter-lto
+
+ tc-export_build_env
+ export CC_FOR_BUILD=$(tc-getBUILD_CC) CXX_FOR_BUILD=$(tc-getBUILD_CXX)
+
# standard must come last otherwise the aranym executable gets
# overwritten by the others.
MULTIBUILD_VARIANTS=(
diff --git a/app-emulation/aranym/files/aranym-1.1.0-ar.patch b/app-emulation/aranym/files/aranym-1.1.0-ar.patch
new file mode 100644
index 000000000000..55026a626334
--- /dev/null
+++ b/app-emulation/aranym/files/aranym-1.1.0-ar.patch
@@ -0,0 +1,24 @@
+From 9d8586fe8b0f210b2a2d3f5e6f710993015945aa Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 16 Apr 2022 21:51:04 +0100
+Subject: [PATCH] Respect the AR environment variable when building
+
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 14eedb5f..8d425dee 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -371,6 +371,7 @@ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+ AC_PROG_MKDIR_P
+ AC_PROG_RANLIB
++AM_PROG_AR
+ AC_PATH_PROG(PERL, perl)
+ AC_CHECK_TOOLS(WINDRES, [windres], :)
+ PKG_PROG_PKG_CONFIG
+--
+2.34.1
+
diff --git a/app-emulation/aranym/files/aranym-1.1.0-clang-16-register.patch b/app-emulation/aranym/files/aranym-1.1.0-clang-16-register.patch
new file mode 100644
index 000000000000..2adc5fb3c1fe
--- /dev/null
+++ b/app-emulation/aranym/files/aranym-1.1.0-clang-16-register.patch
@@ -0,0 +1,219 @@
+https://bugs.gentoo.org/894446
+https://github.com/aranym/aranym/commit/e19e21151d5e394dd45d4db08e68245e86e32ab7
+https://github.com/aranym/aranym/commit/64414e43deebc665772481d802b6c1c88d752ac3
+
+From e19e21151d5e394dd45d4db08e68245e86e32ab7 Mon Sep 17 00:00:00 2001
+From: Thorsten Otto <admin@tho-otto.de>
+Date: Tue, 2 Aug 2022 18:12:19 +0200
+Subject: [PATCH] Remove obsolete register keywords
+
+--- a/src/blitter.cpp
++++ b/src/blitter.cpp
+@@ -114,8 +114,8 @@ void BLITTER::SM_UW(memptr addr, UW value) {
+ #define HOP_OPS(_fn_name,_op,_do_source_shift,_get_source_data,_shifted_hopd_data, _do_halftone_inc) \
+ static void _fn_name ( BLITTER& b ) \
+ { \
+- register unsigned int skew = (unsigned int) b.skewreg & 15; \
+- register unsigned int source_buffer=0; \
++ unsigned int skew = b.skewreg & 15; \
++ unsigned int source_buffer=0; \
+ if (b.hop & 1) { \
+ if (b.line_num & 0x20) \
+ b.halftone_curroffset = b.skewreg & 15; \
+@@ -127,7 +127,7 @@ static void _fn_name ( BLITTER& b ) \
+ b.halftone_direction = -1; \
+ } \
+ do \
+- { register UW x,dst_data,opd_data; \
++ { UW x,dst_data,opd_data; \
+ if (b.FXSR) \
+ { _do_source_shift; \
+ _get_source_data; \
+--- a/src/md5.cpp
++++ b/src/md5.cpp
+@@ -168,7 +168,7 @@ MD5::MD5Final(md5byte digest[16])
+ void
+ MD5::MD5Transform(UWORD32 buf[4], UWORD32 const in[16])
+ {
+- register UWORD32 a, b, c, d;
++ UWORD32 a, b, c, d;
+
+ a = buf[0];
+ b = buf[1];
+
+From 64414e43deebc665772481d802b6c1c88d752ac3 Mon Sep 17 00:00:00 2001
+From: Thorsten Otto <admin@tho-otto.de>
+Date: Tue, 9 Aug 2022 09:17:31 +0200
+Subject: [PATCH] Remove more obsolete register keywords
+
+--- a/src/disasm/disasm-builtin.cpp
++++ b/src/disasm/disasm-builtin.cpp
+@@ -277,7 +277,7 @@ static const char *const bitfieldtable[] =
+
+ static void ps(m68k_disasm_info *info, const char *str)
+ {
+- register char c;
++ char c;
+
+ while ((c = *str++) != '\0')
+ {
+@@ -486,7 +486,7 @@ static void oadi(m68k_disasm_info *info, int regnum)
+
+ static int os(m68k_disasm_info *info, int opcode)
+ {
+- register int size;
++ int size;
+
+ size = insize(opcode);
+ sputc('.');
+@@ -501,7 +501,7 @@ static int os(m68k_disasm_info *info, int opcode)
+
+ static int os2(m68k_disasm_info *info, int opcode)
+ {
+- register int size;
++ int size;
+
+ size = (opcode >> 9) & 3;
+ sputc('.');
+@@ -968,10 +968,10 @@ static void doextended(m68k_disasm_info *info, int opcode2, int srcr)
+
+ static void doea(m68k_disasm_info *info, int opcode, int size)
+ {
+- register int srcr;
+- register int opcode2;
++ int srcr;
++ int opcode2;
+ uae_s32 offset;
+- register uae_s32 adr;
++ uae_s32 adr;
+
+ srcr = srcreg(opcode);
+ switch (srcmod(opcode))
+@@ -1071,7 +1071,7 @@ static void doea(m68k_disasm_info *info, int opcode, int size)
+
+ static void reglist(m68k_disasm_info *info, int regmask)
+ {
+- register int regnum;
++ int regnum;
+ int liststart;
+ int lastreg;
+ int status;
+@@ -1113,8 +1113,8 @@ static void reglist(m68k_disasm_info *info, int regmask)
+
+ static int revbits(int mask, int n)
+ {
+- register int i;
+- register int newmask;
++ int i;
++ int newmask;
+
+ for (newmask = 0, i = n; i > 0; i--)
+ {
+@@ -1390,7 +1390,7 @@ static void group0(m68k_disasm_info *info, int opcode)
+
+ static void group11(m68k_disasm_info *info, int opcode)
+ {
+- register int size;
++ int size;
+
+ if ((opcode & 0x0100) != 0 && insize(opcode) != 3)
+ {
+@@ -1441,7 +1441,7 @@ static void group11(m68k_disasm_info *info, int opcode)
+
+ static void group1(m68k_disasm_info *info, int opcode)
+ {
+- register int size = 0;
++ int size = 0;
+
+ ps(info, "move");
+ if (dstmod(opcode) == 1)
+@@ -1475,7 +1475,7 @@ static void group1(m68k_disasm_info *info, int opcode)
+
+ static void group14(m68k_disasm_info *info, int opcode)
+ {
+- register short size;
++ short size;
+ unsigned int opcode2;
+ unsigned int bf;
+
+@@ -2069,7 +2069,7 @@ static enum fpu_size print_fpsize(m68k_disasm_info *info, int mask)
+ static void print_freglist(m68k_disasm_info *info, int regmask, int mode, bool cntl)
+ {
+ const char *const * regs;
+- register int regnum;
++ int regnum;
+ int liststart;
+ int lastreg;
+ int status;
+@@ -3011,8 +3011,8 @@ static void pspreg(m68k_disasm_info *info, int mask)
+
+ static void group4(m68k_disasm_info *info, int opcode)
+ {
+- register int mask;
+- register int size;
++ int mask;
++ int size;
+
+ if (opcode & 0x0100)
+ {
+@@ -3540,7 +3540,7 @@ static void group4(m68k_disasm_info *info, int opcode)
+
+ static void group5(m68k_disasm_info *info, int opcode)
+ {
+- register uae_s32 adr;
++ uae_s32 adr;
+
+ if (insize(opcode) == 3)
+ {
+@@ -3603,9 +3603,9 @@ static void group5(m68k_disasm_info *info, int opcode)
+
+ static void group6(m68k_disasm_info *info, int opcode)
+ {
+- register uae_s32 adr;
+- register int cond;
+- register signed char dist;
++ uae_s32 adr;
++ int cond;
++ signed char dist;
+
+ /* 0110 cccc dddddddd */
+ switch (cond = (opcode >> 8) & 0x000f)
+@@ -3686,7 +3686,7 @@ static void group7(m68k_disasm_info *info, int opcode)
+
+ static void g812(m68k_disasm_info *info, int opcode, const char *andor, const char *muldiv, const char *as)
+ {
+- register int size;
++ int size;
+
+ info->num_oper = 2;
+ if (dstmod(opcode) == 3)
+@@ -3772,7 +3772,7 @@ static void group8(m68k_disasm_info *info, int opcode)
+
+ static void group12(m68k_disasm_info *info, int opcode)
+ {
+- register int d5;
++ int d5;
+
+ if ((d5 = (opcode >> 3) & 0x003f) == 0x0028)
+ {
+@@ -3813,7 +3813,7 @@ static void group12(m68k_disasm_info *info, int opcode)
+
+ static void g913(m68k_disasm_info *info, int opcode, const char *addsub)
+ {
+- register int size;
++ int size;
+
+ ps(info, addsub);
+ if ((opcode & 0x0100) != 0 && insize(opcode) != 3 && ((opcode >> 4) & 3) == 0)
+@@ -4125,8 +4125,8 @@ static void (*const grphdlrs[])(m68k_disasm_info *, int) = {
+
+ int m68k_disasm_builtin(m68k_disasm_info *info)
+ {
+- register int opcode;
+- register void (*hdlr)(m68k_disasm_info *info, int opcode);
++ int opcode;
++ void (*hdlr)(m68k_disasm_info *info, int opcode);
+ unsigned int insn_size;
+ struct priv_data *priv;
+
+
diff --git a/app-emulation/aranym/files/aranym-1.1.0-configure-bashisms.patch b/app-emulation/aranym/files/aranym-1.1.0-configure-bashisms.patch
new file mode 100644
index 000000000000..f2a453095a52
--- /dev/null
+++ b/app-emulation/aranym/files/aranym-1.1.0-configure-bashisms.patch
@@ -0,0 +1,37 @@
+https://github.com/aranym/aranym/pull/102
+
+From 1a45b77ee2eaabc53fef0794c0e3a64a7c41683e Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 19 Mar 2023 02:05:09 +0000
+Subject: [PATCH] configure.ac: fix bashisms
+
+configure scripts need to be runnable with a POSIX-compliant /bin/sh.
+
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors
+like this aren't spotted. Notably Debian defaults to /bin/sh provided
+by dash which doesn't tolerate such bashisms as '=='.
+
+This retains compatibility with bash.
+--- a/configure.ac
++++ b/configure.ac
+@@ -1714,7 +1714,7 @@ SDL_CFLAGS=
+ SDL_LIBS=
+ no_sdl=yes
+ no_sdl2=yes
+-if test "$OS_TYPE" == darwin -a "$WITH_FINK" = no; then
++if test "$OS_TYPE" = darwin -a "$WITH_FINK" = no; then
+ ARANYM_CHECK_FRAMEWORK(SDL, [])
+ if test "$have_framework_SDL" = yes ; then
+ ARANYM_CHECK_FRAMEWORK_LOCATION(SDL)
+@@ -1781,7 +1781,7 @@ SDL_LIBS="$SDL_LIBS -lpthread"
+ AM_CONDITIONAL([ENABLE_SDL2], test "$enable_sdl2" = yes)
+ #
+ # SDL2 on macOS needs 10.6 or above
+-if test "$enable_sdl2" = yes -a "$OS_TYPE" == darwin; then
++if test "$enable_sdl2" = yes -a "$OS_TYPE" = darwin; then
+ export MACOSX_DEPLOYMENT_TARGET=10.6
+ fi
+
+--
+2.40.0
+
diff --git a/app-emulation/aranym/files/aranym-1.1.0-configure-clang16.patch b/app-emulation/aranym/files/aranym-1.1.0-configure-clang16.patch
new file mode 100644
index 000000000000..66d2c091b860
--- /dev/null
+++ b/app-emulation/aranym/files/aranym-1.1.0-configure-clang16.patch
@@ -0,0 +1,30 @@
+https://github.com/aranym/aranym/pull/102
+
+From ef9ba74fcbf868aeb1b0e0b02e53775a14cda0f7 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 19 Mar 2023 01:56:56 +0000
+Subject: [PATCH] configure.ac: fix -Wimplicit-function-declaration in TUN/TAP
+ test
+
+Clang 16 makes -Wimplicit-function-declaration an error by default.
+
+Unfortunately, this can lead to misconfiguration or miscompilation of software as configure
+tests may then return the wrong result.
+
+For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2],
+or the (new) c-std-porting mailing list [3].
+
+[0] https://lwn.net/Articles/913505/
+[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
+[2] https://wiki.gentoo.org/wiki/Modern_C_porting
+[3] hosted at lists.linux.dev.
+--- a/configure.ac
++++ b/configure.ac
+@@ -539,6 +539,7 @@ AC_CACHE_CHECK([whether TUN/TAP is supported],
+ #include <net/if.h>
+ #include <net/if_tun.h>
+ #endif
++ #include <string.h>
+ ], [
+ struct ifreq ifr;
+ memset(&ifr, 0, sizeof(ifr));
diff --git a/app-emulation/aranym/files/aranym-1.1.0-libcwrap.patch b/app-emulation/aranym/files/aranym-1.1.0-libcwrap.patch
new file mode 100644
index 000000000000..39ef32c7cc41
--- /dev/null
+++ b/app-emulation/aranym/files/aranym-1.1.0-libcwrap.patch
@@ -0,0 +1,24 @@
+From baa00c51d3cd63602912ee1b252fa774a43b042f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 16 Apr 2022 10:41:44 +0100
+Subject: [PATCH] Use libcwrap.h specifically with glibc, not just Linux, to
+ fix musl
+
+---
+ src/include/linux/libcwrap.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/include/linux/libcwrap.h b/src/include/linux/libcwrap.h
+index f68bafb1..9c5c6b8e 100644
+--- a/src/include/linux/libcwrap.h
++++ b/src/include/linux/libcwrap.h
+@@ -1,5 +1,5 @@
+ /* glibc bindings for target ABI version glibc 2.11 */
+-#if defined(__linux__) && !defined (__LIBC_CUSTOM_BINDINGS_H__) && !defined(__ANDROID__)
++#if defined(__GLIBC__) && defined(__linux__) && !defined (__LIBC_CUSTOM_BINDINGS_H__) && !defined(__ANDROID__)
+
+ #if defined (__cplusplus)
+ extern "C" {
+--
+2.34.1
+
diff --git a/app-emulation/aranym/metadata.xml b/app-emulation/aranym/metadata.xml
index a9d26d2bbfb7..34e1093dcb4b 100644
--- a/app-emulation/aranym/metadata.xml
+++ b/app-emulation/aranym/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>chewi@gentoo.org</email>