# -*- 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.0 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  e0f82b2d6d526dc499893ce3ff7991d207f9031c \
                        sha256  ba7dd75a0c00a824343b7ecebc5617ee2dd325505eeb137e0b6285930f694a2f \
                        size    1854915

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             {}
