summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/btyacc')
-rw-r--r--dev-util/btyacc/Manifest1
-rw-r--r--dev-util/btyacc/btyacc-3.0-r2.ebuild40
-rw-r--r--dev-util/btyacc/files/btyacc-3.0-includes.patch10
-rw-r--r--dev-util/btyacc/files/btyacc-3.0-makefile.patch22
-rw-r--r--dev-util/btyacc/metadata.xml15
5 files changed, 88 insertions, 0 deletions
diff --git a/dev-util/btyacc/Manifest b/dev-util/btyacc/Manifest
new file mode 100644
index 00000000000..9ed94ff7536
--- /dev/null
+++ b/dev-util/btyacc/Manifest
@@ -0,0 +1 @@
+DIST btyacc-3-0.tar.gz 74770 SHA256 501be7eb21623b4bbf47f6c33f74b6dab52374939c0f155b364b1efa641b020a SHA512 55312e3de7cc783e1386ea98c97464d8d40bb496ce2ce36c84cc559e4c6982fbac730e76b8d44c4a44565f545ac50fb75f802bd8a1b4c926b1fc1af1a0058ef4 WHIRLPOOL 00cae37aa941271e935bdd140c34b2f6f107477ebc44ce9459b5fabd33bb74d2218415c5cd1c62629672515c61bde368630372950dde19ed01d32df60cdfda3a
diff --git a/dev-util/btyacc/btyacc-3.0-r2.ebuild b/dev-util/btyacc/btyacc-3.0-r2.ebuild
new file mode 100644
index 00000000000..43a7317cfd0
--- /dev/null
+++ b/dev-util/btyacc/btyacc-3.0-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+MY_P=${P/./-}
+IUSE=""
+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}"
+
+src_prepare() {
+ cp -av Makefile{,.orig}
+ epatch "${FILESDIR}/${P}-includes.patch"
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ # 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
+ [[ ${CHOST} == *-darwin* ]] && sed -i -e 's/-static//' Makefile
+}
+
+src_compile() {
+ tc-export CC
+ emake || die
+}
+
+src_install() {
+ dobin btyacc
+ dodoc README README.BYACC
+ newman manpage btyacc.1
+}
diff --git a/dev-util/btyacc/files/btyacc-3.0-includes.patch b/dev-util/btyacc/files/btyacc-3.0-includes.patch
new file mode 100644
index 00000000000..a03f58fa386
--- /dev/null
+++ b/dev-util/btyacc/files/btyacc-3.0-includes.patch
@@ -0,0 +1,10 @@
+--- mstring.c
++++ mstring.c
+@@ -1,6 +1,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <string.h>
+ #include <ctype.h>
+ #include "mstring.h"
+
diff --git a/dev-util/btyacc/files/btyacc-3.0-makefile.patch b/dev-util/btyacc/files/btyacc-3.0-makefile.patch
new file mode 100644
index 00000000000..884b49f46b9
--- /dev/null
+++ b/dev-util/btyacc/files/btyacc-3.0-makefile.patch
@@ -0,0 +1,22 @@
+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
+@@ -8,14 +8,13 @@
+
+ HDRS = defs.h mstring.h
+
+-CFLAGS = -g -Wall -Wstrict-prototypes -Wmissing-prototypes
++CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
+
+-LDFLAGS = -static
++LDFLAGS += -static
+
+ LIBS =
+
+-CC = gcc
+-LINKER = gcc
++LINKER = $(CC)
+ # LINKER = cl
+ # CC = cl
+
diff --git a/dev-util/btyacc/metadata.xml b/dev-util/btyacc/metadata.xml
new file mode 100644
index 00000000000..432f6bd7e83
--- /dev/null
+++ b/dev-util/btyacc/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+<email>patrick@gentoo.org</email>
+<name>Patrick Lauer</name>
+<description>Proxy maintainer. CC him on bugs</description>
+</maintainer>
+<maintainer>
+<email>wlt@obsidian-studios.com</email>
+<name>William L. Thomson Jr.</name>
+<description>Maintainer. Assign bugs to him</description>
+</maintainer>
+</pkgmetadata>