# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

DESCRIPTION="a tool for producing data according to slightly extended context free grammars. You can think of it as a reverse grep, but with a more descriptive language."
HOMEPAGE="http://code.google.com/p/ouspg/wiki/Blab https://github.com/aoh/blab"
SRC_URI="http://ouspg.googlecode.com/files/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

CDEPENDS="dev-lisp/owl-lisp"
DEPENDS="${CDEPENDS}"

DOCS="README"

src_prepare() {
	sed -i -e 's|DESTDIR=|DESTDIR?=|g' Makefile || die 'sed failed'
	sed -i -e 's|CC=|CC?=|g' Makefile || die 'sed failed'
	sed -i -e 's|PREFIX=|PREFIX?=|g' Makefile || die 'sed failed'
	sed -i -e 's|CFLAGS=|CFLAGS?=|g' Makefile || die 'sed failed'
	sed -i -e 's|OFLAGS=|OFLAGS?=|g' Makefile || die 'sed failed'
	sed -i -e 's|$(CC) -O2 |$(CC) $(CFLAGS) |g' Makefile || die 'sed failed'
}