--- a/sgrep-1.92a.ebuild 2008-01-11 16:05:49.000000000 -0600 +++ b/sgrep-1.92a.ebuild 2009-08-29 10:55:28.000000000 -0500 @@ -2,6 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-text/sgrep/sgrep-1.92a.ebuild,v 1.6 2008/01/11 21:41:14 grobian Exp $ +EAPI="2" + +inherit autotools + DESCRIPTION="Structured grep: tool for searching and indexing text, SGML,XML and HTML files and filtering text streams using structural criteria." SRC_URI="ftp://ftp.cs.helsinki.fi/pub/Software/Local/Sgrep/${P}.tar.gz" HOMEPAGE="http://www.cs.helsinki.fi/u/jjaakkol/sgrep.html" @@ -13,8 +17,17 @@ IUSE="" DEPEND="virtual/libc" SLOT="0" -src_compile() { +src_prepare() { + rm -f acconfig.h acinclude.m4 aclocal.m4 missing + sed -i -e 's/AC_DEFINE(\([A-Z_]\+\),\([01]\))/AC_DEFINE([\1],\2,[\1])/' configure.in + eautoreconf +} + +src_configure() { econf --datadir=/etc || die "econf failed" +} + +src_compile() { emake || die "emake failed" sed -e "s:/usr/lib:/etc:g" sgrep.1 > sgrep.1.new