SUMMARY="My TraceRoute, an Excellent network diagnostic tool"
DESCRIPTION="
mtr combines the functionality of the 'traceroute' and 'ping' programs in a \
single network diagnostic tool
As mtr starts, it investigates the network connection between the host mtr \
runs on and a user-specified destination host. After it determines the \
address of each network hop between the machines, it sends a sequence ICMP ECHO\
requests to each one to determine the quality of the link to each machine.\
As it does this, it prints running statistics about each machine.
"
HOMEPAGE="http://www.bitwizard.nl/mtr"
CHECKSUM_SHA256="30bdf752ac048dd160aa28d5caff1ffe0986dd4df046c397087fa1d8c8e1ab51"
LICENSE="GNU GPL v2"
COPYRIGHT="1997,1998  Matt Kimball, 1999 - 2008 R.E.Wolff@BitWizard.nl"

SOURCE_URI="ftp://ftp.bitwizard.nl/mtr/mtr-0.73.tar.gz"

REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PATCHES="mtr-0.73.patch"

PROVIDES="
	mtr$secondaryArchSuffix = $portVersion compat >= $portVersion
	cmd:mtr$secondaryArchSuffix = $portVersion compat >= $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libncurses$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku
	devel:libncurses$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:which
	"

BUILD()
{
	aclocal
	automake
	autoconf
	# ipv6 breaks dns support
	runConfigure configure --without-gtk --disable-ipv6
	make -i $jobArgs
}

INSTALL()
{
	make -i $jobArgs install
}
