# -*- 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        yrutschle conf2struct 1.5 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1
categories          devel
maintainers         {amake @amake} openmaintainer
license             BSD

description         Create C parsers for libconfig and command-line, which get \
                    read directly to a `struct`
long_description    {*}${description}

checksums           rmd160  ae34c1bf635920600b3334ba4933a009b9d3db1f \
                    sha256  bb3e3bff53d385e4806c4056d0365a7d0f4014056c2910168b447369134ee41f \
                    size    62316

perl5.major         5.34

depends_lib         port:libconfig-hr \
                    port:p${perl5.major}-conf-libconfig

use_configure       no

build.args          CC="${configure.cc} [get_canonical_archflags cc]"
destroot.args-append \
                    prefix=${prefix}

post-patch {
    reinplace "s|#! */usr/bin/perl|#!${perl5.bin}|g" \
        ${worksrcpath}/conf2struct
}
