# -*- 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.6.0 v
revision            1
checksums           rmd160  41ce17beb2e5fee78a55ebc71bd4477e8d9b8430 \
                    sha256  6ec2eab86ed3ce661c0d9b834027870651546138b7b4470fa8ef5533498c79aa \
                    size    170186
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

# commits adding support for mlx 0.31.2
patchfiles-append   patch-mlx-api-update.diff
patch.args          -p1
 
configure.args-append \
                    -DMLX_C_USE_SYSTEM_MLX=On \
                    -DBUILD_SHARED_LIBS=On \
                    -DFETCHCONTENT_FULLY_DISCONNECTED=On
