aboutsummaryrefslogtreecommitdiff
path: root/gnunet-build/packages/build-utils/emscripten/Buildrules
blob: 5011d43c5e95a39fbe3f69564dd981e1e73b1223 (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
VERSION="1.39.6"
DESCRIPTION="Emscripten is an LLVM-to-JavaScript compiler."
SOURCE_URI="git://github.com/emscripten-core/${NAME}.git?${VERSION}&archive=${NAME}-${VERSION}.${ARCHIVE_FORMAT}"
RDEPENDS="build-utils/emscripten-fastcomp build-utils/node"

pkg_compile() {
	INSTALLDIR="${D}/${TOOLDIR}/opt/emscripten"
	mkdir -p "$(dirname "${INSTALLDIR}")"
	cp -a "${S}" "${INSTALLDIR}"
	mkdir -p "${D}/${TOOLDIR}/etc"
	mkdir -p "${D}/${TOOLDIR}/var/cache/emscripten"
	cat > "${D}/${TOOLDIR}/etc/emscripten" << EOF
import os
EMSCRIPTEN_ROOT = '${SYSROOT}/${TOOLDIR}/opt/emscripten'
LLVM_ROOT = '${SYSROOT}/${TOOLDIR}/bin'
PYTHON = os.path.expanduser(os.getenv('PYTHON') or '/usr/bin/python2')
NODE_JS = '${SYSROOT}/${TOOLDIR}/bin/node'
SPIDERMONKEY_ENGINE = [os.path.expanduser(os.getenv('SPIDERMONKEY') or 'js')]
V8_ENGINE = os.path.expanduser(os.getenv('V8') or 'd8')
JAVA = 'java'
TEMP_DIR = os.path.expanduser(os.getenv('TEMP_DIR'))
CRUNCH = os.path.expanduser(os.getenv('CRUNCH') or 'crunch')
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
BINARYEN_ROOT = '/no_binaryen'
EOF
}

# vim: syntax=sh