# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           openssl 1.0

github.setup        rakshasa libtorrent 24f39d54d275a0507ad850e5572655a3d1f1af4a
version             20241204
revision            0

name                libtorrent-devel
conflicts           libtorrent
set real_name       libtorrent

categories          net
maintainers         nomaintainer
license             {GPL-2+ OpenSSLException}

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.

checksums           rmd160  84c8b15a7280d8271f2767a62077e2e4a8e3ab84 \
                    sha256  6723bd7aad4b61133925a964d8bb13647b6c24ee42556a2c9002358063e63228 \
                    size    387208
github.tarball_from archive

use_autoreconf      yes

# malformed object (unknown load command 2)
if {${os.platform} eq "darwin" && ${os.major} <= 10} {
    depends_build-append port:cctools
}

depends_lib-append  port:libsigcxx2

compiler.cxx_standard   2011

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

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