<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/4970f1bc002259436094665612e6cbc66a3b9247">https://github.com/macports/macports-ports/commit/4970f1bc002259436094665612e6cbc66a3b9247</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 4970f1bc002259436094665612e6cbc66a3b9247
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Fri Dec 30 20:13:25 2022 -0700
<span style='display:block; white-space:pre;color:#404040;'> emscripten: update version 2.0.16->3.1.28
</span>---
lang/emscripten/Portfile | 38 +++++++++++-------------
lang/emscripten/files/emscripten | 17 ++++++-----
lang/emscripten/files/patch-macports_python.diff | 38 ------------------------
lang/emscripten/files/patch-no_git.diff | 24 +++++++--------
4 files changed, 40 insertions(+), 77 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/emscripten/Portfile b/lang/emscripten/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index efc4417fa28..5969eabde4b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/emscripten/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/emscripten/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,7 +4,7 @@ PortSystem 1.0
</span> PortGroup github 1.0
PortGroup java 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-github.setup emscripten-core emscripten 2.0.16
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup emscripten-core emscripten 3.1.28
</span> revision 0
categories lang devel
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,48 +15,46 @@ description open source compiler toolchain to WebAssembly
</span> long_description Emscripten is a complete Open Source compiler toolchain to WebAssembly.
platforms darwin
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 9d75abd59123c34bcb52e1b80fa46f984718b3b2 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 b5254a9b596e46c75d8b40fe4ff1d8c176bfae380051349c132d720feed8a222 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 27458560
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 c5d4793c85d001e4402f9d93d7208fe5486901aa \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 ec9bc3f549827c6b8ba743b55332d4cad8b7283e4412026bdfea22b6aaf83d67 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 28633297
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set pyver 3.9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set python_version [string index ${pyver} 0][string index ${pyver} end]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set python_branch 3.11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.python ${prefix}/bin/python${python_branch}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set python_version [string map {. {}} ${python_branch}]
</span>
set install_loc ${destroot}${prefix}/libexec/${name}
if {${subport} eq ${name}} {
depends_lib-append port:python${python_version}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append bin:npm:npm7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append bin:npm:npm9
</span>
# for building cache libraries
depends_build-append port:git \
path:bin/cmake:cmake
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # clang-devel is being used since emscripten requires Clang >= 13
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # clang-devel is being used since emscripten requires Clang >= 16
</span> depends_run-append port:binaryen \
port:clang-devel \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- bin:node:nodejs15
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bin:node:nodejs18
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append patch-macports_python.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-no_git.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-no_git.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot.env-append PYTHON=${configure.python} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PATH=${frameworks_dir}/Python.framework/Versions/${python_branch}/bin:$env(PATH)
</span>
configure {
# replicate
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # cd ${worksrcpath} && ./emcc --help
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # cd ${worksrcpath} && ./emcc --generate-config
</span> # edit resulting .emscripten
xinstall -m 0644 ${filespath}/emscripten ${worksrcpath}/.emscripten
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|__MACPORTS_EMSCRIPTEN_ROOT__|${prefix}/libexec/${name}|g" ${worksrcpath}/.emscripten
</span> reinplace "s|__MACPORTS_LLVM_ROOT__|${prefix}/libexec/llvm-devel/bin|g" ${worksrcpath}/.emscripten
reinplace "s|__MACPORTS_BINARYEN_ROOT__|${prefix}|g" ${worksrcpath}/.emscripten
reinplace "s|__MACPORTS_NODE_JS__|${prefix}/bin/node|g" ${worksrcpath}/.emscripten
reinplace "s|__MACPORTS_JAVA__|${java.home}/bin/java|g" ${worksrcpath}/.emscripten
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # ensure use of MacPorts python
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|__MACPORTS_PYTHON__|${prefix}/bin/python${pyver}|g" ${worksrcpath}/tools/run_python.sh \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/tools/run_python_compiler.sh \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/tools/install.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W ${worksrcpath} "${prefix}/bin/python${pyver} tools/create_entry_points.py"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath} "${configure.python} tools/create_entry_points.py"
</span> }
build {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -86,11 +84,11 @@ if {${subport} eq ${name}} {
</span> #
# This process also seems to download and build, which should not happen in the destroot phase.
#
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W ${install_loc} "${prefix}/bin/python${pyver} embuilder.py build MINIMAL"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${install_loc} "env PATH=${frameworks_dir}/Python.framework/Versions/${python_branch}/bin:$env(PATH) ${configure.python} embuilder.py build MINIMAL"
</span>
# do not generate new cache libraries
# this must be done *after* running embuilder.py
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|#FROZEN_CACHE|FROZEN_CACHE|g" ${install_loc}/.emscripten
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|# FROZEN_CACHE|FROZEN_CACHE|g" ${install_loc}/.emscripten
</span> }
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/emscripten/files/emscripten b/lang/emscripten/files/emscripten
</span><span style='display:block; white-space:pre;color:#808080;'>index 8c41f1fc2c3..0177f674ef4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/emscripten/files/emscripten
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/emscripten/files/emscripten
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,7 +1,10 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-import os
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-EMSCRIPTEN_ROOT = os.path.expanduser("__MACPORTS_EMSCRIPTEN_ROOT__")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-LLVM_ROOT = os.path.expanduser("__MACPORTS_LLVM_ROOT__")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-BINARYEN_ROOT = os.path.expanduser("__MACPORTS_BINARYEN_ROOT__")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-NODE_JS = os.path.expanduser("__MACPORTS_NODE_JS__")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-JAVA = os.path.expanduser("__MACPORTS_JAVA__")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#FROZEN_CACHE = True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+LLVM_ROOT = '__MACPORTS_LLVM_ROOT__' # directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+BINARYEN_ROOT = '__MACPORTS_BINARYEN_ROOT__' # directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Location of the node binary to use for running the JS parts of the compiler.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This engine must exist, or nothing can be compiled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+NODE_JS = '__MACPORTS_NODE_JS__' # executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+JAVA = '__MACPORTS_JAVA__' # executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# FROZEN_CACHE = True # never clears the cache, and disallows building to the cache
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/emscripten/files/patch-macports_python.diff b/lang/emscripten/files/patch-macports_python.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index c57cb6ea860..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/emscripten/files/patch-macports_python.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,38 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- tools/run_python.sh.orig 2021-03-25 19:00:54.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ tools/run_python.sh 2021-03-27 14:42:53.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -16,11 +16,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if [ -z "$PYTHON" ]; then
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- PYTHON=$(which python3 2> /dev/null)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--fi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--if [ -z "$PYTHON" ]; then
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- PYTHON=$(which python 2> /dev/null)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ PYTHON=__MACPORTS_PYTHON__
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if [ -z "$PYTHON" ]; then
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- tools/run_python_compiler.sh.orig 2021-03-25 19:00:54.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ tools/run_python_compiler.sh 2021-03-28 02:09:41.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -16,11 +16,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if [ -z "$PYTHON" ]; then
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- PYTHON=$(which python3 2> /dev/null)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--fi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--if [ -z "$PYTHON" ]; then
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- PYTHON=$(which python 2> /dev/null)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ PYTHON=__MACPORTS_PYTHON__
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if [ -z "$PYTHON" ]; then
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- tools/install.py.orig 2021-04-03 09:01:45.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ tools/install.py 2021-04-03 09:03:40.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1,4 +1,4 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#!/usr/bin/env python3
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#!__MACPORTS_PYTHON__
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Copyright 2020 The Emscripten Authors. All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Emscripten is available under two separate licenses, the MIT license and the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # University of Illinois/NCSA Open Source License. Both these licenses can be
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/emscripten/files/patch-no_git.diff b/lang/emscripten/files/patch-no_git.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 29e37d73dad..83998b5dd10 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/emscripten/files/patch-no_git.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/emscripten/files/patch-no_git.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,19 +1,19 @@
</span> Avoid:
fatal: not a git repository (or any of the parent directories): .git
<span style='display:block; white-space:pre;background:#e0ffe0;'>+See https://github.com/emscripten-core/emscripten/pull/18441/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> --- tools/install.py.orig 2021-03-06 00:46:36.000000000 -0700
+++ tools/install.py 2021-03-24 17:27:28.000000000 -0700
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -38,9 +38,10 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- def add_revision_file(target):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # text=True would be better than encoding here, but it's only supported in 3.7+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- git_hash = subprocess.check_output(['git', 'rev-parse', 'HEAD'], encoding='utf-8').strip()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- with open(os.path.join(target, 'emscripten-revision.txt'), 'w') as f:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- f.write(git_hash + '\n')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ #git_hash = subprocess.check_output(['git', 'rev-parse', 'HEAD'], encoding='utf-8').strip()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ #with open(os.path.join(target, 'emscripten-revision.txt'), 'w') as f:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ # f.write(git_hash + '\n')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ pass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -95,7 +95,10 @@ def main():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os.makedirs(target)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy_emscripten(target)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- add_revision_file(target)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if os.path.isdir('.git'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Add revision flag only if the source directory is a Git repository
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # and not a source archive
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ add_revision_file(target)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- def copy_emscripten(target):
</span></pre><pre style='margin:0'>
</pre>