dev-util/btyacc: EAPI7 revbump, improve ebuild
authorMichael Mair-Keimberger <m.mairkeimberger@gmail.com>
Sat, 25 Aug 2018 08:26:06 +0000 (10:26 +0200)
committerAaron Bauman <bman@gentoo.org>
Wed, 27 Feb 2019 04:30:34 +0000 (23:30 -0500)
Closes: https://bugs.gentoo.org/664546
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/9692
Signed-off-by: Aaron Bauman <bman@gentoo.org>
dev-util/btyacc/btyacc-3.0-r3.ebuild [new file with mode: 0644]
dev-util/btyacc/files/btyacc-3.0-includes.patch
dev-util/btyacc/files/btyacc-3.0-makefile.patch

diff --git a/dev-util/btyacc/btyacc-3.0-r3.ebuild b/dev-util/btyacc/btyacc-3.0-r3.ebuild
new file mode 100644 (file)
index 0000000..2de9c25
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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="http://www.siber.com/btyacc"
+SRC_URI="http://www.siber.com/btyacc/${MY_P}.tar.gz"
+
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-linux ~ppc-macos ~x86-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
+}
index a03f58fa38656dd77d837a4874b17b2b7c7c69bf..e415574213eb151c0c58a567356e3ffaf6cbd8e8 100644 (file)
@@ -1,5 +1,5 @@
---- mstring.c
-+++ mstring.c
+--- a/mstring.c
++++ b/mstring.c
 @@ -1,6 +1,7 @@
  #include <stdlib.h>
  #include <stdio.h>
index 884b49f46b9dc1f566b83e26c7e679a086440308..60187256d1a0d08cdd3e2d36c52c4b34e76ee774 100644 (file)
@@ -1,7 +1,7 @@
 Respect CC, append to CFLAGS (but not -g), append to LDFLAGS, use system LD -jer
 
---- Makefile.orig      1999-07-15 19:40:12.000000000 +0200
-+++ Makefile   2009-09-04 15:27:15.000000000 +0200
+--- a/Makefile 1999-07-15 19:40:12.000000000 +0200
++++ b/Makefile 2009-09-04 15:27:15.000000000 +0200
 @@ -8,14 +8,13 @@
  
  HDRS        = defs.h mstring.h