Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/byaccj/, dev-java/byaccj/files/
Date: Tue, 31 May 2022 08:03:56
Message-Id: 1653984220.1a02c18680d1802c32f51a003a36fcbb8c1e447d.sam@gentoo
1 commit: 1a02c18680d1802c32f51a003a36fcbb8c1e447d
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 07:58:18 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 08:03:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a02c186
7
8 dev-java/byaccj: fix implicit function declaration
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-java/byaccj/byaccj-1.15-r3.ebuild | 31 ++++++++++++++++++++++
13 ...byaccj-1.15-implicit-function-declaration.patch | 15 +++++++++++
14 2 files changed, 46 insertions(+)
15
16 diff --git a/dev-java/byaccj/byaccj-1.15-r3.ebuild b/dev-java/byaccj/byaccj-1.15-r3.ebuild
17 new file mode 100644
18 index 000000000000..4db1ab8bbc03
19 --- /dev/null
20 +++ b/dev-java/byaccj/byaccj-1.15-r3.ebuild
21 @@ -0,0 +1,31 @@
22 +# Copyright 1999-2022 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +
27 +inherit toolchain-funcs
28 +
29 +DESCRIPTION="A java extension of BSD YACC-compatible parser generator"
30 +HOMEPAGE="http://byaccj.sourceforge.net/"
31 +MY_P="${PN}${PV}_src"
32 +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
33 +
34 +LICENSE="public-domain"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~ppc-macos ~x64-macos"
37 +
38 +S="${WORKDIR}/${PN}${PV}"
39 +
40 +PATCHES=(
41 + "${FILESDIR}"/${PN}-1.15-implicit-function-declaration.patch
42 +)
43 +
44 +src_compile() {
45 + cp "${FILESDIR}/Makefile" src/Makefile || die
46 + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" -C src linux
47 +}
48 +
49 +src_install() {
50 + newbin src/yacc.linux "${PN}"
51 + dodoc docs/ACKNOWLEDGEMEN
52 +}
53
54 diff --git a/dev-java/byaccj/files/byaccj-1.15-implicit-function-declaration.patch b/dev-java/byaccj/files/byaccj-1.15-implicit-function-declaration.patch
55 new file mode 100644
56 index 000000000000..5f5bb58db13e
57 --- /dev/null
58 +++ b/dev-java/byaccj/files/byaccj-1.15-implicit-function-declaration.patch
59 @@ -0,0 +1,15 @@
60 +main.c: In function ‘done’:
61 +main.c:88:43: error: implicit declaration of function -Werror=implicit-function-declaration
62 + 88 | if (action_file) { fclose(action_file); unlink(action_file_name); }
63 + | ^~~~~~
64 +--- a/src/main.c
65 ++++ b/src/main.c
66 +@@ -2,6 +2,8 @@
67 + #include <stdlib.h>
68 + #include <string.h>
69 +
70 ++#include <unistd.h>
71 ++
72 + #ifndef __WIN32__ /*rwj -- make portable*/
73 + #include <signal.h>
74 + #else