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

github.setup        pbiering ipv6calc 4.3.2
github.tarball_from archive
revision            0
categories          net
license             GPL-2
maintainers         nomaintainer

description         A small utility to manipulate (not only) IPv6 addresses.
long_description    ipv6calc is a small utility written in programming languate C \
                    to manipulate (not only) IPv6 addresses. Intentions were \
                    convering a given IPv6 address into compressed format, \
                    convering a given IPv6 address into the same format like shown \
                    in /proc/net/if_inet6 and (because it was not difficulty) \
                    migrating the Perl program ip6_int into. Now only one utiltity \
                    is needed to do a lot.

homepage            https://www.deepspace6.net/projects/ipv6calc.html
master_sites-append ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/

checksums           rmd160  4f420ea1e94e82b9d148a7bc2f8fa25dfb907d43 \
                    sha256  4335c4edf7d51dbd0cafdd42ecda5598101f7a8ab257a74be2d9ec81f5bf895b \
                    size    1971792

post-patch {
    fs-traverse f ${worksrcpath}/tools {
        if {[string match "*.pl" $f]} {
            reinplace "s|/usr/bin/perl|${perl5.bin}|g" $f
        } elseif {[string match "*.sh" $f] || [string match "*.sh.in" $f]} {
            reinplace -q "s|perl|${perl5.bin}|g" $f
            reinplace -q "s|/usr|${prefix}|g" $f
        }
    }
}

perl5.branches      5.34
depends_run-append  port:perl${perl5.major}

configure.args-append \
                    --disable-compiler-warning-to-error \
                    --enable-bundled-md5
