-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated wasm package to include wasm-wasi-component.
This also requires a small patch to unit source code to fix FTBFS on an older macOS version still used in github actions CI.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,15 @@ class UnitWasm < Formula | |
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20" | ||
head "https://github.com/nginx/unit.git", branch: "master" | ||
|
||
depends_on "rust" => :build | ||
depends_on "openssl" | ||
depends_on "[email protected]" | ||
depends_on "wasmtime" | ||
|
||
# uname -o does not seem to exist on macOS 12.7 currently used in github actions | ||
# which leads to FTBFS on that target | ||
patch :DATA | ||
|
||
def install | ||
system "./configure", | ||
"--prefix=#{prefix}", | ||
|
@@ -33,5 +38,23 @@ def install | |
"--include-path=#{HOMEBREW_PREFIX}/usr/include/", | ||
"--lib-path=#{HOMEBREW_PREFIX}/lib/" | ||
system "make", "wasm-install" | ||
|
||
system "./configure", "wasm-wasi-component" | ||
system "make", "wasm-wasi-component-install" | ||
end | ||
end | ||
|
||
__END__ | ||
diff --git a/auto/modules/wasm-wasi-component b/auto/modules/wasm-wasi-component | ||
index bfb6ffcb..6c8258d7 100644 | ||
--- a/auto/modules/wasm-wasi-component | ||
+++ b/auto/modules/wasm-wasi-component | ||
@@ -82,7 +82,7 @@ fi | ||
$echo " + $NXT_WCM_MODULE module: $NXT_WCM_MOD_NAME" | ||
|
||
|
||
-NXT_OS=$(uname -o) | ||
+NXT_OS=$(uname -s) | ||
|
||
if [ $NXT_OS = "Darwin" ]; then | ||
NXT_CARGO_CMD="cargo rustc --release --manifest-path src/wasm-wasi-component/Cargo.toml -- --emit link=target/release/libwasm_wasi_component.so -C link-args='-undefined dynamic_lookup'" |