diff options
Diffstat (limited to 'app-emulation/dlx')
-rw-r--r-- | app-emulation/dlx/Manifest | 3 | ||||
-rw-r--r-- | app-emulation/dlx/dlx-1.5.20-r1.ebuild | 34 | ||||
-rw-r--r-- | app-emulation/dlx/files/dlx-1.5.20-fix-implicit-function-declarations.patch | 102 | ||||
-rw-r--r-- | app-emulation/dlx/files/dlx-1.5.20-fix-lto-type-mismatch.patch | 193 |
4 files changed, 332 insertions, 0 deletions
diff --git a/app-emulation/dlx/Manifest b/app-emulation/dlx/Manifest index f4dfec964cb9..6ab2b4eba46c 100644 --- a/app-emulation/dlx/Manifest +++ b/app-emulation/dlx/Manifest @@ -1,3 +1,6 @@ +AUX dlx-1.5.20-fix-implicit-function-declarations.patch 2613 BLAKE2B d019accdd4e7092c11debe4fe3ed8676f1f2f011d35920c0af774baa2513660071c1ccffca7b755f1507fcec14f92b902c24a0b12a81d9b161fe3125fe0e13bb SHA512 30525bc8543b345da7f7ad198608ce91cb5b7a27d3f61dea5f12997e110a78dfe95b25f3ba6d227ae6352ad9acabdc1553e8ce72b6916340fd1f9b4fc70bc847 +AUX dlx-1.5.20-fix-lto-type-mismatch.patch 5227 BLAKE2B bf86878db39f9c5e04a5ad402d01f3bd42c205c8248645e65df4f0243a6114ed260e4702aa6d57b8366739b43f142111b5f2c95b1a274d6181c2b91ae09265ff SHA512 2e8a74d5e4bd68149644d8f8461e343526a0a253f700862d013f20ab137bea4b1f6bee608f6a90a742447681d64c951c6b79e482060a815aa6fdcc9e837c941b DIST dlx-1.5.20.zip 137039 BLAKE2B 99dbb2e5bcd89b3e9f3d8edc2fe7e7cc0a59f870f597a40a61a993b95d8b27c4f95b8d0490fdbcbc15693040d6e3abdfb8b0062e109916f5299c3da3c203d755 SHA512 5c832c2a486a82574ae03ec0cb4e30bfec74ef968658a38fbd896a1383dcdc558501baef7cbbdf99df453ba2840622d16c1619f9c5fe34b6cd058a7718bd3790 +EBUILD dlx-1.5.20-r1.ebuild 711 BLAKE2B 933afe58e3368f5a00faf1323e021cf225f9bcbf13cc48bca65464c9b9cc43a24350a09f9545e14dd334558631a987e4c4b42398af3e4ade78c71eb2902dfe96 SHA512 04efc5e6201bd2cbc16f9a964d1a16934ce6ba831fec1b455edd78927d8a6d41df916aed845bd0ac08b6991cc23a3ae31e3eccb3d5d298ce1439ea424c3ebece EBUILD dlx-1.5.20.ebuild 587 BLAKE2B e3a64dff410f41630750b3f79103645d908c0a0de9c53bfe6670f2e0b0e14ae8766e2e46150ba43fd9b16fd68c97fb7063087deb0a49564aad93b7feadd313de SHA512 ebec3dd0d23230c101b792e0bcc2ac20fd161a5f8195acf189778692272ff32d1853cc0be415411343a47487391f365d0e8a294e58a95a70b795f10fdbea9b06 MISC metadata.xml 167 BLAKE2B 868e3b584722eaacf68273db062bb773d8c7e5d7ab2b81ca7e8397643bf7cc106c3a1033594401c99c54f667bb45d6b73f9048fc335580bbd44b4589ad26a832 SHA512 30caadd1496c3b9969136038239a1d8e01f236726b4022c2d7e19ca7575f25f735e556835e581afbf44fbd3e4104c40f2b5ef5fa70118d75c881fdf871962d0a diff --git a/app-emulation/dlx/dlx-1.5.20-r1.ebuild b/app-emulation/dlx/dlx-1.5.20-r1.ebuild new file mode 100644 index 000000000000..138eb0ed9f0d --- /dev/null +++ b/app-emulation/dlx/dlx-1.5.20-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="DLX Simulator" +HOMEPAGE="https://www.davidviner.com/dlx" +SRC_URI="https://www.davidviner.com/zip/dlx/dlx.zip -> ${P}.zip" +S="${WORKDIR}"/dlx + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +BDEPEND="app-arch/unzip" + +PATCHES=( + "${FILESDIR}/${P}-fix-implicit-function-declarations.patch" + "${FILESDIR}/${P}-fix-lto-type-mismatch.patch" +) + +src_compile() { + # CXX not used + emake CC="$(tc-getCC)" LINK="$(tc-getCC)" \ + CFLAGS="${CFLAGS} ${CPPFLAGS}" \ + LFLAGS="${CFLAGS} ${LDFLAGS}" +} + +src_install() { + dobin masm mon dasm + dodoc README.txt MANUAL.TXT +} diff --git a/app-emulation/dlx/files/dlx-1.5.20-fix-implicit-function-declarations.patch b/app-emulation/dlx/files/dlx-1.5.20-fix-implicit-function-declarations.patch new file mode 100644 index 000000000000..6bd0b4aff69a --- /dev/null +++ b/app-emulation/dlx/files/dlx-1.5.20-fix-implicit-function-declarations.patch @@ -0,0 +1,102 @@ +Date: Sat, 10 Dec 2022 13:25:28 +0100 +Subject: [PATCH] fix implicit function declarations + +By default clang16 will not allow implicit function declarations. +This patch overhauls the whole source code to fix that. + +Bug: https://bugs.gentoo.org/874933 +This patch has been sent upstream via mail. + +Pascal Jaeger <pascal.jaeger@leimstift.de> (2022-12-10) + +--- a/cpu.h ++++ b/cpu.h +@@ -573,4 +573,4 @@ extern struct DecodeTables DecodeT [128]; + + ///////////////////////////////////////////////////////////////////////////////////////// + +- ++VOID DoMcLoad (STRPTR Cmd); +--- a/dsym.c ++++ b/dsym.c +@@ -19,6 +19,7 @@ + + SymTab SymBase = (SymTab) NULL; + ++extern VOID Error (STRPTR Msg, BOOL PrintLine); + BOOL DoTitle; + + ///////////////////////////////////////////////////////////////////////////////////////// +--- a/dsym.h ++++ b/dsym.h +@@ -38,6 +38,7 @@ extern SymTab AddSymbol (STRPTR Sym, ULONG Val, BOOL SetUp); + extern VOID DeleteSymbolTable (); + extern VOID DisplaySymbolTable (BOOL NotFound); + extern SymTab FindSymbol (STRPTR Sym); ++extern VOID CopyMacro (SymTab S); + + ///////////////////////////////////////////////////////////////////////////////////////// + +--- a/io.c ++++ b/io.c +@@ -14,6 +14,8 @@ + + #include "cpu.h" + ++extern ULONG ExtractNo (STRPTR Str, WORD *Pos, BOOL *Blank); ++ + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + /* Extract a file name from Cmd at position Pos */ + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +--- a/masm.c ++++ b/masm.c +@@ -51,6 +51,8 @@ extern char LinkDate []; + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + ++VOID Error (STRPTR Msg); ++ + FILE *In; /* Input file */ + + BOOL LittleEndian = FALSE, Ok = TRUE, ESym = FALSE; +--- a/masm.h ++++ b/masm.h +@@ -13,5 +13,3 @@ + + #define LINELEN 130 + +- +- +--- a/mon.c ++++ b/mon.c +@@ -88,6 +88,7 @@ + #include "mon.h" + #include "io.h" + ++extern void Error (STRPTR Msg, BOOL PrintLine); + ULONG LastAddr = 0; + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +--- a/mon.h ++++ b/mon.h +@@ -46,6 +46,7 @@ extern UBYTE PauseForKey (UBYTE Msg); + + extern ULONG DebugLevel; + extern FILE *Log; ++VOID DisMicrocode (); + + #define DB_DISASSEM 0x0001 + #define DB_MICROCODE 0x0002 +--- a/msym.c ++++ b/msym.c +@@ -15,6 +15,7 @@ + + SymTab SymBase = (SymTab) NULL; + ++extern void Error (STRPTR Msg, BOOL PrintLine); + BOOL DoTitle; + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +-- +2.38.1 + diff --git a/app-emulation/dlx/files/dlx-1.5.20-fix-lto-type-mismatch.patch b/app-emulation/dlx/files/dlx-1.5.20-fix-lto-type-mismatch.patch new file mode 100644 index 000000000000..c9fda0f9e768 --- /dev/null +++ b/app-emulation/dlx/files/dlx-1.5.20-fix-lto-type-mismatch.patch @@ -0,0 +1,193 @@ +Date: Sat, 10 Dec 2022 14:14:35 +0100 +Subject: [PATCH] fix lto-type-mismatch + +This gets rid of a double definition of the function Error and renames +one of the Error functions to Error_s + +Bug: https://bugs.gentoo.org/854513 +This patch has been sent upstream via mail. + +Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de> +--- a/masm.c ++++ b/masm.c +@@ -51,7 +51,7 @@ extern char LinkDate []; + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +-VOID Error (STRPTR Msg); ++VOID Error_s (STRPTR Msg); + + FILE *In; /* Input file */ + +@@ -274,7 +274,7 @@ STRPTR Decode2Table [] = + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +-VOID Error (STRPTR Msg) ++VOID Error_s (STRPTR Msg) + { + if (strlen (Line)) + { +@@ -381,7 +381,7 @@ BOOL HandleSymbol (BOOL Jump) + if (ST->SetUp && !Jump) + { + sprintf (Txt, "Multiple definition of label <%s>\n", Sym); +- Error (Txt); ++ Error_s (Txt); + } + + if (!Jump) +@@ -414,7 +414,7 @@ VOID WriteTables (STRPTR FName) + if (!o) + { + sprintf (Txt, "Cannot open output microcode file '%s'", FName); +- Error (Txt); ++ Error_s (Txt); + } + + for (i = 0; i < MICROSIZE; i++) +@@ -493,7 +493,7 @@ VOID SetJump (SymTab ST) + if (!ST->SetUp) + { + sprintf (Txt, "Label <%s> never defined\n", ST->Name); +- Error (Txt); ++ Error_s (Txt); + } + + if (ST->NoRefs) +@@ -536,7 +536,7 @@ VOID DoDecode1 () + if (!Found) + { + sprintf (Txt, "Unrecognised Decode1 keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + ptr++; +@@ -553,13 +553,13 @@ VOID DoDecode1 () + if (!ST) /* New label */ + { + sprintf (Txt, "Unrecognised label <%s>\n", Sym); +- Error (Txt); ++ Error_s (Txt); + } + + if (!ST->SetUp) + { + sprintf (Txt, "Label <%s> not declared\n", ST->Name); +- Error (Txt); ++ Error_s (Txt); + } + + Decode1 [Ind] = ST->Val; +@@ -591,7 +591,7 @@ VOID DoDecode2 () + if (!Found) + { + sprintf (Txt, "Unrecognised Decode2 keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + ptr++; +@@ -608,13 +608,13 @@ VOID DoDecode2 () + if (!ST) /* New label */ + { + sprintf (Txt, "Unrecognised label <%s>\n", Sym); +- Error (Txt); ++ Error_s (Txt); + } + + if (!ST->SetUp) + { + sprintf (Txt, "Label <%s> not declared\n", ST->Name); +- Error (Txt); ++ Error_s (Txt); + } + + Decode2 [Ind] = ST->Val; +@@ -649,7 +649,7 @@ VOID DoMicroCode () + if (Ind == INVALID) + { + sprintf (Txt, "Unrecognised Dest keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + Microcode [Addr] |= ((Ind + 1) << 28); /* 0 = no dest */ +@@ -671,7 +671,7 @@ VOID DoMicroCode () + if (Ind == INVALID) + { + sprintf (Txt, "Unrecognised ALU keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + Microcode [Addr] |= (Ind << 22); +@@ -695,7 +695,7 @@ VOID DoMicroCode () + if (Ind == INVALID) + { + sprintf (Txt, "Unrecognised Source 1 keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + Microcode [Addr] |= (Ind << 18); +@@ -719,7 +719,7 @@ VOID DoMicroCode () + if (Ind == INVALID) + { + sprintf (Txt, "Unrecognised Source 2 keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + Microcode [Addr] |= (Ind << 14); +@@ -755,7 +755,7 @@ VOID DoMicroCode () + if (Ind == INVALID) + { + sprintf (Txt, "Unrecognised Misc keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + Microcode [Addr] |= (Ind << 5); +@@ -779,7 +779,7 @@ VOID DoMicroCode () + if (Ind == INVALID) + { + sprintf (Txt, "Unrecognised Condition keyword <%s>\n", Keyword); +- Error (Txt); ++ Error_s (Txt); + } + + Microcode [Addr] |= (Ind + 1); /* 0 = no cond */ +@@ -933,7 +933,7 @@ int main (int argc, char **argv) + if (Addr >= MICROSIZE) + { + sprintf (Txt, "Too many microcode lines - maximum %d", MICROSIZE); +- Error (Txt); ++ Error_s (Txt); + } + + break; +--- a/msym.c ++++ b/msym.c +@@ -15,7 +15,7 @@ + + SymTab SymBase = (SymTab) NULL; + +-extern void Error (STRPTR Msg, BOOL PrintLine); ++extern VOID Error_s (STRPTR Msg); + BOOL DoTitle; + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +@@ -84,7 +84,7 @@ SymTab AddSymbol (STRPTR Sym, ULONG Val, BOOL SetUp) + S = (SymTab) calloc (1, sizeof (struct SymTabType)); + + if (!S) +- Error ("Out of memory (AddSymbol)", FALSE); ++ Error_s ("Out of memory (AddSymbol)"); + + strcpy (S->Name, Sym); + +-- +2.38.1 + |