From 1d1eedfd3ff2537e69e781dce7ec19b39f87f38e Mon Sep 17 00:00:00 2001 From: Al Hoang <13622+hoanga@users.noreply.github.com> Date: Sun, 13 Feb 2022 09:16:08 -0600 Subject: [PATCH] wasm3: new recipe (#6493) * add wasm3 port --- .../wasm3/patches/wasm3-0.5.0.patchset | 21 ++++++++ app-emulation/wasm3/wasm3-0.5.0.recipe | 50 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 app-emulation/wasm3/patches/wasm3-0.5.0.patchset create mode 100644 app-emulation/wasm3/wasm3-0.5.0.recipe diff --git a/app-emulation/wasm3/patches/wasm3-0.5.0.patchset b/app-emulation/wasm3/patches/wasm3-0.5.0.patchset new file mode 100644 index 000000000..aae527426 --- /dev/null +++ b/app-emulation/wasm3/patches/wasm3-0.5.0.patchset @@ -0,0 +1,21 @@ +From bd74b8afee6a878fdce3214ca550fb790cfbad84 Mon Sep 17 00:00:00 2001 +From: Al Hoang <3811822-hoanga@users.noreply.gitlab.com> +Date: Thu, 23 Dec 2021 12:59:15 -0600 +Subject: link network lib + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92ba950..3ddf73c 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -180,6 +180,7 @@ else() + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O3") + + target_link_libraries(${OUT_FILE} m) ++ target_link_libraries(${OUT_FILE} network) + + endif() + +-- +2.30.2 + diff --git a/app-emulation/wasm3/wasm3-0.5.0.recipe b/app-emulation/wasm3/wasm3-0.5.0.recipe new file mode 100644 index 000000000..fc5d5e72f --- /dev/null +++ b/app-emulation/wasm3/wasm3-0.5.0.recipe @@ -0,0 +1,50 @@ +SUMMARY="The fastest WebAssembly interpreter, and the most universal runtime" +DESCRIPTION="Wasm3 started as a research project and remains \ +so by many means. Evaluating the engine in different \ +environments is part of the research." +HOMEPAGE="http://github.com/wasm3/wasm3" +COPYRIGHT="2019 Steven Massey, Volodymyr Shymanskyy" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/wasm3/wasm3/archive/refs/tags/v$portVersion.tar.gz" +CHECKSUM_SHA256="b778dd72ee2251f4fe9e2666ee3fe1c26f06f517c3ffce572416db067546536c" +PATCHES="wasm3-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + wasm3$secondaryArchSuffix = $portVersion + cmd:wasm3$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " + +BUILD_PREREQUIRES=" + cmd:cmake + cmd:make + cmd:gcc + " + +BUILD() +{ + mkdir -p build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_WASI=simple + make +} + +INSTALL() +{ + + # install runtime + mkdir -p $binDir + + cd build + cp -p wasm3 $binDir/ +}