From owner-dev-commits-ports-main@freebsd.org Sun Sep 19 04:46:41 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 827C36AAD56; Sun, 19 Sep 2021 04:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HBwBn2v25z4jsR; Sun, 19 Sep 2021 04:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 444EB17349; Sun, 19 Sep 2021 04:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18J4kfBF043268; Sun, 19 Sep 2021 04:46:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18J4kfda043267; Sun, 19 Sep 2021 04:46:41 GMT (envelope-from git) Date: Sun, 19 Sep 2021 04:46:41 GMT Message-Id: <202109190446.18J4kfda043267@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Vanilla I. Shu" Subject: git: 8f0b24d62bc6 - main - devel/wasm3: add ports. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vanilla X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f0b24d62bc67d33044aa08d5fc068d28ab5d302 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2021 04:46:41 -0000 The branch main has been updated by vanilla: URL: https://cgit.FreeBSD.org/ports/commit/?id=8f0b24d62bc67d33044aa08d5fc068d28ab5d302 commit 8f0b24d62bc67d33044aa08d5fc068d28ab5d302 Author: Vanilla I. Shu AuthorDate: 2021-09-19 04:43:55 +0000 Commit: Vanilla I. Shu CommitDate: 2021-09-19 04:46:36 +0000 devel/wasm3: add ports. PR: 258458 Reported by: Martin Filla --- 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 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