diff --git a/mingw-w64-emscripten/PKGBUILD b/mingw-w64-emscripten/PKGBUILD index b768cbe700..e7276a3c8f 100644 --- a/mingw-w64-emscripten/PKGBUILD +++ b/mingw-w64-emscripten/PKGBUILD @@ -6,9 +6,10 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") # Sadly, upstream currently suggests bundling a binaryen version for the time being: # https://github.com/emscripten-core/emscripten/issues/12252 # I'm obviously unhappy about that but it appears to be the only practical solution for the time being. -pkgver=3.1.46 -_binaryen_revision=16a59938563c93d8459bf36679c83497aeba7cc7 -_llvm_project_revision=75501f53624de92aafce2f1da698b249a7293dc7 +pkgver=3.1.51 +# NOTE: You need to run ./get-compatible-versions.sh after changing the pkgver! +_binaryen_revision=9e636855b582d1499a87fb73f55d85102ce95a58 +_llvm_project_revision=f2464ca317bfeeedddb7cbdea3c2c8ec487890bb pkgrel=1 pkgdesc="Compile C and C++ into highly-optimizable JavaScript for the web (mingw-w64)" arch=('any') diff --git a/mingw-w64-emscripten/get-compatible-versions.sh b/mingw-w64-emscripten/get-compatible-versions.sh new file mode 100644 index 0000000000..ae621b7deb --- /dev/null +++ b/mingw-w64-emscripten/get-compatible-versions.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# Get compatible versions of binaryen and llvm +# +# How to use: +# Change pkgver in PKGBUILD to desired version and then run ./get-compatible-versions.sh. +# This will fetch, print and substitute into the PKGBUILD the compatible binaryen and llvm versions. + +pkgver=$(makepkg --printsrcinfo | sed -rn 's/.*pkgver = (.*)/\1/gp') +tag_hash=$(curl -Ls https://github.com/emscripten-core/emsdk/raw/main/emscripten-releases-tags.json | jq ".releases[\"$pkgver\"]" | sed s/\"//g) +deps_file=$(curl -Ls "https://chromium.googlesource.com/emscripten-releases/+/$tag_hash/DEPS?format=TEXT" | base64 -d) +binaryen_revision=$(echo "$deps_file" | sed -rn "s/.*'binaryen_revision': '(.*)',/\\1/gp") +llvm_project_revision=$(echo "$deps_file" | sed -rn "s/.*'llvm_project_revision': '(.*)',/\\1/gp") +sed -i "s/_binaryen_revision=.*/_binaryen_revision=$binaryen_revision/g" PKGBUILD +sed -i "s/_llvm_project_revision=.*/_llvm_project_revision=$llvm_project_revision/g" PKGBUILD