# $Id: Portfile,v 1.50 2006/06/14 06:19:36 mww Exp $

PortSystem 1.0
name		curl
version		7.15.4
categories	net www
maintainers	yeled@opendarwin.org
description	Tool for transferring files with URL syntax
long_description	\
	curl is a client to get documents/files from servers, using any of \
	the supported protocols. The command is designed to work without \
	user interaction or any kind of interactivity.
homepage	http://curl.haxx.se/
platforms	darwin freebsd
master_sites	http://curl.haxx.se/download/ \
		http://curl.sourceforge.net/download/ \
		http://cool.haxx.se/curl/ \
		ftp://ftp.fu-berlin.de/pub/unix/network/curl/ \
		ftp://ftp.rge.com/pub/networking/curl/
checksums	sha1 74d3ce2060754a2ccc7a7775712e22720f74a662
use_bzip2	yes

patchfiles	patch-configure

configure.args	--disable-ipv6 \
		--without-libidn \
		--mandir=${prefix}/share/man \
		--with-zlib=${prefix} \
		--with-ssl=${prefix}

depends_lib	port:zlib port:openssl

test.run	yes
test.target	test-full

platform darwin 6 {
	depends_lib-append	lib:libdl:dlcompat
}

platform darwin 8 {
	configure.env	CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

variant ipv6 {
	configure.args-delete --disable-ipv6
	configure.args-append --enable-ipv6
}

variant ares conflicts ipv6 {
	# adds support for resolving names asynchronously
	depends_lib-append    lib:libcares:c-ares
	configure.args-append --enable-ares=${prefix}
}

variant idn {
	# adds support for internationalized domain names
	depends_lib-append    port:libidn
	configure.args-delete --without-libidn
}

variant spnego {
	# enables SPNEGO authentication support
	depends_lib-append    port:fbopenssl
	configure.args-append --with-spnego=${prefix}
}
