From 63a644e25059fee0a3054e673e11e4e3ba037a45 Mon Sep 17 00:00:00 2001 From: James Beddek Date: Sat, 13 Nov 2021 23:33:26 +1300 Subject: dev-util/btyacc: update patch, remove static linking Signed-off-by: James Beddek Closes: https://github.com/gentoo/gentoo/pull/22928 Signed-off-by: Sam James --- dev-util/btyacc/btyacc-3.0-r3.ebuild | 43 ------------------------- dev-util/btyacc/btyacc-3.0-r4.ebuild | 39 ++++++++++++++++++++++ dev-util/btyacc/files/btyacc-3.0-makefile.patch | 2 +- 3 files changed, 40 insertions(+), 44 deletions(-) delete mode 100644 dev-util/btyacc/btyacc-3.0-r3.ebuild create mode 100644 dev-util/btyacc/btyacc-3.0-r4.ebuild (limited to 'dev-util/btyacc') diff --git a/dev-util/btyacc/btyacc-3.0-r3.ebuild b/dev-util/btyacc/btyacc-3.0-r3.ebuild deleted file mode 100644 index 8949c4f6fe14..000000000000 --- a/dev-util/btyacc/btyacc-3.0-r3.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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" - -LICENSE="public-domain" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~ppc-macos" - -S="${WORKDIR}" - -PATCHES=( - "${FILESDIR}/${P}-includes.patch" - "${FILESDIR}/${P}-makefile.patch" -) - -src_prepare() { - cp -av Makefile{,.orig} || die - default - # fix memory issue/glibc corruption - sed -i -e "s|len + 13|len + 14|" main.c || die "Could not fix main.c" - # Darwin doesn't do static binaries - if [[ ${CHOST} == *-darwin* ]]; then - sed -i -e 's/-static//' Makefile || die - fi -} - -src_compile() { - emake CC=$(tc-getCC) -} - -src_install() { - dobin btyacc - dodoc README README.BYACC - newman manpage btyacc.1 -} diff --git a/dev-util/btyacc/btyacc-3.0-r4.ebuild b/dev-util/btyacc/btyacc-3.0-r4.ebuild new file mode 100644 index 000000000000..750243f22758 --- /dev/null +++ b/dev-util/btyacc/btyacc-3.0-r4.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~ppc-macos" + +S="${WORKDIR}" + +PATCHES=( + "${FILESDIR}/${P}-includes.patch" + "${FILESDIR}/${P}-makefile.patch" +) + +src_prepare() { + cp -av Makefile{,.orig} || die + default + # fix memory issue/glibc corruption + sed -i -e "s|len + 13|len + 14|" main.c || die "Could not fix main.c" +} + +src_compile() { + emake CC=$(tc-getCC) +} + +src_install() { + dobin btyacc + dodoc README README.BYACC + newman manpage btyacc.1 +} diff --git a/dev-util/btyacc/files/btyacc-3.0-makefile.patch b/dev-util/btyacc/files/btyacc-3.0-makefile.patch index 60187256d1a0..d55ff4317652 100644 --- a/dev-util/btyacc/files/btyacc-3.0-makefile.patch +++ b/dev-util/btyacc/files/btyacc-3.0-makefile.patch @@ -10,7 +10,7 @@ Respect CC, append to CFLAGS (but not -g), append to LDFLAGS, use system LD -jer +CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes -LDFLAGS = -static -+LDFLAGS += -static ++LDFLAGS += LIBS = -- cgit v1.2.3-65-gdbad