forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-java/byaccj: fix implicit function declaration
Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
456b5ea
commit 1a02c18
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit toolchain-funcs | ||
|
||
DESCRIPTION="A java extension of BSD YACC-compatible parser generator" | ||
HOMEPAGE="http://byaccj.sourceforge.net/" | ||
MY_P="${PN}${PV}_src" | ||
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" | ||
|
||
LICENSE="public-domain" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~ppc-macos ~x64-macos" | ||
|
||
S="${WORKDIR}/${PN}${PV}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-1.15-implicit-function-declaration.patch | ||
) | ||
|
||
src_compile() { | ||
cp "${FILESDIR}/Makefile" src/Makefile || die | ||
emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" -C src linux | ||
} | ||
|
||
src_install() { | ||
newbin src/yacc.linux "${PN}" | ||
dodoc docs/ACKNOWLEDGEMEN | ||
} |
15 changes: 15 additions & 0 deletions
15
dev-java/byaccj/files/byaccj-1.15-implicit-function-declaration.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
main.c: In function ‘done’: | ||
main.c:88:43: error: implicit declaration of function -Werror=implicit-function-declaration | ||
88 | if (action_file) { fclose(action_file); unlink(action_file_name); } | ||
| ^~~~~~ | ||
--- a/src/main.c | ||
+++ b/src/main.c | ||
@@ -2,6 +2,8 @@ | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
+#include <unistd.h> | ||
+ | ||
#ifndef __WIN32__ /*rwj -- make portable*/ | ||
#include <signal.h> | ||
#else |