mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-20 23:44:08 +00:00
Add --build-archive to spidermonkey build.sh
This option allows to build the spidermonky archive hosted by WFG from the upstream firefox tarball. First this serves as documentation as to how the taball is created and by integrating it into the regular build process allows to easely bump spidermonky version for local testing. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
@@ -6,20 +6,38 @@ set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# This should match the version in config/milestone.txt
|
||||
FOLDER="mozjs-115.16.1"
|
||||
PV=115.16.1
|
||||
FOLDER="mozjs-${PV}"
|
||||
# If same-version changes are needed, increment this.
|
||||
LIB_VERSION="115.16.1+5"
|
||||
LIB_VERSION="${PV}+wfg6"
|
||||
LIB_NAME="mozjs115"
|
||||
|
||||
build_archive()
|
||||
{
|
||||
if [ ! -e "firefox-${PV}esr.source.tar.xz" ]; then
|
||||
curl -fLo "firefox-${PV}esr.source.tar.xz" \
|
||||
"https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz"
|
||||
fi
|
||||
|
||||
rm -Rf firefox-${PV}
|
||||
rm -Rf mozjs-${PV}.tar.xz
|
||||
${TAR} -xJf firefox-${PV}esr.source.tar.xz
|
||||
|
||||
DIST="$(realpath .)" STAGING="$(realpath .)/firefox-${PV}/mozjs-src-pkg" firefox-${PV}/js/src/make-source-package.py build
|
||||
}
|
||||
|
||||
fetch()
|
||||
{
|
||||
curl -fLo "${FOLDER}.tar.xz" \
|
||||
"https://releases.wildfiregames.com/libs/${FOLDER}.tar.xz"
|
||||
}
|
||||
|
||||
echo "Building SpiderMonkey..."
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--build-archive)
|
||||
build_archive
|
||||
exit
|
||||
;;
|
||||
--fetch-only)
|
||||
fetch
|
||||
exit
|
||||
@@ -33,6 +51,8 @@ while [ "$#" -gt 0 ]; do
|
||||
shift
|
||||
done
|
||||
|
||||
echo "Building SpiderMonkey..."
|
||||
|
||||
if [ -e .already-built ] && [ "$(cat .already-built || true)" = "${LIB_VERSION}" ]; then
|
||||
echo "Skipping - already built (use --force-rebuild to override)"
|
||||
exit
|
||||
@@ -44,7 +64,7 @@ OS="${OS:=$(uname -s)}"
|
||||
# This tarball is built from https://ftp.mozilla.org/pub/firefox/releases/115.16.1esr/source/
|
||||
# by running js/src/make-source-package.py
|
||||
if [ ! -e "${FOLDER}.tar.xz" ]; then
|
||||
fetch
|
||||
fetch || build_archive
|
||||
fi
|
||||
|
||||
# unpack
|
||||
|
||||
Reference in New Issue
Block a user