SUMMARY="Standard GNU documentation format tool"
DESCRIPTION="
Texinfo is the official documentation format of the GNU project."
HOMEPAGE="http://www.gnu.org/software/texinfo/"
COPYRIGHT="1992-2008 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="3"
SOURCE_URI="http://ftp.gnu.org/gnu/texinfo/texinfo-4.13a.tar.gz"
CHECKSUM_SHA256="1303e91a1c752b69a32666a407e9fbdd6e936def4b09bc7de30f416301530d68"
SOURCE_DIR="texinfo-4.13"
PATCHES="texinfo-4.13a.patch"

ARCHITECTURES="all"

PROVIDES="
	texinfo4 = $portVersion compat >= 4
	cmd:info_4.13 = $portVersion compat >= 4
	cmd:infokey_4.13 = $portVersion compat >= 4
	cmd:install_info_4.13 = $portVersion compat >= 4
	cmd:makeinfo_4.13 = $portVersion compat >= 4
	cmd:pdftexi2dvi_4.13 = $portVersion compat >= 4
	cmd:texi2dvi_4.13 = $portVersion compat >= 4
	cmd:texi2pdf_4.13 = $portVersion compat >= 4
	cmd:texindex_4.13 = $portVersion compat >= 4
	"
REQUIRES="
	haiku
	lib:libncurses
	"

BUILD_REQUIRES="
	devel:libncurses
	"
BUILD_PREREQUIRES="
	haiku_devel
	cmd:gcc
	cmd:grep
	cmd:ld
	cmd:libtoolize
	cmd:make
	cmd:sed
	"

BUILD()
{
	libtoolize --copy --install
	runConfigure ./configure --program-suffix=-4.13
	make $jobArgs
}

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