# -*- 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               cmake 1.1
PortGroup               github 1.0
PortGroup               legacysupport 1.1

# clock_gettime
legacysupport.newest_darwin_requires_legacy 16

github.setup            atomvm atomvm 0.7.0-alpha.1 v
github.tarball_from     archive
revision                0
epoch                   1
categories              erlang devel
maintainers             {pguyot @pguyot} openmaintainer
license                 Apache-2

description             Tiny Erlang VM
long_description        AtomVM implements from scratch a minimal Erlang VM that \
                        supports a subset of ErlangVM features and that is able to \
                        run unmodified BEAM binaries on really small systems like \
                        MCUs.

checksums               rmd160  2cfb6d1e79e3221d61b7887648e7ec2eb5c30f1a \
                        sha256  5837670c9b88974a91043bd652e20f09c283e0925417440f105a66cb98d06a32 \
                        size    2044730

cmake.generator         Ninja

depends_build-append    port:erlang \
                        port:elixir \
                        port:gperf \
                        port:rebar3
depends_lib-append      port:mbedtls3

# CMake Error at src/platforms/generic_unix/CMakeLists.txt:25 (target_compile_features):
# target_compile_features The compiler feature "c_std_11" is not known to C compiler
compiler.c_standard     2011
# CMake Error at src/libAtomVM/CMakeLists.txt:155 (message):
# Platform doesn't support atomic pointers
compiler.blacklist-append {clang < 900}

test.run                yes
test.cmd                tests/test-erlang && \
                        tests/test-enif && \
                        tests/test-heap && \
                        tests/test-mailbox && \
                        tests/test-structs && \
                        src/AtomVM ./tests/libs/estdlib/test_estdlib.avm && \
                        src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm && \
                        src/AtomVM ./tests/libs/alisp/test_alisp.avm && \
                        src/AtomVM ./tests/libs/jit/test_jit.avm && \
                        src/AtomVM ./tests/libs/exavmlib/Tests.avm
test.target             {}
