# $Id: Portfile 78732 2011-05-20 10:02:45Z ryandesign@macports.org $

PortSystem      1.0

name            libtorrent-devel
set real_name   libtorrent
version         0.12.8
categories      net
platforms       darwin
maintainers     gmail.com:gardnermj
description     BitTorrent library (unstable release)

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. \
    This is the "unstable" release of libTorrent.

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

checksums       sha1    23a53aa0772e7c1c15b19e193e52f91d4374e9ad \
                rmd160  62fa09144a75e06be84cae03f955a6abf9a517d3

depends_build   port:zlib \
                port:pkgconfig

depends_lib     port:openssl \
                port:libsigcxx2

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.type   regex
livecheck.url    [lindex ${master_sites} 0]
livecheck.regex  ${real_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
