aboutsummaryrefslogtreecommitdiffstats
path: root/community/emscripten-fastcomp/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-04-28 15:36:10 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-28 15:36:51 +0200
commit55ea9cbfaf3229879eba2aa9024e247dcc6d1930 (patch)
treee93d4de260c5f2028da4ccd967381c337ec17d5f /community/emscripten-fastcomp/APKBUILD
parentc529e08b39870357e8f10ddd9fb48b4aea2543bd (diff)
downloadaports-55ea9cbfaf3229879eba2aa9024e247dcc6d1930.tar.bz2
aports-55ea9cbfaf3229879eba2aa9024e247dcc6d1930.tar.xz
community/emscripten-fastcomp: move from testing
Diffstat (limited to 'community/emscripten-fastcomp/APKBUILD')
-rw-r--r--community/emscripten-fastcomp/APKBUILD84
1 files changed, 84 insertions, 0 deletions
diff --git a/community/emscripten-fastcomp/APKBUILD b/community/emscripten-fastcomp/APKBUILD
new file mode 100644
index 0000000000..93ca8d06df
--- /dev/null
+++ b/community/emscripten-fastcomp/APKBUILD
@@ -0,0 +1,84 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+
+# NOTE: This is a fork of LLVM project needed for emscripten. It provides
+# JSBackend and WebAssembly, these will be hopefully someday merged into
+# upstream LLVM.
+# TODO: Remove unneeded binaries.
+pkgname=emscripten-fastcomp
+# Keep in sync with package emscripten!
+pkgver=1.37.9
+pkgrel=2
+pkgdesc="The Clang + LLVM backend for Emscripten"
+url="https://kripken.github.io/emscripten-site/"
+arch="all"
+license="UOI-NCSA"
+depends="python2"
+makedepends="cmake paxmark zlib-dev"
+source="$pkgname.tar.gz::https://github.com/kripken/$pkgname/archive/$pkgver.tar.gz
+ $pkgname-clang.tar.gz::https://github.com/kripken/$pkgname-clang/archive/$pkgver.tar.gz
+ llvm-fix-build-with-musl-libc.patch
+ llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+options="!check" # some tests are broken, don't bother with it for now
+
+_prefix="usr/lib/$pkgname"
+ldpath="/$_prefix/lib"
+# Avoid conflicts in provided so:* names with llvm package.
+sonameprefix="$pkgname:"
+
+prepare() {
+ ln -sf ../../$pkgname-clang-$pkgver "$builddir"/tools/clang
+
+ default_prepare
+}
+
+build() {
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
+
+ # XXX: Is it a good idea to omit X86 in LLVM_TARGETS_TO_BUILD?
+ # https://github.com/kripken/emscripten-fastcomp/issues/174
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX="/$_prefix" \
+ -DCMAKE_VERBOSE_MAKEFILE=NO \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DCLANG_BUILD_EXAMPLES=OFF \
+ -DCLANG_INCLUDE_TESTS=OFF \
+ -DLLVM_BUILD_DOCS=OFF \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_BUILD_RUNTIME=OFF \
+ -DLLVM_ENABLE_ZLIB=ON \
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly \
+ -DLLVM_HOST_TRIPLE="$CHOST" \
+ -DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_INCLUDE_TESTS=OFF \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_TARGETS_TO_BUILD=JSBackend
+ make -j ${JOBS:-2}
+
+ paxmark m \
+ bin/llvm-rtdyld \
+ bin/lli \
+ bin/lli-child-target
+}
+
+package() {
+ cd "$builddir"/build
+ make install DESTDIR="$pkgdir"
+
+ cd "$pkgdir"/$_prefix
+
+ # emcc -v expects this file to exist.
+ cp "$builddir"/emscripten-version.txt .
+
+ # Remove unneeded files and clutter.
+ rm -r include libexec share lib/clang lib/cmake
+ rm lib/*.a bin/*-test
+}
+
+sha512sums="443d22163866a409b6218bb686d52b845051350ef4af546e2d52ffaca03ed363f3cbf8f8e61b7fc28c1e1007d7e2789bfd74d91159deff46e3c6e1913ffebf34 emscripten-fastcomp.tar.gz
+5c1fae88e87575571fef767f9c3d664c0eed106d566517871503c75cb5e31777d5fd5773f914fbe932abde3b42870b25e4ca58cf458ceecd0f9a7a50e7d86af9 emscripten-fastcomp-clang.tar.gz
+f84cd65d7042e89826ba6e8d48c4c302bf4980da369d7f19a55f217e51c00ca8ed178d453df3a3cee76598a7cecb94aed0775a6d24fe73266f82749913fc3e71 llvm-fix-build-with-musl-libc.patch
+19bfb9282455d39d07dbb2b1293b03a45c57d522fbb9c5e58dac034200669628b97e7a90cd4ff5d52d9bb79acfccbef653d8a1140a7f0589ecd6f9b7c4ba0eb6 llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch"