aboutsummaryrefslogtreecommitdiffstats
path: root/community/binaryen/APKBUILD
blob: 5cf4c22ae4b3fb4683872dd3b6c561654fa75439 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=binaryen
pkgver=38
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/version_$pkgver.tar.gz
	link-dynamically.patch
	ignore-type-limits-error.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="be878f6b95e8961822f7a65cb08150eb93aed763bae13de14f481ba02dc0736f0d78dceb6556f287b1c08ec26bcd6a1e2f130ccb4628e8d048bbcc426e89c6c0  binaryen-38.tar.gz
81e27282425c1ce878548a42f18aa9d35c02c4d26353f0a3e8d2c1e4d47435c3c4a3503ad384a5f3facb61c43b51ad43d64d5af233c3369e65d00484418b52fe  link-dynamically.patch
3b95a197cd8805dfa714cf9f31adc1437b6d29bd4082f752c16d98c40cd024b110c02a412285c78251cb5d0b3080c0f9e4d45d8dd0166c71b9462b1610191ab8  ignore-type-limits-error.patch"