diff --git a/community/enscript/APKBUILD b/community/enscript/APKBUILD index 3b056288c12..f9fcbd570e7 100644 --- a/community/enscript/APKBUILD +++ b/community/enscript/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: André Klitzing pkgname=enscript pkgver=1.6.6 -pkgrel=6 +pkgrel=7 pkgdesc="GNU Enscript converts ASCII files to PostScript, HTML, or RTF" url="https://www.gnu.org/software/enscript/" arch="all" @@ -9,6 +9,8 @@ license="GPL-3.0-only" subpackages="$pkgname-doc" source="https://ftp.gnu.org/gnu/enscript/enscript-$pkgver.tar.gz gcc14-implicit-function-declaration.patch + gcc15-getopt.patch + gcc15-regex.patch " prepare() { @@ -38,4 +40,6 @@ package() { sha512sums=" bf1c2b9ea7723518a1ef312145ddcd6ffdef0c6e8b5795ea84cb55d76fccc02f441d0c2dc6897e970368186e6a829ab74a090716624e0f7a8f575653fa495ebc enscript-1.6.6.tar.gz 8534bd60a6f0a2b066fa52ad734c84ff6b9abae859c88550be4a9e93400f25d4520a5b39c0e0995d21d1bb661716806e6d8c2dd04d1391a97b012c7ad1cb58ac gcc14-implicit-function-declaration.patch +ed2542d145d54e1139b5e5e456c9cebcfbf7a0255828d1ba70ccbee0641d0c7ce36d2fa7795dedcd242e4fa4b5ec27bf48bee927fe75ed6281e560f87137e8c9 gcc15-getopt.patch +f5b5ef2716c617be16e58868ea4f547103b47eef0428555bea8db023f1675a0bf37c38eb6cb694a46a481baa02a32417c014eb33ab3c76fd6a6b8e9f40cd1354 gcc15-regex.patch " diff --git a/community/enscript/gcc15-getopt.patch b/community/enscript/gcc15-getopt.patch new file mode 100644 index 00000000000..02f9b7cb867 --- /dev/null +++ b/community/enscript/gcc15-getopt.patch @@ -0,0 +1,24 @@ +diff -ruN a/compat/getopt.c b/compat/getopt.c +--- a/compat/getopt.c 2025-09-10 00:44:17.560000000 +0000 ++++ b/compat/getopt.c 2025-09-10 01:22:33.360000000 +0000 +@@ -211,7 +211,7 @@ + /* Avoid depending on library functions or files + whose names are inconsistent. */ + +-char *getenv (); ++char *getenv (const char *); + + static char * + my_index (str, chr) +diff -ruN a/compat/getopt.h b/compat/getopt.h +--- a/compat/getopt.h 2011-10-30 16:48:42.000000000 +0000 ++++ b/compat/getopt.h 2025-09-10 01:21:26.450000000 +0000 +@@ -105,7 +105,7 @@ + errors, only prototype getopt for the GNU C library. */ + extern int getopt (int argc, char *const *argv, const char *shortopts); + #else /* not __GNU_LIBRARY__ */ +-extern int getopt (); ++extern int getopt(int, char * const [], const char *); + #endif /* __GNU_LIBRARY__ */ + extern int getopt_long (int argc, char *const *argv, const char *shortopts, + const struct option *longopts, int *longind); diff --git a/community/enscript/gcc15-regex.patch b/community/enscript/gcc15-regex.patch new file mode 100644 index 00000000000..12a95fd6741 --- /dev/null +++ b/community/enscript/gcc15-regex.patch @@ -0,0 +1,15 @@ +Patch-Source: https://src.fedoraproject.org/rpms/enscript/blob/9c673cf1082e06e133c14e9896b78a317b93359e/f/enscript-c23.patch +--- +diff --git a/compat/regex.c b/compat/regex.c +index c6907f3..87f2840 100644 +--- a/compat/regex.c ++++ b/compat/regex.c +@@ -336,7 +336,7 @@ typedef char boolean; + #define false 0 + #define true 1 + +-static int re_match_2_internal (); ++static int re_match_2_internal (struct re_pattern_buffer*, const char*, int, const char*, int, int, struct re_registers*, int); + + /* These are the command codes that appear in compiled regular + expressions. Some opcodes are followed by argument bytes. A