Commit 41fa820c authored by yuri's avatar yuri
Browse files

New port: devel/emscripten: LLVM-to-Web Compiler

Caveat: it can only work with the latest llvm-devel, at least 9.0.d20190509, see patch in bug#237819.
parent 4b67c89f
......@@ -556,6 +556,7 @@
SUBDIR += elixir-tzdata
SUBDIR += elixir-unsafe
SUBDIR += embb
SUBDIR += emscripten
SUBDIR += epl.el
SUBDIR += epm
SUBDIR += epydoc
......
# $FreeBSD$
PORTNAME= emscripten
DISTVERSION= 1.38.31
CATEGORIES= devel www
MAINTAINER= yuri@FreeBSD.org
COMMENT= LLVM-to-Web Compiler
LICENSE= MIT NCSA
LICENSE_COMB= dual
RUN_DEPENDS= llvm-devel>0:devel/llvm-devel # the upstream requires to use either the latest llvm version, or their own llvm fork called emscripten-fastcomp
USES= python shebangfix
USE_GITHUB= yes
GH_ACCOUNT= emscripten-core
GH_PROJECT= emscripten
SHEBANG_FILES= ${PYSCRIPTS} emcmake tools/emdump system/bin/sdl-config system/bin/sdl2-config third_party/websockify/run third_party/websockify/websockify.py
SHEBANG_GLOB= *.py
PYSCRIPTS= em++ emar emcc em-config emconfigure emmake emranlib emrun emscons
NO_BUILD= yes
NO_ARCH= yes
post-patch:
@${REINPLACE_CMD} -E "s|^__rootpath__ = .*|__rootpath__ = '${PREFIX}/lib/${PORTNAME}'|" ${WRKSRC}/tools/shared.py
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
cd ${WRKSRC} && ${CP} -r em* cmake site src system third_party tools ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/
${FIND} ${STAGEDIR}${PREFIX}/lib/${PORTNAME} -name "*.bat" -delete
.for s in ${PYSCRIPTS}
${RLN} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${s} ${STAGEDIR}${PREFIX}/bin/${s}
.endfor
${RM} -rf ${STAGEDIR}${PREFIX}/lib/emscripten/system/lib/pkgconfig
.include <bsd.port.mk>
TIMESTAMP = 1557349627
SHA256 (emscripten-core-emscripten-1.38.31_GH0.tar.gz) = c87e42cb6a104094e7daf2b7e61ac835f83674ac0168f533455838a1129cc764
SIZE (emscripten-core-emscripten-1.38.31_GH0.tar.gz) = 41822751
--- tools/settings_template_readonly.py.orig 2019-05-09 05:05:10 UTC
+++ tools/settings_template_readonly.py
@@ -17,6 +17,10 @@ EMSCRIPTEN_ROOT = os.path.expanduser(os.
LLVM_ROOT = os.path.expanduser(os.getenv('LLVM', '{{{ LLVM_ROOT }}}')) # directory
BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN', '')) # if not set, we will use it from ports
+# based on https://github.com/emscripten-core/emscripten/issues/8564#issuecomment-490682686
+LLVM_ADD_VERSION = 'devel'
+CLANG_ADD_VERSION = 'devel'
+
# If not specified, defaults to sys.executable.
# PYTHON = 'python'
Emscripten is a toolchain for compiling to asm.js and WebAssembly, built using
LLVM, that lets you run C and C++ on the web at near-native speed without
plugins.
WWW: https://emscripten.org/
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment