aboutsummaryrefslogtreecommitdiff
path: root/gnunet-build/packages/build-utils/emscripten/Buildrules
blob: cb7445d0acd237bfc76e60a9944c13df0f7f9ff5 (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
VERSION="1.10.0"
DESCRIPTION="Emscripten is an LLVM-to-JavaScript compiler."
SOURCE_URI="git://github.com/amatus/${NAME}.git?${VERSION}&archive=${NAME}-${VERSION}.${ARCHIVE_FORMAT}"
# XXX: these are actually RDEPENDS but that's broken
BDEPENDS="build-utils/llvm build-utils/node"

pkg_compile() {
	INSTALLDIR="${D}/${TOOLDIR}/opt/emscripten"
	mkdir -p "$(dirname "${INSTALLDIR}")"
	cp -a "${S}" "${INSTALLDIR}"
	mkdir -p "${D}/${TOOLDIR}/etc"
	cat > "${D}/${TOOLDIR}/etc/emscripten" << EOF
import os
EMSCRIPTEN_ROOT = '${SYSROOT}/${TOOLDIR}/opt/emscripten'
LLVM_ROOT = '${SYSROOT}/${TOOLDIR}/bin'
NODE_JS = '${SYSROOT}/${TOOLDIR}/bin/node'
JAVA = 'java'
TEMP_DIR = os.path.expanduser(os.getenv('TEMP_DIR'))
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
EOF
}

# vim: syntax=sh