# $Id: Portfile,v 1.19 2006/01/26 21:00:24 blb Exp $

PortSystem 1.0
name		links
version		2.1pre20
description	Lynx-like WWW browser that supports tables, menus, etc

long_description \
		Lynx-like WWW browser with text and graphics modes with many \
		features like displaying tables, menus, etc.

platforms	darwin freebsd sunos
categories	www
homepage	http://links.twibright.com/
master_sites	http://links.twibright.com/download/ \
				ftp://atrey.karlin.mff.cuni.cz/pub/local/clock/links/
checksums	md5 5bdee0eb06cf3fb1cf2b6cd73def47bf
maintainers	landonf@opendarwin.org blb@opendarwin.org
use_bzip2	yes

configure.args	--enable-javascript --without-ssl --without-svgalib \
				--mandir=${prefix}/share/man
configure.env	CPPFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib"

patchfiles	patch-html_tbl.c

post-patch {
	reinplace s|/etc/|${prefix}/etc/| ${workpath}/${worksrcdir}/default.c
}

variant darwin {
	configure.env	CPPFLAGS="-I${prefix}/include -no-cpp-precomp" \
					LDFLAGS="-L${prefix}/lib"
}

variant ssl {
	depends_lib-append		lib:libssl:openssl
	configure.args-delete	--without-ssl
	configure.args-append	--with-ssl
}

variant x11 {
	depends_lib-append		lib:libpng.3:libpng lib:libjpeg.62:jpeg \
							lib:libX11:XFree86
	configure.args-append	--enable-graphics --with-x
}

