temscripten-2.0.8-r1.ebuild - parlay - yet another gentoo overlay
HTML git clone https://git.parazyd.org/parlay
DIR Log
DIR Files
DIR Refs
DIR README
---
temscripten-2.0.8-r1.ebuild (1527B)
---
1 # Copyright 1999-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 # This is a horrible ebuild. Don't use it as an example how to write one.
5 # TODO:
6 # * remove network access from npm ci
7 # * use supported versions of LLVM and binaryen (current it requires git head)
8 # * enable tests
9 # * use the python eclass properly
10 # * fperms +x is wrong
11 # * fix many QA issues
12
13 EAPI=7
14
15 PYTHON_COMPAT=( python3_{7,8} )
16 inherit python-single-r1
17
18 DESCRIPTION="Emscripten is a complete compiler toolchain to WebAssembly, using LLVM"
19 HOMEPAGE="https://emscripten.org"
20 SRC_URI="https://github.com/emscripten-core/emscripten/archive/${PV}.tar.gz -> ${P}.tar.gz"
21
22 LICENSE="MIT" # TODO: or illinois one
23 SLOT="0"
24 KEYWORDS=""
25 IUSE=""
26 RESTRICT="network-sandbox test"
27
28 RDEPEND="
29 dev-util/binaryen
30 net-libs/nodejs
31 sys-devel/clang:12[llvm_targets_WebAssembly]
32 virtual/jre
33 "
34 BDEPEND="
35 net-libs/nodejs
36 "
37
38 PATCHES=(
39 "${FILESDIR}"/emscripten-2.0.8-wasm-ld.patch
40 "${FILESDIR}"/emscripten-2.0.8-py-runner.patch
41 )
42
43 src_prepare() {
44 default
45 npm ci || die
46 sed -e "s|GENTOO_PREFIX|${EPREFIX}|" -e "s|GENTOO_LIB|$(get_libdir)|" < "${FILESDIR}/config-r1" > .emscripten || die
47 sed -i -e "s|GENTOO_PREFIX|${EPREFIX}|" -e "s|GENTOO_LIB|$(get_libdir)|" -e "s|GENTOO_PYTHON|${EPYTHON}|" tools/shared.py tools/run_python.sh || die
48 }
49
50 src_compile() {
51 :
52 }
53
54 src_install() {
55 dodir /usr/bin
56 tools/create_entry_points.py || die
57 insinto "/usr/$(get_libdir)/emscripten"
58 doins -r .
59 fperms +x "/usr/$(get_libdir)/emscripten"/*
60 }