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="http://www.msweet.org/projects.php?Z1"
LICENSE="GNU GPL v2"
COPYRIGHT="1997-2006 Easy Software Products"
SRC_URI="http://www.msweet.org/files/project1/htmldoc-1.8.27-source.tar.bz2"
CHECKSUM_MD5="35589e7b8fe9c54e11be87cd5aec4dcc"
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64"

PATCHES="htmldoc-1.8.27.patchset"

PROVIDES="
	htmldoc = $portVersion compat >= 1.8
	cmd:htmldoc = $portVersion compat >= 1.8
	"

REQUIRES="
	haiku >= $haikuVersion
	lib:libjpeg
	lib:libpng
	lib:libz
	"
BUILD_REQUIRES="
	devel:libjpeg
	devel:libpng
	devel:libz
	"
BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:autoconf
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:sed
	"


BUILD()
{
	autoconf
	chmod 755 configure
    runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	# move html documentation out of man-dir
	mkdir -p $docDir
	mv $manDir/doc/htmldoc/* $docDir/
	rm -r $manDir/doc
}
