Date: Sun, 19 Sep 2021 04:46:41 GMT From: "Vanilla I. Shu" <vanilla@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 8f0b24d62bc6 - main - devel/wasm3: add ports. Message-ID: <202109190446.18J4kfda043267@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by vanilla: URL: https://cgit.FreeBSD.org/ports/commit/?id=8f0b24d62bc67d33044aa08d5fc068d28ab5d302 commit 8f0b24d62bc67d33044aa08d5fc068d28ab5d302 Author: Vanilla I. Shu <vanilla@FreeBSD.org> AuthorDate: 2021-09-19 04:43:55 +0000 Commit: Vanilla I. Shu <vanilla@FreeBSD.org> CommitDate: 2021-09-19 04:46:36 +0000 devel/wasm3: add ports. PR: 258458 Reported by: Martin Filla <freebsd at sysctl.cz> --- devel/Makefile | 1 + devel/wasm3/Makefile | 25 ++++++++++++ devel/wasm3/distinfo | 5 +++ devel/wasm3/files/patch-CMakeLists.txt | 27 +++++++++++++ .../files/patch-__deps_uvwasi-src_CMakeLists.txt | 45 ++++++++++++++++++++++ devel/wasm3/pkg-descr | 3 ++ 6 files changed, 106 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 4d13febf4979..9d6d724866f3 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -7083,6 +7083,7 @@ SUBDIR += wasi-compiler-rt11 SUBDIR += wasi-libc SUBDIR += wasi-libcxx + SUBDIR += wasm3 SUBDIR += websocketpp SUBDIR += websvn SUBDIR += wf-config diff --git a/devel/wasm3/Makefile b/devel/wasm3/Makefile new file mode 100644 index 000000000000..6bd65a2ab3b3 --- /dev/null +++ b/devel/wasm3/Makefile @@ -0,0 +1,25 @@ +PORTNAME= wasm3 +DISTVERSIONPREFIX= v +DISTVERSION= 0.5.0 +CATEGORIES= devel + +MAINTAINER= freebsd@sysctl.cz +COMMENT= The fastest WebAssembly interpreter, and the most universal runtime. + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libuv.so:devel/libuv + +USES= cmake:insource localbase:ldflags +USE_GITHUB= yes +GH_ACCOUNT= wasm3 +GH_PROJECT= wasm3 +GH_TUPLE+= vshymanskyy:uvwasi:b063d686848:uvwasi/_deps/uvwasi-src + +PLIST_FILES= bin/wasm3 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + +.include <bsd.port.mk> diff --git a/devel/wasm3/distinfo b/devel/wasm3/distinfo new file mode 100644 index 000000000000..c22c465e3937 --- /dev/null +++ b/devel/wasm3/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1631844705 +SHA256 (wasm3-wasm3-v0.5.0_GH0.tar.gz) = b778dd72ee2251f4fe9e2666ee3fe1c26f06f517c3ffce572416db067546536c +SIZE (wasm3-wasm3-v0.5.0_GH0.tar.gz) = 2582080 +SHA256 (vshymanskyy-uvwasi-b063d686848_GH0.tar.gz) = 13e58764bbada1119d5298cddfcb88152574ca753522585d25936df36caee84e +SIZE (vshymanskyy-uvwasi-b063d686848_GH0.tar.gz) = 59759 diff --git a/devel/wasm3/files/patch-CMakeLists.txt b/devel/wasm3/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..3b586e383763 --- /dev/null +++ b/devel/wasm3/files/patch-CMakeLists.txt @@ -0,0 +1,27 @@ +--- CMakeLists.txt.orig 2021-06-02 10:40:14 UTC ++++ CMakeLists.txt +@@ -188,21 +188,10 @@ if(BUILD_WASI MATCHES "simple") + elseif(BUILD_WASI MATCHES "metawasi") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dd_m3HasMetaWASI") + elseif(BUILD_WASI MATCHES "uvwasi") +- include(FetchContent) +- FetchContent_Declare( +- uvwasi +- GIT_REPOSITORY https://github.com/vshymanskyy/uvwasi.git +- GIT_TAG b063d686848c32a26119513056874f051c74258a +- ) +- +- FetchContent_GetProperties(uvwasi) +- if(NOT uvwasi_POPULATED) +- FetchContent_Populate(uvwasi) +- include_directories("${uvwasi_SOURCE_DIR}/include") +- add_subdirectory(${uvwasi_SOURCE_DIR} ${uvwasi_BINARY_DIR} EXCLUDE_FROM_ALL) +- endif() ++ add_subdirectory("_deps/uvwasi-src") ++ include_directories("_deps/uvwasi-src/include") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dd_m3HasUVWASI") +- target_link_libraries(${OUT_FILE} uvwasi_a uv_a) ++ target_link_libraries(${OUT_FILE} uvwasi_a) + endif() + + check_ipo_supported(RESULT result) diff --git a/devel/wasm3/files/patch-__deps_uvwasi-src_CMakeLists.txt b/devel/wasm3/files/patch-__deps_uvwasi-src_CMakeLists.txt new file mode 100644 index 000000000000..f97829d48652 --- /dev/null +++ b/devel/wasm3/files/patch-__deps_uvwasi-src_CMakeLists.txt @@ -0,0 +1,45 @@ +--- _deps/uvwasi-src/CMakeLists.txt.orig 2021-03-20 19:00:07 UTC ++++ _deps/uvwasi-src/CMakeLists.txt +@@ -25,19 +25,19 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND uvwasi_defines _GNU_SOURCE _POSIX_C_SOURCE=200112) + endif() + +-include(FetchContent) ++#include(FetchContent) + ## https://libuv.org +-FetchContent_Declare( +- libuv +- GIT_REPOSITORY https://github.com/libuv/libuv.git +- GIT_TAG ${LIBUV_VERSION}) ++#FetchContent_Declare( ++# libuv ++# GIT_REPOSITORY https://github.com/libuv/libuv.git ++# GIT_TAG ${LIBUV_VERSION}) + +-FetchContent_GetProperties(libuv) +-if(NOT libuv_POPULATED) +- FetchContent_Populate(libuv) +- include_directories("${libuv_SOURCE_DIR}/include") +- add_subdirectory(${libuv_SOURCE_DIR} ${libuv_BINARY_DIR} EXCLUDE_FROM_ALL) +-endif() ++#FetchContent_GetProperties(libuv) ++#if(NOT libuv_POPULATED) ++# FetchContent_Populate(libuv) ++# include_directories("${libuv_SOURCE_DIR}/include") ++# add_subdirectory(${libuv_SOURCE_DIR} ${libuv_BINARY_DIR} EXCLUDE_FROM_ALL) ++#endif() + + ## uvwasi source code files. + set(uvwasi_sources +@@ -87,9 +87,9 @@ target_compile_definitions(uvwasi_a PRIVATE ${uvwasi_d + target_compile_options(uvwasi_a PRIVATE ${uvwasi_cflags}) + target_include_directories(uvwasi_a PRIVATE ${PROJECT_SOURCE_DIR}/include) + if(CODE_COVERAGE) +- target_link_libraries(uvwasi_a PUBLIC uv_a coverage_config) ++ target_link_libraries(uvwasi_a PUBLIC uv coverage_config) + else() +- target_link_libraries(uvwasi_a PRIVATE uv_a) ++ target_link_libraries(uvwasi_a PRIVATE uv) + endif() + + diff --git a/devel/wasm3/pkg-descr b/devel/wasm3/pkg-descr new file mode 100644 index 000000000000..a90a7900ff1f --- /dev/null +++ b/devel/wasm3/pkg-descr @@ -0,0 +1,3 @@ +The fastest WebAssembly interpreter, and the most universal runtime. + +WWW: https://github.com/wasm3/wasm3
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109190446.18J4kfda043267>