Portfile

# $Id: Portfile 22854 2007-03-16 20:23:50Z pipping@macports.org $

PortSystem 1.0
name curl
version 7.16.1
categories net www
maintainers yeled@macports.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/ \
ftp://ftp.sunet.se/pub/www/utilities/curl/ \
http://curl.sourceforge.net/download/ \
http://cool.haxx.se/curl/ \
ftp://gd.tuwien.ac.at/utils/archivers/curl/ \
http://gd.tuwien.ac.at/utils/archivers/curl/ \
http://www.execve.net/curl/
checksums md5 acdab0b0467c55e10ed02d2afed80575 \
sha1 645f87f63d29f71dced74869450d52f84a75c2b6 \
rmd160 8251efba8f4bde512b7cf68ad0acb5efb4302d9b
use_bzip2 yes

patchfiles patch-configure

configure.args --disable-ipv6 \
--without-libidn \
--without-libssh2 \
--mandir=${prefix}/share/man
configure.env PKG_CONFIG_PATH=${prefix}

depends_build port:pkgconfig
depends_lib port:openssl \
port:zlib

test.run yes
test.target test-full

# fix the output of 'curl-config --libs' for universal builds
post-destroot {
if {[variant_isset universal]} {
reinplace "s|-arch i386 -arch ppc ||g" \
${destroot}${prefix}/bin/curl-config
}
}

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

platform darwin 8 {
configure.env-append 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}
}

files