# $Id: Portfile 53194 2009-07-01 02:05:42Z toby@macports.org $

PortSystem 1.0

name             c-ares
version          1.6.0
categories       net
maintainers      toby
description      asynchronous DNS library
long_description \
    c-ares is a C library that performs DNS requests and \
    name resolves asynchronously. c-ares is a fork of the \
    library named 'ares', written by Greg Hudson at MIT.
homepage         http://c-ares.haxx.se/
platforms        darwin
master_sites     ${homepage}
checksums        md5    4503b0db3dd79d3c1f58d87722dbab46 \
                 sha1   50b0f5955769117720c8ff2bde6a8a8ece65d7a3 \
                 rmd160 3eccaad5df124525c70c47a76cc3fc2cbd31bbe8
configure.args   --mandir=${prefix}/share/man \
                 --enable-shared

post-configure {
    system "ed - ${worksrcpath}/config.h < ${filespath}/config.h.ed"
}

livecheck.check  regex
livecheck.regex  href=\"c-ares-(\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)\\.tar\\.gz\"
