Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 664546
Collapse All | Expand All

(-)a/dev-util/btyacc/btyacc-3.0-r3.ebuild (+45 lines)
Line 0 Link Here
1
# Copyright 1999-2018 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=7
5
6
inherit toolchain-funcs
7
8
MY_P=${P/./-}
9
DESCRIPTION="Backtracking YACC - modified from Berkeley YACC"
10
HOMEPAGE="http://www.siber.com/btyacc"
11
SRC_URI="http://www.siber.com/btyacc/${MY_P}.tar.gz"
12
13
LICENSE="freedist"
14
SLOT="0"
15
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-linux ~ppc-macos ~x86-macos"
16
17
S="${WORKDIR}"
18
19
PATCHES=(
20
	"${FILESDIR}/${P}-includes.patch"
21
	"${FILESDIR}/${P}-makefile.patch"
22
)
23
DOCS=( README README.BYACC )
24
25
src_prepare() {
26
	cp -av Makefile{,.orig} || die
27
	default
28
	# fix memory issue/glibc corruption
29
	sed -i -e "s|len + 13|len + 14|" main.c || die "Could not fix main.c"
30
	# Darwin doesn't do static binaries
31
	if [[ ${CHOST} == *-darwin* ]]; then
32
		sed -i -e 's/-static//' Makefile || die
33
	fi
34
}
35
36
src_compile() {
37
	tc-export CC
38
	emake CC=$(tc-getCC)
39
}
40
41
src_install() {
42
	dobin btyacc
43
	einstalldocs
44
	newman manpage btyacc.1
45
}
(-)a/dev-util/btyacc/files/btyacc-3.0-includes.patch (-2 / +2 lines)
Lines 1-5 Link Here
1
--- mstring.c
1
--- a/mstring.c
2
+++ mstring.c
2
+++ b/mstring.c
3
@@ -1,6 +1,7 @@
3
@@ -1,6 +1,7 @@
4
 #include <stdlib.h>
4
 #include <stdlib.h>
5
 #include <stdio.h>
5
 #include <stdio.h>
(-)a/dev-util/btyacc/files/btyacc-3.0-makefile.patch
Lines 1-7 Link Here
1
Respect CC, append to CFLAGS (but not -g), append to LDFLAGS, use system LD -jer
1
Respect CC, append to CFLAGS (but not -g), append to LDFLAGS, use system LD -jer
2
2

Return to bug 664546