diff --git a/app-cdr/uif2iso/files/uif2iso-0.1.7c-fix_c23.patch b/app-cdr/uif2iso/files/uif2iso-0.1.7c-fix_c23.patch new file mode 100644 index 000000000000..75be64a67de2 --- /dev/null +++ b/app-cdr/uif2iso/files/uif2iso-0.1.7c-fix_c23.patch @@ -0,0 +1,99 @@ +see https://bugs.gentoo.org/943915 +fix c23, old-style def +--- a/src/loki91.c ++++ b/src/loki91.c +@@ -61,10 +61,10 @@ + + #define MSB 0x80000000L /* MSB of 32-bit word */ + +-void perm32(out, in , perm) +-Long *out; /* Output 32-bit block to be permuted */ +-Long *in; /* Input 32-bit block after permutation */ +-char perm[32]; /* Permutation array */ ++void perm32(Long *out, Long *in, char perm[32]) ++/*Long *out; Output 32-bit block to be permuted */ ++/*Long *in; Input 32-bit block after permutation */ ++/*char perm[32]; Permutation array */ + { + Long mask = MSB; /* mask used to set bit in output */ + register int i, o, b; /* input bit no, output bit no, value */ +@@ -89,9 +89,9 @@ char perm[32]; /* Permutation array */ + + #define SIZE 256 /* 256 elements in GF(2^8) */ + +-short mult8(a, b, gen) +-short a, b; /* operands for multiply */ +-short gen; /* irreducible polynomial generating Galois Field */ ++short mult8(short a, short b, short gen) ++/*short a, b; operands for multiply */ ++/*short gen; irreducible polynomial generating Galois Field */ + { + short product = 0; /* result of multiplication */ + +@@ -112,10 +112,10 @@ short gen; /* irreducible polynomial generating Galois Field */ + * exp = base ^ exp mod gen + */ + +-short exp8(base, exponent, gen) +-short base; /* base of exponentiation */ +-short exponent; /* exponent */ +-short gen; /* irreducible polynomial generating Galois Field */ ++short exp8(short base, short exponent, short gen) ++/*short base; base of exponentiation */ ++/*short exponent; exponent */ ++/*short gen; irreducible polynomial generating Galois Field */ + { + short accum = base; /* superincreasing sequence of base */ + short result = 1; /* result of exponentiation */ +@@ -139,8 +139,8 @@ short gen; /* irreducible polynomial generating Galois Field */ + char *loki_lib_ver = "LOKI91 library v3.0, Copyright (C) 1991 Lawrence Brown & UNSW"; + + /* subkeys at the 16 rounds */ +-static Long f(); /* declare LOKI function f */ +-static short s(); /* declare LOKI S-box fn s */ ++static Long f(register Long r, Long k); /* declare LOKI function f */ ++static short s(register Long i); /* declare LOKI S-box fn s */ + + + /* +@@ -270,9 +270,9 @@ deloki(Long loki_subkeys[ROUNDS], char b[LOKIBLK]) + #define MASK12 0x0fff /* 12 bit mask for expansion E */ + + static Long +-f(r, k) +-register Long r; /* Data value R(i-1) */ +-Long k; /* Key K(i) */ ++f(register Long r, Long k) ++/*register Long r; Data value R(i-1) */ ++/*Long k; Key K(i) */ + { + Long a, b, c; /* 32 bit S-box output, & P output */ + +@@ -298,11 +298,10 @@ Long k; /* Key K(i) */ + /* + * s(i) - return S-box value for input i + */ +-static short s(i) +-register Long i; /* return S-box value for input i */ ++static short s(register Long i) ++/*register Long i; return S-box value for input i */ + { + register short r, c, v, t; +- short exp8(); /* exponentiation routine for GF(2^8) */ + + r = ((i>>8) & 0xc) | (i & 0x3); /* row value-top 2 & bottom 2 */ + c = (i>>2) & 0xff; /* column value-middle 8 bits */ +--- a/src/seal.c ++++ b/src/seal.c +@@ -46,10 +46,7 @@ typedef struct { + #define F3(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) + #define F4(x, y, z) ((x) ^ (y) ^ (z)) + +-int g(in,i,h) +-unsigned char *in; +-int i; +-uint32_t *h; ++int g(unsigned char *in, int i, uint32_t *h) + { + + uint32_t h0,h1,h2,h3,h4,a,b,c,d,e,temp; diff --git a/app-cdr/uif2iso/uif2iso-0.1.7c-r2.ebuild b/app-cdr/uif2iso/uif2iso-0.1.7c-r2.ebuild index ae20184cc167..303b209509f6 100644 --- a/app-cdr/uif2iso/uif2iso-0.1.7c-r2.ebuild +++ b/app-cdr/uif2iso/uif2iso-0.1.7c-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,7 +6,7 @@ EAPI=8 inherit toolchain-funcs DESCRIPTION="Convert CD images from uif (MagicISO) to iso" -HOMEPAGE="http://aluigi.altervista.org/mytoolz.htm#uif2iso" +HOMEPAGE="https://aluigi.altervista.org/mytoolz.htm#uif2iso" SRC_URI=" mirror://gentoo/${P}.zip test? ( @@ -25,6 +25,11 @@ RDEPEND="sys-libs/zlib" DEPEND="${RDEPEND}" BDEPEND="app-arch/unzip" +PATCHES=( + # https://bugs.gentoo.org/943915 + "${FILESDIR}"/${PN}-0.1.7c-fix_c23.patch +) + src_compile() { emake CC="$(tc-getCC)" -C src -f - <<- 'EOF' CPPFLAGS += -DMAGICISO_IS_SHIT