# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=binaryen pkgver=1.37.9 pkgrel=1 pkgdesc="Compiler infrastructure and toolchain library for WebAssembly, in C++" url="https://github.com/WebAssembly/binaryen" arch="all" 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 fix-install-paths.patch link-dynamically.patch dont-enforce-sse.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 -R "$pkgdir"/usr/src rm "$pkgdir"/usr/share/binaryen/binaryen.js } sha512sums="def54c53e4fd8e0cbf9d13215020456054674da26dd6f590c2c1cbd172707ef9da5fe1d4d6415eba1afdc87c37db0867a4e2e9c3188b61e9f8f817d1fc839e33 binaryen-1.37.9.tar.gz 40720200053bf0a35528b67c999b21884787186c5ea305c4164421d365ae0257a593dda128b81688f74912585778d418fa24b6be881a345af5af7d4db5a3c811 fix-install-paths.patch 4c69c4fe55690694143163576036b935072b7b0eac30e17921115b3ddeb58266a91cf7b6ff39396cede9059dac4fa2f9de691f6fd83cddca88abbbcc93d3c4fd link-dynamically.patch 747dcebb46db3480f877f004c8a5efee297cedda7f826b1a85ba4a0cddc357c480a668efd5bfdf58f716d15756c7634fa73cc1a84c7a66edb43178f0e746537e dont-enforce-sse.patch"