git: e316141d4556 - main - devel/emscripten: update 3.1.69 → 3.1.74
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Jan 2025 03:03:35 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e316141d455684ff4a0fe3ebe4f2db25273e9d00
commit e316141d455684ff4a0fe3ebe4f2db25273e9d00
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-01-03 03:02:14 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-01-03 03:03:31 +0000
devel/emscripten: update 3.1.69 → 3.1.74
PR: 282977
---
devel/emscripten/Makefile | 21 ++++++++++++-------
devel/emscripten/distinfo | 6 +++---
devel/emscripten/files/hello_world.c | 7 +++++++
devel/emscripten/files/patch-emcc.py | 15 +++++++++++++
devel/emscripten/files/patch-tools_building.py | 13 ++++++++++++
devel/emscripten/files/patch-tools_config.py | 14 +++++++++++++
devel/emscripten/pkg-plist | 29 ++++++++++++++++++--------
7 files changed, 86 insertions(+), 19 deletions(-)
diff --git a/devel/emscripten/Makefile b/devel/emscripten/Makefile
index a532bc26e3d6..874d2bdaa603 100644
--- a/devel/emscripten/Makefile
+++ b/devel/emscripten/Makefile
@@ -1,17 +1,20 @@
PORTNAME= emscripten
-DISTVERSION= 3.1.69
-PORTREVISION= 1
+DISTVERSION= 3.1.74
CATEGORIES= devel www
MAINTAINER= yuri@FreeBSD.org
COMMENT= LLVM-to-Web Compiler
-WWW= https://emscripten.org/
+WWW= https://emscripten.org/ \
+ https://github.com/emscripten-core/emscripten
LICENSE= MIT NCSA
LICENSE_COMB= dual
+# USES doesn't support llvm:devel, so we add it here:
+BUILD_DEPENDS= llvm-devel>0:devel/llvm-devel
RUN_DEPENDS= bash:shells/bash \
- binaryen>0:devel/binaryen
+ binaryen>0:devel/binaryen \
+ 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= nodejs:run python shebangfix
@@ -19,9 +22,6 @@ USES= nodejs:run python shebangfix
USE_GITHUB= yes
GH_ACCOUNT= emscripten-core
-# USES doesn't support llvm:devel, so we add this
-BUILD_DEPENDS= llvm-devel>0:devel/llvm-devel
-RUN_DEPENDS= llvm-devel>0:devel/llvm-devel
LLVM_VERSION= -devel
SHEBANG_FILES= ${PYSCRIPTS} emcmake system/bin/sdl-config system/bin/sdl2-config
@@ -66,4 +66,11 @@ do-test: # some tests fail: Unknown option '--no-stack-ir', see https://github.c
${SETENV} ${TEST_ENV} test/runner core3.test_*i64* && \
${SETENV} ${TEST_ENV} test/runner wasm2js1
+test-quick: install
+ @cd ${WRKSRC} && \
+ ${ECHO} "==> Running the test" && \
+ ${PREFIX}/bin/emcc ${FILESDIR}/hello_world.c && \
+ node a.out.js && \
+ ${ECHO} "Test succeeded."
+
.include <bsd.port.mk>
diff --git a/devel/emscripten/distinfo b/devel/emscripten/distinfo
index cd44d86bc8a1..ff59b4588a9c 100644
--- a/devel/emscripten/distinfo
+++ b/devel/emscripten/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1728713755
-SHA256 (emscripten-core-emscripten-3.1.69_GH0.tar.gz) = 3ceb2acbf3551146753c1abef8feb24347403bf13713820ea9dddbd946f9e4ac
-SIZE (emscripten-core-emscripten-3.1.69_GH0.tar.gz) = 29647431
+TIMESTAMP = 1735849423
+SHA256 (emscripten-core-emscripten-3.1.74_GH0.tar.gz) = 07bc112871a4992a9e4bac5131f2f28554e47f826adeca40943144b159ddb700
+SIZE (emscripten-core-emscripten-3.1.74_GH0.tar.gz) = 32204258
diff --git a/devel/emscripten/files/hello_world.c b/devel/emscripten/files/hello_world.c
new file mode 100644
index 000000000000..c653c27ab24c
--- /dev/null
+++ b/devel/emscripten/files/hello_world.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+
+int main() {
+ printf("Hello World!\n");
+ return 0;
+}
diff --git a/devel/emscripten/files/patch-emcc.py b/devel/emscripten/files/patch-emcc.py
new file mode 100644
index 000000000000..9e5ea7a0b3b2
--- /dev/null
+++ b/devel/emscripten/files/patch-emcc.py
@@ -0,0 +1,15 @@
+-- default cache location to ~/.cache/emscripten
+-- see also https://github.com/emscripten-core/emscripten/issues/23284
+
+--- emcc.py.orig 2025-01-02 23:47:04 UTC
++++ emcc.py
+@@ -1143,6 +1143,9 @@ def parse_args(newargs): # noqa: C901, PLR0912, PLR09
+ should_exit = False
+ skip = False
+
++ if not config.CACHE:
++ config.CACHE = f"{os.environ['HOME']}/.cache/emscripten"
++
+ for i in range(len(newargs)):
+ if skip:
+ skip = False
diff --git a/devel/emscripten/files/patch-tools_building.py b/devel/emscripten/files/patch-tools_building.py
new file mode 100644
index 000000000000..2b148e657156
--- /dev/null
+++ b/devel/emscripten/files/patch-tools_building.py
@@ -0,0 +1,13 @@
+-- disable binaryen version checking
+
+--- tools/building.py.orig 2025-01-03 00:10:44 UTC
++++ tools/building.py
+@@ -1169,7 +1169,7 @@ def check_binaryen(bindir):
+
+ # Allow the expected version or the following one in order avoid needing to update both
+ # emscripten and binaryen in lock step in emscripten-releases.
+- if version not in (EXPECTED_BINARYEN_VERSION, EXPECTED_BINARYEN_VERSION + 1):
++ if False and version not in (EXPECTED_BINARYEN_VERSION, EXPECTED_BINARYEN_VERSION + 1):
+ diagnostics.warning('version-check', 'unexpected binaryen version: %s (expected %s)', version, EXPECTED_BINARYEN_VERSION)
+
+
diff --git a/devel/emscripten/files/patch-tools_config.py b/devel/emscripten/files/patch-tools_config.py
new file mode 100644
index 000000000000..2170598198c5
--- /dev/null
+++ b/devel/emscripten/files/patch-tools_config.py
@@ -0,0 +1,14 @@
+-- default cache location to ~/.cache/emscripten
+-- see also https://github.com/emscripten-core/emscripten/issues/23284
+
+--- tools/config.py.orig 2025-01-02 23:51:05 UTC
++++ tools/config.py
+@@ -33,7 +33,7 @@ FROZEN_CACHE = None
+ WASMTIME = None
+ WASM_ENGINES: List[List[str]] = []
+ FROZEN_CACHE = None
+-CACHE = None
++CACHE = f"{os.environ['HOME']}/.cache/emscripten"
+ PORTS = None
+ COMPILER_WRAPPER = None
+
diff --git a/devel/emscripten/pkg-plist b/devel/emscripten/pkg-plist
index 8e93dd37652f..2c9307d0d4d4 100644
--- a/devel/emscripten/pkg-plist
+++ b/devel/emscripten/pkg-plist
@@ -62,11 +62,24 @@ lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/readme.txt
lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/search.html
lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/searchbox.html
lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/badge_only.css
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff2
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff2
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.eot
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.svg
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.ttf
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff2
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff2
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-bold.woff
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-bold.woff2
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff2
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-normal.woff
+lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/fonts/lato-normal.woff2
lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/css/theme.css
-lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot
-lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg
-lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf
-lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff
lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/static/js/theme.js
lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/theme.conf
lib/emscripten/site/source/_themes/emscripten_sphinx_rtd_theme/versions.html
@@ -231,7 +244,6 @@ lib/emscripten/src/library_jsfilefs.js
lib/emscripten/src/library_legacy.js
lib/emscripten/src/library_little_endian_heap.js
lib/emscripten/src/library_lz4.js
-lib/emscripten/src/library_makeDynCall.js
lib/emscripten/src/library_math.js
lib/emscripten/src/library_memfs.js
lib/emscripten/src/library_memoryprofiler.js
@@ -279,9 +291,6 @@ lib/emscripten/src/parseTools.mjs
lib/emscripten/src/parseTools_legacy.mjs
lib/emscripten/src/polyfill/atob.js
lib/emscripten/src/polyfill/bigint64array.js
-lib/emscripten/src/polyfill/fetch.js
-lib/emscripten/src/polyfill/objassign.js
-lib/emscripten/src/polyfill/promise.js
lib/emscripten/src/postamble.js
lib/emscripten/src/postamble_minimal.js
lib/emscripten/src/postamble_modularize.js
@@ -3965,7 +3974,6 @@ lib/emscripten/system/lib/libunwind/include/__libunwind_config.h
lib/emscripten/system/lib/libunwind/include/libunwind.h
lib/emscripten/system/lib/libunwind/include/libunwind.modulemap
lib/emscripten/system/lib/libunwind/include/mach-o/compact_unwind_encoding.h
-lib/emscripten/system/lib/libunwind/include/mach-o/compact_unwind_encoding.modulemap
lib/emscripten/system/lib/libunwind/include/unwind.h
lib/emscripten/system/lib/libunwind/include/unwind_arm_ehabi.h
lib/emscripten/system/lib/libunwind/include/unwind_itanium.h
@@ -4013,8 +4021,10 @@ lib/emscripten/system/lib/mimalloc/src/alloc.c
lib/emscripten/system/lib/mimalloc/src/arena.c
lib/emscripten/system/lib/mimalloc/src/bitmap.c
lib/emscripten/system/lib/mimalloc/src/bitmap.h
+lib/emscripten/system/lib/mimalloc/src/free.c
lib/emscripten/system/lib/mimalloc/src/heap.c
lib/emscripten/system/lib/mimalloc/src/init.c
+lib/emscripten/system/lib/mimalloc/src/libc.c
lib/emscripten/system/lib/mimalloc/src/options.c
lib/emscripten/system/lib/mimalloc/src/os.c
lib/emscripten/system/lib/mimalloc/src/page-queue.c
@@ -4073,6 +4083,7 @@ lib/emscripten/system/lib/update_libunwind.py
lib/emscripten/system/lib/update_musl.py
lib/emscripten/system/lib/wasm_worker/library_wasm_worker.c
lib/emscripten/system/lib/wasm_worker/library_wasm_worker_stub.c
+lib/emscripten/system/lib/wasm_worker/wasm_worker_initialize.S
lib/emscripten/system/lib/wasmfs/backend.h
lib/emscripten/system/lib/wasmfs/backends/fetch_backend.cpp
lib/emscripten/system/lib/wasmfs/backends/fetch_backend.h