testing/wasm-pack: new aport

https://github.com/rustwasm/wasm-pack
rust to wasm build tool
This commit is contained in:
psykose 2022-04-14 08:41:37 +00:00 committed by alice
parent 8ee5f4da58
commit feeb4ce82f

View File

@ -0,0 +1,45 @@
# Contributor: psykose <alice@ayaya.dev>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=wasm-pack
pkgver=0.10.2
pkgrel=0
pkgdesc="rust to wasm build tool"
url="https://github.com/rustwasm/wasm-pack"
arch="all !s390x !riscv64" # rust
license="Apache-2.0"
depends="rust-wasm"
makedepends="
cargo
curl-dev
openssl-dev
"
source="https://github.com/rustwasm/wasm-pack/archive/refs/tags/v$pkgver/wasm-pack-v$pkgver.tar.gz"
options="!check" # most tests fail outside of x86_64
export CARGO_PROFILE_RELEASE_LTO=true
export CARGO_PROFILE_RELEASE_PANIC=abort
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
export OPENSSL_NO_VENDOR=1
prepare() {
default_prepare
cargo fetch --locked
}
build() {
cargo build --release --frozen
}
check() {
cargo test --frozen
}
package() {
install -Dm755 target/release/wasm-pack \
-t "$pkgdir"/usr/bin
}
sha512sums="
a88bb48abbbd653563f5a74b637d518af946e0a43cda659662831fa893b793f752e54ca274f8e187785b510399c80808b64142f41c23fdb4bdb74ae85eb86e88 wasm-pack-v0.10.2.tar.gz
"