From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1727902-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 3309E1584F2
	for <garchives@archives.gentoo.org>; Fri, 14 Mar 2025 21:00:49 +0000 (UTC)
Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	(Authenticated sender: relay-lists.gentoo.org@gentoo.org)
	by smtp.gentoo.org (Postfix) with ESMTPSA id 1F28A343187
	for <garchives@archives.gentoo.org>; Fri, 14 Mar 2025 21:00:49 +0000 (UTC)
Received: from bobolink.gentoo.org (localhost [127.0.0.1])
	by bobolink.gentoo.org (Postfix) with ESMTP id 39E471103CB;
	Fri, 14 Mar 2025 21:00:45 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by bobolink.gentoo.org (Postfix) with ESMTPS id 304171103C8
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 Mar 2025 21:00:45 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D12F0343111
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 Mar 2025 21:00:44 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A3141C96
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 Mar 2025 21:00:43 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1741985993.42c15a2f99997bf8fa6197519c28cb1a3e470232.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/btyacc/files/, dev-util/btyacc/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/btyacc/btyacc-3.0-r5.ebuild dev-util/btyacc/files/btyacc-3.0-c99.patch
X-VCS-Directories: dev-util/btyacc/ dev-util/btyacc/files/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 42c15a2f99997bf8fa6197519c28cb1a3e470232
X-VCS-Branch: master
Date: Fri, 14 Mar 2025 21:00:43 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 03127e9f-02fa-4a44-a92f-777e94660ae0
X-Archives-Hash: 52c791a67cbfd239e164069a55f2c502

commit:     42c15a2f99997bf8fa6197519c28cb1a3e470232
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Tue Mar 11 18:34:46 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 14 20:59:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42c15a2f

dev-util/btyacc: update EAPI 7 -> 8, port to C99, wire tests

Closes: https://bugs.gentoo.org/880971
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/41023
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/btyacc/btyacc-3.0-r5.ebuild       | 39 ++++++++++++++++++++++++++
 dev-util/btyacc/files/btyacc-3.0-c99.patch | 45 ++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/dev-util/btyacc/btyacc-3.0-r5.ebuild b/dev-util/btyacc/btyacc-3.0-r5.ebuild
new file mode 100644
index 000000000000..c211b39e8295
--- /dev/null
+++ b/dev-util/btyacc/btyacc-3.0-r5.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_P="${PN}-3-0"
+DESCRIPTION="Backtracking YACC - modified from Berkeley YACC"
+HOMEPAGE="https://www.siber.com/btyacc"
+SRC_URI="https://www.siber.com/btyacc/${MY_P}.tar.gz"
+S="${WORKDIR}"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~ppc-macos"
+
+PATCHES=(
+	"${FILESDIR}/${P}-includes.patch"
+	"${FILESDIR}/${P}-makefile.patch"
+	"${FILESDIR}/${P}-c99.patch"
+)
+
+src_compile() {
+	emake CC="$(tc-getCC)"
+}
+
+src_test() {
+	for file in "${S}"/test/*.y;
+		do "${S}"/btyacc "${file}" || die
+		rm y_tab.c || die
+	done
+}
+
+src_install() {
+	dobin btyacc
+	dodoc README README.BYACC
+	newman manpage btyacc.1
+}

diff --git a/dev-util/btyacc/files/btyacc-3.0-c99.patch b/dev-util/btyacc/files/btyacc-3.0-c99.patch
new file mode 100644
index 000000000000..f34a78949e96
--- /dev/null
+++ b/dev-util/btyacc/files/btyacc-3.0-c99.patch
@@ -0,0 +1,45 @@
+Fold sed that fixed https://bugs.gentoo.org/361013 into patch
+Correct type for signal handler that ignores argument.
+https://bugs.gentoo.org/880971
+--- a/defs.h
++++ b/defs.h
+@@ -391,7 +391,7 @@
+ 
+ /* main.c */
+ void done(int);
+-void onintr(void);
++void onintr(int);
+ void set_signals(void);
+ void usage(void);
+ void getargs(int, char **);
+--- a/main.c
++++ b/main.c
+@@ -76,7 +76,7 @@
+ }
+ 
+ 
+-void onintr()
++void onintr(int ignored) //signal handler
+ {
+     done(1);
+ }
+@@ -264,7 +264,7 @@
+     if (tmpdir == 0) tmpdir = DEFAULT_TMPDIR;
+ 
+     len = strlen(tmpdir);
+-    i = len + 13;
++    i = len + 14;
+     if (len && tmpdir[len-1] != DIR_CHAR)
+ 	++i;
+ 
+--- a/reader.c
++++ b/reader.c
+@@ -291,7 +291,7 @@
+     cachec(NUL);
+     
+     if ((key = bsearch(cache, keywords, sizeof(keywords)/sizeof(*key),
+-		       sizeof(*key), strcmp)))
++		       sizeof(*key), (int (*)(const void*, const void*))strcmp)))
+       return key->token; 
+   } else {
+     ++cptr;