SUMMARY="HTML file processor and converter"
DESCRIPTION="HTMLDOC converts HTML files and web pages into index HTML, \
Adobe Postscript or Adobe Portable Document Format files (pdf)."
HOMEPAGE="https://www.msweet.org/htmldoc/index.html"
COPYRIGHT="1997-2006 Easy Software Products"
LICENSE="GNU GPL v2"
REVISION="3"
SOURCE_URI="https://github.com/michaelrsweet/htmldoc/releases/download/v$portVersion/htmldoc-$portVersion-source.tar.gz"
CHECKSUM_SHA256="cbee52b9e6f5485086db1b86d7ed0609925fef325a88cf96a6d11a5859117094"
SOURCE_DIR=""
PATCHES="htmldoc-$portVersion.patchset"

ARCHITECTURES="all"

PROVIDES="
	htmldoc = $portVersion compat >= 1.8
	cmd:htmldoc = $portVersion compat >= 1.8
	"
REQUIRES="
	haiku
	lib:libjpeg
	lib:libpng16
	lib:libz
	"

BUILD_REQUIRES="
	devel:libjpeg
	devel:libpng16
	devel:libz
	"
BUILD_PREREQUIRES="
	haiku_devel
	cmd:autoconf
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:sed
	"

BUILD()
{
	touch doc/htmldoc.1
	autoconf
	chmod 755 configure
    runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}
