add emscripten/ binaryen/

This commit is contained in:
ziggi
2020-01-19 12:55:25 +00:00
parent 21fd60ca70
commit cc0a9b0472
10 changed files with 4037 additions and 3 deletions

20
devel/binaryen/Makefile Normal file
View File

@@ -0,0 +1,20 @@
# $FreeBSD: head/devel/binaryen/Makefile 523067 2020-01-14 21:16:30Z yuri $
PORTNAME= binaryen
DISTVERSIONPREFIX= version_
DISTVERSION= 90
CATEGORIES= devel
MAINTAINER= greg@unrelenting.technology
COMMENT= Compiler infrastructure and toolchain library for WebAssembly
USES= cmake gmake python:2.7,build compiler:c++11-lang
USE_GITHUB= yes
GH_ACCOUNT= WebAssembly
USE_LDCONFIG= yes
CMAKE_ARGS= -DBINARYEN_VERSION_INFO=${DISTVERSION}
BINARY_ALIAS= python=${PYTHON_CMD}
.include <bsd.port.mk>

3
devel/binaryen/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1578881429
SHA256 (WebAssembly-binaryen-version_90_GH0.tar.gz) = 9bed0a307e3f4782402b5944426f298dbad0028a93c83068ef10af9e3ff27e2b
SIZE (WebAssembly-binaryen-version_90_GH0.tar.gz) = 3840869

View File

@@ -0,0 +1,18 @@
--- CMakeLists.txt.orig 2020-01-13 02:56:13 UTC
+++ CMakeLists.txt
@@ -11,6 +11,7 @@ endif()
# more useful error reports from users.
option(BYN_ENABLE_ASSERTIONS "Enable assertions" ON)
+if (FALSE)
find_package(Git QUIET REQUIRED)
execute_process(COMMAND
"${GIT_EXECUTABLE}" --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --tags
@@ -24,6 +25,7 @@ if(${GIT_HASH_RESULT})
set(BINARYEN_VERSION_INFO "(unable to determine version)")
else()
set(BINARYEN_VERSION_INFO "${GIT_HASH}")
+endif()
endif()
configure_file(config.h.in config.h)

21
devel/binaryen/pkg-descr Normal file
View File

@@ -0,0 +1,21 @@
The aim of Binaryen, a compiler and toolchain infrastructure library for
WebAssembly, is to make compiling to WebAssembly easy, fast, and effective.
* Easy: Binaryen has a simple C API in a single header, and can also be used
from JavaScript. It accepts input in WebAssembly-like form but also accepts
a general control flow graph for compilers that prefer that.
* Fast: Binaryen's internal IR uses compact data structures and is designed for
completely parallel codegen and optimization, using all available CPU cores.
Binaryen's IR also compiles down to WebAssembly extremely easily and quickly
because it is essentially a subset of WebAssembly.
* Effective: Binaryen's optimizer has many passes that can improve code very
significantly (e.g. local coloring to coalesce local variables; dead code
elimination; precomputing expressions when possible at compile time; etc.).
These optimizations aim to make Binaryen powerful enough to be used as a
compiler backend by itself. One specific area of focus is on
WebAssembly-specific optimizations (that general-purpose compilers might not
do), which you can think of as wasm minification, similar to minification for
JavaScript, CSS, etc., all of which are language-specific (an example of such
an optimization is block return value generation in SimplifyLocals).
WWW: https://github.com/WebAssembly/binaryen

12
devel/binaryen/pkg-plist Normal file
View File

@@ -0,0 +1,12 @@
bin/asm2wasm
bin/wasm-as
bin/wasm-ctor-eval
bin/wasm-dis
bin/wasm-emscripten-finalize
bin/wasm-metadce
bin/wasm-opt
bin/wasm-reduce
bin/wasm-shell
bin/wasm2js
include/binaryen-c.h
lib/libbinaryen.so

64
devel/emscripten/Makefile Normal file
View File

@@ -0,0 +1,64 @@
# $FreeBSD: head/devel/emscripten/Makefile 522819 2020-01-12 17:06:47Z yuri $
PORTNAME= emscripten
DISTVERSION= 1.39.5
CATEGORIES= devel www
MAINTAINER= yuri@FreeBSD.org
COMMENT= LLVM-to-Web Compiler
#RUN_DEPENDS= llvm-devel>0:devel/llvm-devel \
# node:www/node \
# binaryen>0:devel/binaryen
# # 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
PORTSCOUT= limit:^[0-9\.]*$$
#post-patch:
# ${REINPLACE_CMD} -i '' -E " \
# s|BINARYEN_ROOT = None|BINARYEN_ROOT = '${LOCALBASE}'| ; \
# s|LLVM_ROOT = None|LLVM_ROOT = '${LOCALBASE}'| ; \
# s|LLVM_ADD_VERSION = None|LLVM_ADD_VERSION = 'devel'| ; \
# s|CLANG_ADD_VERSION = None|CLANG_ADD_VERSION = 'devel'| ; \
# s|^__rootpath__ = .*|__rootpath__ = '${PREFIX}/lib/${PORTNAME}'| ; \
# s|find_executable\('llvm-dis'\) or '/usr/bin/llvm-dis'|'${LOCALBASE}/bin/llvm-dis'|" \
# ${WRKSRC}/tools/shared.py
# ${REINPLACE_CMD} -i '' -E " \
# s|os.getenv\('BINARYEN', ''\)|os.getenv('BINARYEN', '${LOCALBASE}')|" \
# ${WRKSRC}/tools/settings_template.py
post-patch:
${REINPLACE_CMD} -i '' -E " \
s|BINARYEN_ROOT = None|BINARYEN_ROOT = '${LOCALBASE}'| ; \
s|LLVM_ROOT = None|LLVM_ROOT = '${LOCALBASE}'| ; \
s|^__rootpath__ = .*|__rootpath__ = '${PREFIX}/lib/${PORTNAME}'| ; \
s|find_executable\('llvm-dis'\) or '/usr/bin/llvm-dis'|'${LOCALBASE}/bin/llvm-dis'|" \
${WRKSRC}/tools/shared.py
${REINPLACE_CMD} -i '' -E " \
s|os.getenv\('BINARYEN', ''\)|os.getenv('BINARYEN', '${LOCALBASE}')|" \
${WRKSRC}/tools/settings_template.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" -o -name "*.orig" \) -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
${RM} -rf ${STAGEDIR}${PREFIX}/lib/emscripten/tools/websocket_to_posix_proxy
.include <bsd.port.mk>

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1576952038
SHA256 (emscripten-core-emscripten-1.39.5_GH0.tar.gz) = 16fe379f07ba8f4bae2dc9d3b79106e948baa162b719f595344c4f4c57197af9
SIZE (emscripten-core-emscripten-1.39.5_GH0.tar.gz) = 42783871

View File

@@ -0,0 +1,5 @@
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/

3888
devel/emscripten/pkg-plist Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
bin/openocd
info/openocd.info
info/openocd.info-1
info/openocd.info-2
man/man1/openocd.1.gz
share/info/openocd.info
share/info/openocd.info-1
share/info/openocd.info-2
share/openocd/contrib/60-openocd.rules
share/openocd/contrib/libdcc/dcc_stdio.c
share/openocd/contrib/libdcc/dcc_stdio.h