SUMMARY="A suite of tools for compiling roff and man pages."
DESCRIPTION="
mdocml is a suite of tools compiling mdoc, the roff macro package of choice \
for BSD manual pages, and man, the predominant historical package for UNIX \
manuals. The mission of mdocml is to deprecate groff, the GNU troff \
implementation, for displaying mdoc pages whilst providing token support for \
man.
"

HOMEPAGE="http://mdocml.bsd.lv/"
SRC_URI="http://mdocml.bsd.lv/snapshots/mdocml-1.12.2.tar.gz"
CHECKSUM_MD5="aacd171e99d856d003f244f4a9d6c31b"
COPYRIGHT="2008-2013 Ingo Schwarze, Kristaps Dzonsons"
LICENSE="ISC"
REVISION="1"
ARCHITECTURES="x86 x86_gcc2"

PROVIDES="
	mdocml = $portVersion
	cmd:mandoc = $portVersion
	cmd:preconv = $portVersion
	cmd:demandoc = $portVersion
	"

REQUIRES="
	haiku >= $haikuVersion
	"

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

PROVIDES_devel="
	mdocml_devel = $portVersion compat >= 1.12
	devel:libmandoc
	"

REQUIRES_devel="
	mdocml == $portVersion
	"

PATCHES="mdocml-1.12.2.patch"

BUILD()
{
	make PREFIX=$prefix \
	BINDIR=$binDir \
	INCLUDEDIR=$includeDir/mandoc \
	LIBDIR=$libDir \
	MANDIR=$manDir \
	DBBIN=""
}

INSTALL()
{
	make PREFIX=$prefix \
	BINDIR=$binDir \
	INCLUDEDIR=$includeDir/mandoc \
	LIBDIR=$libDir \
	MANDIR=$manDir \
	DBBIN="" \
	install

	prepareInstalledDevelLib libmandoc
	packageEntries devel $developDir
}
