# $Id: Portfile 52936 2009-06-25 23:15:16Z toby@macports.org $

PortSystem      1.0

name            libtorrent
set real_name   libtorrent
version         0.12.4
categories      net
platforms       darwin
maintainers     gmail.com:gardnermj
description     BitTorrent library

long_description \
    libTorrent is a BitTorrent library written in C++ for \
    *nix. It is designed to avoid redundant copying and \
    storing of data that other clients and libraries suffer from.

homepage        http://libtorrent.rakshasa.no/
master_sites    ${homepage}downloads/
distname        ${real_name}-${version}

checksums       md5 7e4b4c29a69c86c38e3e60ec11fc2255 \
                sha1 6deab3f6af5e9566c987131d586751c7dc3b5dbb \
                rmd160 23fd8a242f493171f7e2afa714dc7b74359ff7bc

depends_build   port:zlib \
                port:pkgconfig

depends_lib     port:openssl \
                port:libsigcxx2

patchfiles      patch-src__torrent__poll_kqueue.cc

configure.args  --disable-debug \
                --enable-ipv6 \
                --with-kqueue

post-destroot {
    set docdir ${prefix}/share/doc/${real_name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
        ${destroot}${docdir}
}

livecheck.check regex
livecheck.url   ${homepage}
livecheck.regex ${real_name}-(\\d+(?:\\.\\d+)*)
