# -*- 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.4.0
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  0c27930544b3d4dc728c6572af663f695ba0ed93 \
                    sha256  6863540b173804e5b99cb2c1b14e600170ce9af0b462fcad41584c316d19a310 \
                    size    1990779

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
