summaryrefslogtreecommitdiff
path: root/repo/js78/js78.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/js78/js78.xibuild
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/js78/js78.xibuild')
-rw-r--r--repo/js78/js78.xibuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/repo/js78/js78.xibuild b/repo/js78/js78.xibuild
new file mode 100644
index 0000000..9e553ed
--- /dev/null
+++ b/repo/js78/js78.xibuild
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+MAKEDEPS="gcc autoconf2-13 icu rust zlib which zip clang llvm patch make python-six python-mach"
+DEPS="readline nspr bash zlib"
+
+PKG_VER=78.15.0
+SOURCE=https://archive.mozilla.org/pub/firefox/releases/${PKG_VER}esr/source/firefox-${PKG_VER}esr.source.tar.xz
+ADDITIONAL="
+ disable-jslint.patch
+ fd6847c9416f9eebde636e21d794d25d1be8791d.patch
+ fix-musl-build.patch
+ fix-python3.10-compilation.patch
+ fix-rust-target.patch
+ "
+
+DESC="JavaScript interpreter and libraries - Version 78"
+
+prepare () {
+ apply_patches
+ export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576"
+
+ mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm
+ export RUST_TARGET="x86_64-unknown-linux-musl"
+ export CFLAGS="$CFLAGS -no-pie" CXXFLAGS="$CXXFLAGS -no-pie"
+}
+
+build () {
+ mkdir build
+ cd build
+
+ SHELL=/bin/bash PYTHON=/usr/bin/python3 \
+ ../js/src/configure --prefix=/usr \
+ --with-intl-api \
+ --with-system-icu \
+ --with-system-nspr \
+ --with-system-zlib \
+ --enable-ctypes \
+ --enable-hardening \
+ --enable-optimize="$CFLAGS -O2" \
+ --enable-readline \
+ --enable-release \
+ --enable-shared-js \
+ --enable-system-ffi \
+ --enable-tests \
+ --disable-debug \
+ --disable-debug-symbols \
+ --disable-jemalloc \
+ --disable-strip
+
+ make
+}
+
+check () {
+ dist/bin/jsapi-tests \
+ --format=none \
+ --exclude-random \
+ basic
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+ [ -f $PKG_DEST/usr/lib/libjs_static.ajs ] && rm $PKG_DEST/usr/lib/libjs_static.ajs
+ sed -i '/@NSPR_CFLAGS@/d' $PKG_DEST/usr/bin/js78-config
+}