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

github.setup        ashvardanian NumKong 7.3.0 v
github.tarball_from archive
name                numkong
revision            0

homepage            https://ashvardanian.com/posts/numkong

description         \
    SIMD-accelerated numerical kernels for distances, dot products, and matrix ops

long_description    \
    NumKong is a C/C++ library providing SIMD-accelerated implementations of \
    distances, dot products, matrix operations, and geospatial and geometric \
    kernels for 16 numeric types, from 6-bit floats to 64-bit complex numbers, \
    across x86, Arm, RISC-V, and WASM using AVX-512, NEON, SVE, and other \
    intrinsics.

categories          devel math
license             Apache-2
maintainers         nomaintainer

# AVX-512 and other intrinsics require Apple Clang 11+ (Xcode 11);
# on older macOS, MacPorts will fall back to macports-clang.
compiler.blacklist-append {clang < 1100}

checksums           rmd160  5827a3820ff105a82f82e95f86b878934e829898 \
                    sha256  3e99b4741c2f8f9c4b8fffdaa69ea03c8e3d3fc8b1abdb4d01a329b6715ea84a \
                    size    1641429

configure.args-append \
                    -DNK_BUILD_SHARED=ON \
                    -DNK_BUILD_TEST=OFF \
                    -DNK_BUILD_BENCH=OFF \
                    -DNK_COMPARE_TO_BLAS=OFF \
                    -DNK_COMPARE_TO_MKL=OFF

post-destroot {
    file delete ${destroot}${prefix}/include/README.md \
                ${destroot}${prefix}/include/module.modulemap
}
