SUMMARY="A text mode interface for git"
DESCRIPTION="
Tig functions mainly as a git repository browser. It can also help in the \
staging changes for commit at chunk level and act as a pager for output \
different git commands."
HOMEPAGE="http://jonas.nitro.dk/tig/" 
SOURCE_URI="http://jonas.nitro.dk/tig/releases/tig-2.1.tar.gz"
CHECKSUM_SHA256="306287f684f57563a53abf1cf46149e0d30c6b500fbc0c39e9bc059506373cb0"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2006-2014 Jonas Fonseca"

ARCHITECTURES="x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	tig$secondaryArchSuffix = $portVersion
	cmd:tig$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libiconv$secondaryArchSuffix
	lib:libncurses$secondaryArchSuffix
	lib:libreadline$secondaryArchSuffix
	cmd:git
	"
BUILD_REQUIRES="
	devel:libiconv$secondaryArchSuffix
	devel:libncurses$secondaryArchSuffix
	devel:libreadline$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:asciidoc
	cmd:autoconf
	cmd:git
	cmd:libtoolize
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	"

GLOBAL_WRITABLE_FILES="settings/tigrc keep-old"

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

INSTALL()
{
	make install
}
