# -*- 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        ml-explore mlx-c 0.8.0 v
revision            0
checksums           rmd160  1f362395fa88ba583910f3ef03bd06f704de1e99 \
                    sha256  ea6251d37968ec3a7975982d2eb38b008ee2a6bfa75bee1132cae178a39765e2 \
                    size    179941
github.tarball_from archive

categories          llm devel
maintainers         {@neverpanic cal} openmaintainer
supported_archs     arm64

license             MIT
description         MLX C is a C API for MLX, which is an array framework for \
                    machine learning on Apple silicon, brought to you by Apple \
                    machine learning research.
long_description    ${description}

use_xcode           yes
compiler.cxx_standard \
                    2020

depends_lib-append  port:mlx

patchfiles-append   0001-mlx-c-sdpa-window-size.patch
patch.args          -p1
 
configure.args-append \
                    -DMLX_C_USE_SYSTEM_MLX=On \
                    -DBUILD_SHARED_LIBS=On \
                    -DFETCHCONTENT_FULLY_DISCONNECTED=On
