diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2024-09-05 20:22:14 +0000 |
---|---|---|
committer | Konstantin Pavlov <pavlov.konstantin@gmail.com> | 2024-09-09 09:55:32 -0700 |
commit | 9998918dbbc52c279b9c74cc34f6c67f6cdba1df (patch) | |
tree | 1b064d86d6d83b4bf73d6627175a585cd0e3f290 /pkg/rpm | |
parent | 5c58f9d0a0afd4eb1e043abf5f4a20ad4eb3b4cb (diff) | |
download | unit-9998918dbbc52c279b9c74cc34f6c67f6cdba1df.tar.gz unit-9998918dbbc52c279b9c74cc34f6c67f6cdba1df.tar.bz2 |
Packages: bump wasmtime to 24.0.0 and wasi-sysroot to 24.0.
Wasm module is now not built for Amazon Linux 2, Debian 11 and Ubuntu
2.0.04, since it requires cmake version newer than what's available on
those OSes. wasm-wasi-component is not affected.
Diffstat (limited to 'pkg/rpm')
-rw-r--r-- | pkg/rpm/Makefile.wasm | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/pkg/rpm/Makefile.wasm b/pkg/rpm/Makefile.wasm index cb2ad35a..fe5c6808 100644 --- a/pkg/rpm/Makefile.wasm +++ b/pkg/rpm/Makefile.wasm @@ -6,13 +6,18 @@ MODULE_SUMMARY_wasm= WASM module for NGINX Unit MODULE_VERSION_wasm= $(VERSION) MODULE_RELEASE_wasm= 1 -MODULE_CONFARGS_wasm= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component -MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS=\"\$$(grep ^CFLAGS build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" -MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install +MODULE_CONFARGS_wasm= wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm-wasi-component CFLAGS=\"\$$(grep ^CFLAGS build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" +MODULE_INSTARGS_wasm= wasm-wasi-component-install + +ifeq (,$(findstring $(OSVER),amazonlinux2)) +MODULE_CONFARGS_wasm+= \&\& ./configure wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/artifacts/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/artifacts/lib +MODULE_MAKEARGS_wasm+= wasm +MODULE_INSTARGS_wasm+= wasm-install MODULE_SOURCES_wasm= -BUILD_DEPENDS_wasm= +BUILD_DEPENDS_wasm= cmake BUILD_DEPENDS+= $(BUILD_DEPENDS_wasm) @@ -22,16 +27,23 @@ endef export MODULE_PREBUILD_wasm define MODULE_PREINSTALL_wasm +\# brp-mangle-shebangs parses all executable files for a shebang +\# this fails on a vendored code that somehow ships with exec bit enabled +find pkg/contrib/wasmtime/ -type f -executable -name "*.rs" | xargs chmod -x endef export MODULE_PREINSTALL_wasm define MODULE_POSTINSTALL_wasm -%{__install} -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so %{buildroot}%{_libdir}/ +%{__install} -m 755 -p pkg/contrib/wasmtime/artifacts/lib/libwasmtime.so %{buildroot}%{_libdir}/ endef export MODULE_POSTINSTALL_wasm +endif define MODULE_FILES_wasm +%if 0%{?amzn2} +%else %{_libdir}/libwasmtime.so +%endif %{_libdir}/unit/modules/* %{_libdir}/unit/debug-modules/* endef |