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

name                fxt
version             2026.11.07
categories          math science
license             GPL-3+
maintainers         {gmail.com:ppadilcdx @papadil} openmaintainer
description         Library of low-level algorithms
long_description    {*}${description}
homepage            https://www.jjj.de/fxt/
master_sites        ${homepage}
master_sites.mirror_subdir 

checksums           rmd160  97cb449ea1c609d37413b546f7166ae081d25486 \
                    sha256  2474b0767f5e0795257d3e94564168a21f308cab60aba6b73cd65ed3072fcf72 \
                    size    1575400
extract.rename      yes

use_configure       no

configure.compiler   macports-gcc-15

build.env   PREFIX=${prefix}

compiler.cxx_standard   2017

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

destroot.env-append PREFIX=${prefix}

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0755 {*}[glob ${worksrcpath}/doc/*.txt] ${destroot}${prefix}/share/doc/${name}
    copy ${worksrcpath}/demo ${destroot}${prefix}/share/doc/${name}
    copy ${worksrcpath}/src ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
