SUMMARY="A source code tagging system."
DESCRIPTION="
GNU GLOBAL is a source code tagging system that works the same way across \
diverse environments (emacs, vi, less, bash, web browser, etc). You can locate \
symbols in source files and move there easily. It is useful for hacking a \
large project containing many sub-directories, many #ifdef and many main() \
functions. It is similar to ctags or etags but is different from them at the \
point of independence of any editor. It runs on a UNIX(POSIX) compatible \
operating system like GNU and BSD.
"
HOMEPAGE="http://www.gnu.org/software/global/" 
SRC_URI="http://ftp.gnu.org/pub/gnu/global/global-6.2.9.tar.gz"
CHECKSUM_SHA256="d8d831cbd9bac9f51598af316231290cc328e4f18dc29b58a2f2ae0fee44c303"
REVISION="2"
LICENSE="GNU GPL v3"
COPYRIGHT="2000-2013 Tama Communications Corporation
		2007-2013 Free Software Foundation, Inc."

ARCHITECTURES="x86 x86_gcc2"

PATCHES="global-6.2.9.patch"

PROVIDES="
	global = $portVersion compat >= 6.2
	cmd:global = $portVersion compat >= 6.2
	cmd:gtags = $portVersion compat >= 6.2
	cmd:globash = $portVersion compat >= 6.2
	cmd:gozilla = $portVersion compat >= 6.2
	cmd:gtags_cscope = $portVersion compat >= 6.2
	cmd:htags = $portVersion compat >= 6.2
	"

REQUIRES="
	haiku >= $haikuVersion
	ncurses
	cmd:ctags
	cmd:sort
	lib:libltdl
	"

BUILD_REQUIRES="
	devel:libncurses
	"

BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:autoreconf
	cmd:aclocal
	cmd:autoconf
	cmd:libtool
	cmd:gcc
	cmd:make
	cmd:ld
	cmd:find
	cmd:sed
	cmd:grep
	cmd:perl
	cmd:ctags
	cmd:sort
	"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure \
	--with-ncurses \
	--with-exuberant-ctags=${portPackageLinksDir}/cmd~ctags/bin/ctags \
	--with-posix-sort=${portPackageLinksDir}/cmd~sort/bin/sort
	make
}

INSTALL()
{
	make install
}
