blob: bf0d525bdc803201592ecebea2db3f871b1ad581 (
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
|
VERSION="1.37.28"
DESCRIPTION="Emscripten is an LLVM-to-JavaScript compiler."
SOURCE_URI="git://github.com/kripken/${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]
EOF
}
# vim: syntax=sh
|