# -*- 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

github.setup        cjdelisle cjdns 21.1 cjdns-v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1
categories          net
maintainers         {l2dy @l2dy} openmaintainer
license             GPL-3

description         Cjdns implements an encrypted IPv6 network.

long_description    Cjdns implements an encrypted IPv6 network using public-key \
                    cryptography for address allocation and a distributed hash table \
                    for routing. This provides near-zero-configuration networking, and \
                    prevents many of the security and scalability issues that plague existing networks.

checksums           rmd160  c95ba7cde03d91826b9433ad26c8df563e527718 \
                    sha256  c34c6715c9e9a0ef590149e80f5860283b8403e85a89ef2809ddd00dc4a735ef \
                    size    4136902

patchfiles          patch-make.js.diff

depends_build       bin:node:nodejs14

use_configure       no
use_xcode           yes

build.cmd           "./do"
build.target
build.env-append    CC=${configure.cc}

destroot {
        xinstall -m 755 -d ${destroot}${prefix}/bin
        xinstall -m 755 -s ${worksrcpath}/cjdroute ${destroot}${prefix}/bin
}
