# -*- 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
PortGroup           boost   1.0

github.setup        WasmEdge WasmEdge 0.14.1
name                wasmedge
github.tarball_from archive
revision            0

homepage            https://wasmedge.org

description         \
    WasmEdge is a lightweight, high-performance, and extensible WebAssembly \
    runtime.

long_description    \
    {*}${description} It is the fastest Wasm VM today. WasmEdge is an \
    official sandbox project hosted by the CNCF. Its use cases include \
    modern web application architectures (Isomorphic & Jamstack \
    applications), microservices on the edge cloud, serverless SaaS APIs, \
    embedded functions, smart contracts, and smart devices.

categories          devel
license             Apache-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  e16a195ada70f25b51e9fe3fdcca35d0772d69ac \
                    sha256  ff95d3b9d4736f36e31c0477208cc70f12a0a3f946bbf756f1e7b181877d5af3 \
                    size    3398971

set llvm_version    16
set llvm_root_dir   ${prefix}/libexec/llvm-${llvm_version}
set llvm_lib_dir    ${llvm_root_dir}/lib

depends_build-append \
    port:clang-${llvm_version} \
    port:libffi \
    port:libxml2 \
    port:llvm-${llvm_version} \
    port:zlib \
    port:zstd

configure.env-append \
    LLVM_DIR=${llvm_root_dir}

post-destroot {
    system "install_name_tool -change \"@rpath/libLLVM.dylib\" ${llvm_lib_dir}/libLLVM.dylib ${destroot}${prefix}/lib/lib${name}.dylib"
}

github.livecheck.regex \
                    {([0-9.]+)}
