SUMMARY="A pattern scanning and processing language"
DESCRIPTION="
If you are like many computer users, you would frequently like to make \
changes in various text files wherever certain patterns appear, or \
extract data from parts of certain lines while discarding the rest. To \
write a program to do this in a language such as C or Pascal is a \
time-consuming inconvenience that may take many lines of code. The job \
is easy with awk.

The awk utility interprets a special-purpose programming language that \
makes it possible to handle simple data-reformatting jobs with just a \
few lines of code.
"
HOMEPAGE="http://invisible-island.net/mawk"
SOURCE_URI="http://invisible-island.net/datafiles/release/mawk.tar.gz"
CHECKSUM_SHA256="efa092ec3ea5dfd54571e8ba3b0327073f1fa51b8efa0953c2cadd87a87389c8"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2009-2014 Thomas E. Dickey"
ARCHITECTURES="x86_gcc2 x86 x86_64 arm ppc"

SOURCE_DIR="mawk-1.3.4-20141206"

PROVIDES="
	mawk = $portVersion compat >= 1
	cmd:awk = $portVersion compat >= 1
	cmd:mawk = $portVersion compat >= 1
	"
REQUIRES="
	haiku
	"
BUILD_REQUIRES="
	"
BUILD_PREREQUIRES="
	haiku_devel
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc
	cmd:ld
	cmd:libtoolize
	cmd:make
	cmd:makeinfo
	cmd:sed
	"

BUILD()
{
	./configure --prefix=$prefix --mandir=$manDir
	make $jobArgs
}

INSTALL()
{
	make install
	ln -s $binDir/mawk $binDir/awk
}

TEST()
{
	make check
}
