SUMMARY="Highly configurable text format for writing documentation" 
DESCRIPTION="
AsciiDoc is a text document format for writing notes, documentation, articles, \
books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can \
be translated to many formats including HTML, PDF, EPUB, man page.
AsciiDoc is highly configurable: both the AsciiDoc source file syntax and the \
backend output markups (which can be almost any type of SGML/XML markup) can \
be customized and extended by the user.
"
HOMEPAGE="http://asciidoc.org" 
LICENSE="GNU GPL v2"
COPYRIGHT="2002-2011 Stuart Rackham"
SRC_URI="http://sourceforge.net/projects/asciidoc/files/asciidoc/8.6.8/asciidoc-8.6.8.tar.gz"
CHECKSUM_SHA256="ffb67f59dccaf6f15db72fcd04fdf21a2f9b703d31f94fcd0c49a424a9fcfbc4"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86"

PROVIDES="
	asciidoc = $portVersion compat >= 8.6.8
	cmd:a2x = $portVersion compat >= 8
	cmd:asciidoc = $portVersion compat >= 8
	"

REQUIRES="
	haiku >= $haikuVersion
	"
BUILD_REQUIRES="
	"
BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:sed
	"


PATCH()
{
	sed -i -e 's|/usr/bin/env|/bin/env|' *.py
}

BUILD()
{
	# TODO: separate data and configuration files.
	runConfigure ./configure \
		--sysconfdir=$dataDir/asciidoc
	make
}

INSTALL()
{
	make install
}
