SUMMARY="An implementation of John Gruber's Markdown text to html language"
DESCRIPTION="Markdown provides a library that gives you formatting functions \
suitable for marking down entire documents or lines of text, a command-line \
program that you can use to mark down documents interactively or from a \
script, and a tiny (3 programs so far) suite of example programs that show \
how to fully utilize the markdown library."
HOMEPAGE="http://www.pell.portland.or.us/~orc/Code/discount/" 
SOURCE_URI="http://www.pell.portland.or.us/~orc/Code/discount/discount-2.1.3.tar.bz2"
CHECKSUM_SHA256="7280da7a27be42244311912eeee19695623f196817ec08f43b652fcc2ded975d"
REVISION="1"
LICENSE="BSD (4-clause)"
COPYRIGHT="2007-2012 David Loren Parsons"
ARCHITECTURES="x86 x86_gcc2"

PROVIDES="
	discount = $portVersion compat >= 2
	cmd:markdown = $portVersion compat >= 2
	cmd:makepage = $portVersion compat >= 2
	cmd:mkd2html = $portVersion compat >= 2
	cmd:theme = $portVersion compat >= 2
	"
REQUIRES="
	haiku
	"
BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc
	cmd:g++
	cmd:ld
	cmd:ar
	cmd:ranlib
	cmd:sed
	cmd:find
	"
PROVIDES_devel="
	discount_devel = $portVersion compat >= 2
	devel:libmarkdown
	"
REQUIRES_devel="
	discount == $portVersion
	"

BUILD()
{
	./configure.sh --prefix=$prefix \
	--execdir=$binDir \
	--sbindir=$sbinDir \
	--confdir=$settingsDir \
	--libdir=$libDir \
	--libexecdir=$libExecDir \
	--mandir=$manDir \
	--enable-all-features \
	--enable-shared
	make INCDIR=$includeDir
}

INSTALL()
{
	make install.everything INCDIR=$includeDir
	prepareInstalledDevelLibs libmarkdown
	packageEntries devel $developDir
}
