# -*- 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            pmodels yaksa 0.4 v
revision                0

categories              science devel parallel
license                 OSL
maintainers             {@barracuda156 macos-powerpc.org:barracuda} openmaintainer

description             Yaksa is a high-performance noncontiguous datatype engine \
                        that can be used to express and manipulate noncontiguous data
long_description        {*}${description}

checksums               rmd160  bbde11201d03544ea1a1dcf7719a50cc668e3145 \
                        sha256  380d5780c73b4d9623ed558daebf77f2497931783ed7403bab08682d6f25da86 \
                        size    215943
github.tarball_from     archive

set py_ver              3.13
set py_ver_nodot        [string map {. {}} ${py_ver}]

compiler.c_standard     2011

use_autoreconf          yes
autoreconf.cmd          ./autogen.sh
autoreconf.args

depends_build-append    port:autoconf \
                        port:automake \
                        port:libtool \
                        port:python${py_ver_nodot}

# Python only needed for scripts
depends_skip_archcheck-append \
                        python${py_ver_nodot}

configure.python        ${prefix}/bin/python${py_ver}

post-patch {
    foreach scriptpath { maint src/backend test } {
        fs-traverse f ${worksrcpath}/${scriptpath} {
            if {[string match *.py ${f}]} {
                reinplace "s|/usr/bin/env python3|${configure.python}|" ${f}
            }
        }
    }
}

build.args V=1
