1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/community/binaryen/APKBUILD
2023-01-19 03:11:53 +01:00

62 lines
1.6 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=binaryen
pkgver=111
pkgrel=1
pkgdesc="Compiler infrastructure and toolchain library for WebAssembly, in C++"
url="https://github.com/WebAssembly/binaryen"
arch="all !s390x"
license="Apache-2.0"
makedepends="
cmake
python3
samurai
"
checkdepends="
filecheck
gtest-dev
llvm-test-utils
nodejs
"
subpackages="$pkgname-dev"
source="https://github.com/WebAssembly/binaryen/archive/version_$pkgver/binaryen-$pkgver.tar.gz
use-system-gtest.patch
"
builddir="$srcdir/$pkgname-version_$pkgver"
build() {
cmake -G Ninja -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS=$(want_check && echo ON || echo OFF)
cmake --build build
}
check() {
# Tests are extremely chatty.
msg 'running tests with stdout/stderr redirected into ./check.log...'
python3 check.py --binaryen-bin build/bin > check.log 2>&1 || {
echo 'tests failed, printing last 1000 lines of check.log:' >&2
tail -n 1000 check.log
return 1
}
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
dev() {
default_dev
# XXX: doesn't exist on riscv64
amove usr/bin/binaryen-unittests || true
}
sha512sums="
249b37a4c6096d7386529166d34753414db80175c403181f8f1d17960681c8abb8710c759ef81826c01575b2696bdd93a769c48ba79ca3acf51e2c91a93c155f binaryen-111.tar.gz
ea332616e91c7674c471eb8f8b6352c6d342a17e2b2fd585c6c2b10de89e1be74e63fe42d908af5b2e109d043085e4300905e4efb2ec57bd275db643b22e167d use-system-gtest.patch
"