# $Id: Portfile 75159 2011-01-17 02:00:53Z rmstonecipher@macports.org $

PortSystem 1.0
name		htmldoc
version		1.8.27
revision        3
categories	textproc
maintainers	nomaintainer
description	Converts HTML files to PDF or PostScript
homepage	http://www.htmldoc.org/
platforms	darwin

long_description htmldoc can convert HTML files to PDF or PostScript, \
		 generate a table-of-contents for books, and generate \
		 indexed HTML files.  It also generates files on-the-fly \
		 for web applications or for batch jobs.

master_sites	ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/htmldoc/${version}/ \
		http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/htmldoc/${version}/ \
		ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/htmldoc/${version}/ \
		ftp://ftp3.easysw.com/pub/htmldoc/${version}/ \
		ftp://ftp.easysw.com/pub/htmldoc/${version}/

checksums	md5 35589e7b8fe9c54e11be87cd5aec4dcc \
		sha1 472908e0aafed1cedfbacd8ed3168734aebdec4b \
		rmd160 9605a5894675439f5fae405fb060972e19f33c7e

distname	${name}-${version}-source
worksrcdir	${name}-${version}
use_bzip2	yes

depends_lib	port:jpeg port:libpng port:zlib

configure.cxxflags -I${prefix}/include

configure.args	--without-gui --disable-localjpeg --disable-localpng \
		--disable-localzlib --disable-ssl

destroot.destdir prefix=${destroot}${prefix} exec_prefix=${destroot}${prefix} \
		 bindir=${destroot}${prefix}/bin mandir=${destroot}${prefix}/share/man

variant ssl conflicts gnutls cdsassl {
	depends_lib-append	port:openssl
	configure.args-delete	--disable-ssl
	configure.args-append	--enable-openssl --disable-gnutls --disable-cdsassl
}

variant gnutls conflicts ssl cdsassl {
	depends_lib-append	port:gnutls
	configure.args-delete	--disable-ssl
	configure.args-append	--disable-openssl --enable-gnutls --disable-cdsassl
}

variant cdsassl conflicts ssl gnutls {
	configure.args-delete	--disable-ssl
	configure.args-append	--disable-openssl --disable-gnutls --enable-cdsassl
}
