# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic toolchain-funcs DESCRIPTION="A minimalists grep implementation" HOMEPAGE="http://robur.slu.se/jensl/ugrep/" SRC_URI="http://robur.slu.se/jensl/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="diet static" DEPEND="diet? ( dev-libs/dietlibc )" S=${WORKDIR}/${PN} src_unpack() { unpack ${A} cd "${S}" epatch ${FILESDIR}/${PN}-gcc-dietlibc-hardcode.patch } src_compile() { useq static && append-ldflags -static if useq diet; then CC="diet $(tc-getCC)" else CC="$(tc-getCC)" fi emake \ CC="${CC}" \ CFLAGS="${CFLAGS}" \ LDFLAGS="${LDFLAGS}" \ || die "emake failed" } src_install() { exeinto /bin doexe ugrep dosym ugrep /bin/uegrep }