summaryrefslogtreecommitdiff
path: root/app-emulation
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-21 23:15:32 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-21 23:15:32 +0100
commitdcd08467271c676e143c6c967faf8580fae7ca77 (patch)
tree86ebe68ab58590f06f3ce077bd7b8085498b1edf /app-emulation
parentd7c0aa05b3a48c9b2bad24e3d805820f861165c6 (diff)
gentoo auto-resync : 21:09:2023 - 23:15:31
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/Manifest.gzbin15317 -> 15318 bytes
-rw-r--r--app-emulation/softgun/Manifest3
-rw-r--r--app-emulation/softgun/files/softgun-0.22-fix-declarations-with-type-mismatches.patch148
-rw-r--r--app-emulation/softgun/files/softgun-0.22-fix-implicit-int.patch33
-rw-r--r--app-emulation/softgun/softgun-0.22-r1.ebuild38
5 files changed, 222 insertions, 0 deletions
diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz
index 1199166f14b3..5aa666557351 100644
--- a/app-emulation/Manifest.gz
+++ b/app-emulation/Manifest.gz
Binary files differ
diff --git a/app-emulation/softgun/Manifest b/app-emulation/softgun/Manifest
index cc4ea2f9572e..916d6f9b2ffe 100644
--- a/app-emulation/softgun/Manifest
+++ b/app-emulation/softgun/Manifest
@@ -1,4 +1,7 @@
+AUX softgun-0.22-fix-declarations-with-type-mismatches.patch 4360 BLAKE2B 5d3e1c32571d123d3171e74244c5a909f2781c4e15043129f68db8d6044a756eea161457126fa8ec3659a71d2deac9402c9c6ec11459fb89e9773121c97eb8be SHA512 7280b2627fb0c0058690654bf78affe63798a49a8cf0d7060d62dbf5af1e27ce97a3a106e599182c0a940dc5644986b3c4bbe0233a728c65f2da8bd5405ea076
+AUX softgun-0.22-fix-implicit-int.patch 830 BLAKE2B 1fb76566cfdb9e7e1854756c4ceb1ea81cfc79e900eb55eea96c7663c97de0d7df7cb2e3cb8837c3ec256496fd1219cefe813670330ed1d1de22fd9d5684bb33 SHA512 45719e0eea1f981494d24229696399c155b681c0d59a4568ec679e99030203f929cb6a61a12305e5d01d29ad07339d5a1b00a466f9de939208d665c17f0b6ba2
AUX softgun-0.22-make.patch 2157 BLAKE2B aa09e9a16fb39e9f85b369db98e2d89ea342a02e141ff35c0b6a42a61f35e89928b9a00498157ca2080b94a61bf8b53ab80209132135a84855a89679b86e6a35 SHA512 0ae2fcb89b279799f28fef49b60eaef7d7f4ed145bb24cf7f4543574077672918aa8fbdd85ba6ae4a2af49629de8bebd3f4cbf98d7ed7b5aef3f14e37ec18b50
DIST softgun-0.22.tgz 1239881 BLAKE2B 34bbb67ee0f359fd75e19ec455ccb674e613a25b7a68fa638b7b9c4c2021fbbebe1aee5a4e4184e2e5a92d4ae81fe95acd68f7c68ae3700b2284e64f5b785a30 SHA512 5c13840874b09aab6c0921d705c0ea94da87cc1a80d2fcbc9f329ade25f33bb2c8eba2fe284b4c3b41e70b8f258a45fc83caa296880bfa3e7870994de587e591
+EBUILD softgun-0.22-r1.ebuild 742 BLAKE2B c9c24c0faf25da6132c7573b40c479db0de30ea2b71c06c0c2747661d36b7fdf456b02953f5cfc2030466717c8f35b482d2ffcc12adfaac809cf79d4ae92fb99 SHA512 d412635dc0e62edc950af7ca60bc6014621ff7eec4b1d0091e8920e14a577c2595aa14e42cdd696ae660e1f1c0b651560dcb54eaa090033b5c37aa2c23507fc7
EBUILD softgun-0.22.ebuild 621 BLAKE2B c9c8e865ecbd8da13b8705ff3599e3a302dbd1aaf26789d2627cc5282e46a611d17146daeca1e86616996d65c34fd6a725ab32d7673051ea3f46de02d5f4566f SHA512 23cd814a1c2ce0bf31605e1dd5d467f7fe59945ffcfe20f27f82d24f732fde1a3f58b26d3fa7ef7cd01aab0267301a38c92f924ae02eccd1724e5e9f89cb9c9d
MISC metadata.xml 330 BLAKE2B afc087c31f48ee2423c8e8be00ccb1a2acf59bf4952a766de1b7a27f2db41b69d814b8647d2ebcf2cbd58d762da2b6d44c5dd5def5c8cee065658cb375314df8 SHA512 32ebee67b5bf751d36cfc342313e31b229b8352b7fdbe8432d242d72e4565f433798d64c2b535e7e5b93069b07d566b2fd1d953190eb1ef494c3301feccf3f34
diff --git a/app-emulation/softgun/files/softgun-0.22-fix-declarations-with-type-mismatches.patch b/app-emulation/softgun/files/softgun-0.22-fix-declarations-with-type-mismatches.patch
new file mode 100644
index 000000000000..25bf382eee56
--- /dev/null
+++ b/app-emulation/softgun/files/softgun-0.22-fix-declarations-with-type-mismatches.patch
@@ -0,0 +1,148 @@
+Subject: [PATCH] fix declarations with type mismatches
+
+Type mismatches between declarations prevent the compile from using LTO
+
+Bug: https://bugs.gentoo.org/854534
+Upstream: https://sourceforge.net/p/softgun/patches/5/
+
+# Pascal Jäger <pascal.jaeger@leimstift.de> (2023-09-21)
+
+--- a/m16c/idecode_m16c.c
++++ b/m16c/idecode_m16c.c
+@@ -9,7 +9,7 @@
+ #include "sglib.h"
+
+ M16C_InstructionProc **iProcTab;
+-M16C_Instruction **iTab;
++M16C_Instruction **iTabM16C;
+
+ static M16C_Instruction instrlist[] = {
+ {0xfef0,0x76f0,"abs.size_dst",2 ,m16c_abs_size_dst},
+@@ -308,7 +308,7 @@ M16C_IDecoderNew()
+ int i,j;
+ int onecount1,onecount2;
+ iProcTab=(M16C_InstructionProc**)sg_calloc(0x10000*sizeof(M16C_InstructionProc*));
+- iTab=sg_calloc(0x10000*sizeof(M16C_Instruction*));
++ iTabM16C=sg_calloc(0x10000*sizeof(M16C_Instruction*));
+ fprintf(stderr,"Allocated M16C Instruction decoder table\n");
+ for(j=0;instrlist[j].proc;j++) {
+ M16C_Instruction *instr = &instrlist[j];
+@@ -327,8 +327,8 @@ M16C_IDecoderNew()
+ }
+ #endif
+ if((i & instr->mask) == instr->icode) {
+- if(iTab[i]) {
+- M16C_Instruction *instr2 = iTab[i];
++ if(iTabM16C[i]) {
++ M16C_Instruction *instr2 = iTabM16C[i];
+ specmask1 = instr->mask;
+ specmask2 = instr2->mask;
+ onecount1 = SGLib_OnecountU32(instr->mask);
+@@ -336,18 +336,18 @@ M16C_IDecoderNew()
+ fprintf(stderr,"Collission %s, %s\n",instr->name,instr2->name);
+ #if 0
+ if(instr->len > instr2->len) {
+- iTab[i] = instr;
++ iTabM16C[i] = instr;
+ iProcTab[i] = instr->proc;
+ } else if(instr2->len > instr->len) {
+- iTab[i] = instr2;
++ iTabM16C[i] = instr2;
+ iProcTab[i] = instr2->proc;
+ } else
+ #endif
+ if(onecount1 > onecount2) {
+- iTab[i] = instr;
++ iTabM16C[i] = instr;
+ iProcTab[i] = instr->proc;
+ } else if(onecount2 > onecount1) {
+- iTab[i] = instr2;
++ iTabM16C[i] = instr2;
+ iProcTab[i] = instr2->proc;
+ } else {
+ fprintf(stderr,"Can not decide %s, %s\n",instr->name,instr2->name);
+@@ -360,10 +360,10 @@ M16C_IDecoderNew()
+ specmask2 |= 0xff00;
+ }
+ if((specmask2 & specmask1) == specmask1) {
+- iTab[i] = instr2;
++ iTabM16C[i] = instr2;
+ iProcTab[i] = instr2->proc;
+ } else if((specmask2 & specmask1) == specmask2) {
+- iTab[i] = instr;
++ iTabM16C[i] = instr;
+ iProcTab[i] = instr->proc;
+ } else {
+ fprintf(stdout,"%04x: no instruction is more specific %s %s %04x %04x %d %d\n",i,instr->name,instr2->name,instr->icode,instr2->icode,instr->len,instr2->len);
+@@ -371,13 +371,13 @@ M16C_IDecoderNew()
+ }
+ #endif
+ } else {
+- iTab[i] = instr;
++ iTabM16C[i] = instr;
+ iProcTab[i] = instr->proc;
+ }
+ }
+ }
+- if(iTab[i] == NULL) {
+- iTab[i] = &undefined_instr;
++ if(iTabM16C[i] == NULL) {
++ iTabM16C[i] = &undefined_instr;
+ iProcTab[i] = (&undefined_instr)->proc;
+ }
+ }
+--- a/m16c/idecode_m16c.h
++++ b/m16c/idecode_m16c.h
+@@ -11,14 +11,14 @@ typedef struct M16C_Instruction {
+ } M16C_Instruction;
+
+ extern M16C_InstructionProc **iProcTab;
+-extern M16C_Instruction **iTab;
++extern M16C_Instruction **iTabM16C;
+
+ void M16C_IDecoderNew(void);
+
+ static inline M16C_Instruction *
+ M16C_InstructionFind(uint16_t icode)
+ {
+- return iTab[icode];
++ return iTabM16C[icode];
+ }
+ static inline M16C_InstructionProc *
+ M16C_InstructionProcFind(uint16_t icode)
+--- a/m16c/instructions_m16c.h
++++ b/m16c/instructions_m16c.h
+@@ -160,7 +160,7 @@ void m16c_smovb_size(void);
+ void m16c_smovf_size(void);
+ void m16c_sstr_size(void);
+ void m16c_stc_srcdst(void);
+-void m16c_stc_pcdst(void);
++void m16c_stc_pcdst(uint16_t icode);
+ void m16c_stctx_abs16abs20(void);
+ void m16c_ste_size_srcabs20(void);
+ void m16c_ste_size_srcdsp20(void);
+--- a/ppc/mmu_ppc.c
++++ b/ppc/mmu_ppc.c
+@@ -587,7 +587,7 @@ PPCMMU_Read8(uint32_t va) {
+ }
+
+ void
+-PPCMMU_Write64(uint32_t value,uint32_t va) {
++PPCMMU_Write64(uint64_t value,uint32_t va) {
+ uint32_t pa=translate_data(va);
+ Bus_Write64(value,pa);
+ }
+--- a/printer/decompress.c
++++ b/printer/decompress.c
+@@ -55,7 +55,7 @@ enum
+ eeCachedColor = 0x60
+ };
+
+-inline uint32_t get3pixel (uint8_t* src)
++static inline uint32_t get3pixel (uint8_t* src)
+ {
+ return (src[0] << 16) | (src[1] << 8) | (src[2]);
+ }
+--
+2.41.0
+
diff --git a/app-emulation/softgun/files/softgun-0.22-fix-implicit-int.patch b/app-emulation/softgun/files/softgun-0.22-fix-implicit-int.patch
new file mode 100644
index 000000000000..b65ddaf660f3
--- /dev/null
+++ b/app-emulation/softgun/files/softgun-0.22-fix-implicit-int.patch
@@ -0,0 +1,33 @@
+Subject: [PATCH] fix implicit int declarations in function params
+
+Clang16 does not allow implicit integer declarations by default.
+
+Bug: https://bugs.gentoo.org/882583
+Upstream: https://sourceforge.net/p/softgun/patches/5/
+
+# Pascal Jäger <pascal.jaeger@leimstift.de> (2023-09-21)
+--- a/arm/arm9cpu.h
++++ b/arm/arm9cpu.h
+@@ -356,7 +356,7 @@ ARM_PostRestartIdecoder() {
+ }
+
+ static inline void
+-ARM_SigDebugMode(value) {
++ARM_SigDebugMode(uint32_t value) {
+ if(value) {
+ gcpu.signals_raw |= ARM_SIG_DEBUGMODE;
+ } else {
+--- a/m32c/idecode_m32c.h
++++ b/m32c/idecode_m32c.h
+@@ -84,7 +84,7 @@ M32C_InstructionProcFind(uint16_t icode)
+ #endif
+
+ static inline int
+-M32C_InstructionLen(icode) {
++M32C_InstructionLen(uint32_t icode) {
+ M32C_Instruction *instr = M32C_InstructionFind(icode);
+ return instr->len;
+ }
+--
+2.41.0
+
diff --git a/app-emulation/softgun/softgun-0.22-r1.ebuild b/app-emulation/softgun/softgun-0.22-r1.ebuild
new file mode 100644
index 000000000000..653521bd5aa3
--- /dev/null
+++ b/app-emulation/softgun/softgun-0.22-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="ARM software emulator"
+HOMEPAGE="https://softgun.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="media-libs/alsa-lib"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.22-make.patch
+ "${FILESDIR}"/${PN}-0.22-fix-implicit-int.patch
+ "${FILESDIR}"/${PN}-0.22-fix-declarations-with-type-mismatches.patch
+)
+
+src_configure() {
+ append-cflags -fcommon
+ default
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dodir /usr/bin
+ emake install prefix="${D}/usr"
+ dodoc README configs/*.sg
+}