# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=binaryen pkgver=1.37.14 pkgrel=0 pkgdesc="Compiler infrastructure and toolchain library for WebAssembly, in C++" url="https://github.com/WebAssembly/binaryen" arch="all !s390x" license="ASL-2.0" makedepends="cmake" checkdepends="nodejs python2" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/WebAssembly/$pkgname/archive/$pkgver.tar.gz link-dynamically.patch ignore-type-limits-error.patch" builddir="$srcdir/$pkgname-$pkgver" case "$CARCH" in x86) options="!check";; # XXX: two tests fail esac build() { cd "$builddir" cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DBUILD_SHARED_LIBS=ON make } check() { cd "$builddir" # waterfall requires additional dependency # gcc-tests fail, dunno why python2 check.py --no-test-waterfall --no-run-gcc-tests } package() { cd "$builddir" make install DESTDIR="$pkgdir" rm "$pkgdir"/usr/share/binaryen/binaryen.js } sha512sums="420a79020fdbf9e79ac55441c27839db5a55c5ce4ace21f289bb2e6a96bde79f47b93097a570f5ace8b80837c51b91c115727283b9d11731120749f6e107dd5b binaryen-1.37.14.tar.gz 4a6f6708b8d72ba0be901eb0a6cba4e07e40270fc1d5abf5bea5f82ef34100ecb2017a1c8ae1c4b10446ef87d0328f4b4f9a7776ec8c2f850170fe241cfda1c6 link-dynamically.patch 3b95a197cd8805dfa714cf9f31adc1437b6d29bd4082f752c16d98c40cd024b110c02a412285c78251cb5d0b3080c0f9e4d45d8dd0166c71b9462b1610191ab8 ignore-type-limits-error.patch"