aboutsummaryrefslogtreecommitdiffstats
path: root/community/binaryen/APKBUILD
blob: 51674e35b107f87ef472fad346aef568b8fde80a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=binaryen
pkgver=40
pkgrel=0
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"
checkdepends="nodejs python2"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/WebAssembly/$pkgname/archive/version_$pkgver.tar.gz
	link-dynamically.patch
	ignore-type-limits-error.patch
	fix-gcc8-wcatch-value.patch"
builddir="$srcdir/$pkgname-version_$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="89aa73c1686fb6d54c91990acbc7cd6c1bc7e6da57731bf009fe507c955c98c91582b5b9924c3c3f6a2d36d55ae73f1be79911cdce93dfd74954bca46861c8ad  binaryen-40.tar.gz
9729655be0d952385de959bf7dd84a075b192fe4b221bb5c23e562a83a2bf9202a07536ad393157b23e0447f28bdd16283f64a63588ca42597bb59e9551219c8  link-dynamically.patch
3b95a197cd8805dfa714cf9f31adc1437b6d29bd4082f752c16d98c40cd024b110c02a412285c78251cb5d0b3080c0f9e4d45d8dd0166c71b9462b1610191ab8  ignore-type-limits-error.patch
f937a9f9f7f2cab97aa15ade3a800b8924755b27ae4e9e8951ee97dc79d54c95db28d3c71b32c2ed0b5711d6e1884c33cc307564abe759f6ea3c23db60d433a1  fix-gcc8-wcatch-value.patch"