commit:     de8e441f3e9cc4a2ed0274b66cc8678da06c0dff
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu Oct  6 13:36:37 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct  7 11:28:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de8e441f

app-arch/arc: -Werror=implicit-int fix & update EAPI 7 -> 8

This change applies new patch which make arcdie variadic function in
order to be able to compile with -Werror=implicit-int parameter enabled.

Closes: https://bugs.gentoo.org/870517
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/27662
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/arc/arc-5.21p-r1.ebuild                   | 40 ++++++++++++++++++++++
 app-arch/arc/files/arc-5.21p-variadic-arcdie.patch | 38 ++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/app-arch/arc/arc-5.21p-r1.ebuild b/app-arch/arc/arc-5.21p-r1.ebuild
new file mode 100644
index 000000000000..5aa3d47610cd
--- /dev/null
+++ b/app-arch/arc/arc-5.21p-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Create & extract files from DOS .ARC files"
+HOMEPAGE="https://arc.sourceforge.net";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x86-solaris"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-5.21m-darwin.patch
+       "${FILESDIR}"/${PN}-5.21m-gentoo-fbsd.patch
+       "${FILESDIR}"/${PN}-5.21o-interix.patch
+       "${FILESDIR}"/${PN}-5.21p-fno-common.patch
+       "${FILESDIR}"/${PN}-5.21p-variadic-arcdie.patch
+)
+
+src_prepare() {
+       default
+
+       sed -i Makefile \
+               -e 's/CFLAGS = $(OPT) $(SYSTEM)/CFLAGS += $(SYSTEM)/' \
+               || die "sed Makefile"
+}
+
+src_compile() {
+       emake CC="$(tc-getCC)" OPT="${LDFLAGS}"
+}
+
+src_install() {
+       dobin arc marc
+       doman arc.1
+       dodoc Arc521.doc Arcinfo Changelog Readme
+}

diff --git a/app-arch/arc/files/arc-5.21p-variadic-arcdie.patch 
b/app-arch/arc/files/arc-5.21p-variadic-arcdie.patch
new file mode 100644
index 000000000000..787748f6d3fa
--- /dev/null
+++ b/app-arch/arc/files/arc-5.21p-variadic-arcdie.patch
@@ -0,0 +1,38 @@
+Convert arcdie to variadic function, which solves the issue with
+-Werror=implicit-int enabled.
+
+Bug: https://bugs.gentoo.org/870517
+
+diff --git a/arcmisc.c b/arcmisc.c
+index ea12b41..3d6272e 100644
+--- a/arcmisc.c
++++ b/arcmisc.c
+@@ -3,6 +3,7 @@
+  * $Header: /cvsroot/arc/arc/arcmisc.c,v 1.4 2005/10/09 01:38:22 highlandsun 
Exp $ 
+  */
+ 
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <ctype.h>
+ #include "arc.h"
+@@ -223,11 +224,14 @@ upper(string)
+ }
+ /* VARARGS1 */
+ VOID
+-arcdie(s, arg1, arg2, arg3)
+-      char           *s;
++arcdie(char * s, ...)
+ {
++      va_list ap;
++
+       fprintf(stderr, "ARC: ");
+-      fprintf(stderr, s, arg1, arg2, arg3);
++      va_start(ap, s);
++      vfprintf(stderr, s, ap);
++      va_end(ap);
+       fprintf(stderr, "\n");
+ #if   UNIX
+       perror("UNIX");
+-- 
+2.35.1
+

Reply via email to