SUMMARY="Fast, high-capacity, identifier database tool."
DESCRIPTION="
An 'ID database' is a binary file containing a list of file names, a list of \
tokens, and a sparse matrix indicating which tokens appear in which files.
With this database and some tools to query it, many text-searching tasks \
become simpler and faster. For example, you can list all files that reference \
a particular #include' file throughout a huge source hierarchy, search for all \
the memos containing references to a project, or automatically invoke an \
editor on all files containing references to some function or variable. Anyone \
with a large software project to maintain, or a large set of text files to \
organize, can benefit from the ID utilities.
"
HOMEPAGE="http://www.gnu.org/software/idutils/" 
SRC_URI="http://ftp.gnu.org/gnu/idutils/idutils-4.6.tar.xz"
CHECKSUM_MD5="99b572536377fcddb4d38e86a3c215fd"
REVISION="2"
LICENSE="GNU GPL v2"
COPYRIGHT="1986-2012 Free Software Foundation, Inc."
ARCHITECTURES="x86 x86_gcc2"

PATCHES="idutils-4.6.patchset"

PROVIDES="
	idutils = $portVersion compat >= 4
	cmd:aid = $portVersion compat >= 4
	cmd:defid = $portVersion compat >= 4
	cmd:eid = $portVersion compat >= 4
	cmd:fid = $portVersion compat >= 4
	cmd:fnid = $portVersion compat >= 4
	cmd:gid = $portVersion compat >= 4
	cmd:lid = $portVersion compat >= 4
	cmd:mkid = $portVersion compat >= 4
	cmd:xtokid = $portVersion compat >= 4
	"

REQUIRES="
	haiku >= $haikuVersion
	"

BUILD_REQUIRES="
	"

BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:gcc
	cmd:make
	cmd:ld
	cmd:libtool
	cmd:gawk
	cmd:grep
	cmd:perl
	"

BUILD()
{
	libtoolize --force --copy --install
	runConfigure ./configure
	make
}

INSTALL()
{
	make install
	rm $libDir/charset.alias
}
