diff options
author | davidovski <david@davidovski.xyz> | 2022-03-05 23:51:45 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-03-05 23:51:45 +0000 |
commit | 80220d777d783fc0b11c491f0c93eb712d38e427 (patch) | |
tree | e7d84e50f6a3c41c25d8808fa6aa746a24a3a88f /repo/system/js78.xibuild | |
parent | 5bbf53467cd7b68557d8e37332968081c64e9908 (diff) |
fixed up js78
Diffstat (limited to 'repo/system/js78.xibuild')
-rw-r--r-- | repo/system/js78.xibuild | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/repo/system/js78.xibuild b/repo/system/js78.xibuild new file mode 100644 index 0000000..39eb45c --- /dev/null +++ b/repo/system/js78.xibuild @@ -0,0 +1,64 @@ +#!/bin/sh + +MAKEDEPS="gcc autoconf2-13 icu rustc zlib which zip clang llvm patch make" +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=" + patches/js78/disable-jslint.patch + patches/js78/fd6847c9416f9eebde636e21d794d25d1be8791d.patch + patches/js78/fix-musl-build.patch + patches/js78/fix-python3.10-compilation.patch + " + +DESC="JavaScript interpreter and libraries - Version 78" + +prepare () { + apply_patches + export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576" + + + autoreconf -fi + + mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm + export PATH=/opt/rustc/bin:$PATH + export LD_LIBRARY_PATH=/opt/rustc/lib:$LD_LIBRARY_PATH + export RUST_TARGET="x86_64" +} + +build () { + mkdir build && + cd build && + + SHELL=/bin/bash PYTHON=/usr/bin/python3 \ + ../js/src/configure --prefix=/usr \ + --with-clang-path=/usr/bin/clang \ + --with-intl-api \ + --with-libclang-path=/usr/lib \ + --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 -j1 + +} + +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 +} |