# Contributor: Rasmus Thomsen # Maintainer: Rasmus Thomsen pkgname=mozjs60 pkgver=60.8.0 _majver=${pkgver%%.*} pkgrel=0 pkgdesc="standalone mozilla javascript engine" url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/60" arch="all" license="MPL-2.0" depends_dev="icu-dev nspr-dev libffi-dev readline-dev" makedepends="$depends_dev zlib-dev python2 python2-dev perl sed autoconf2.13 linux-headers" subpackages="$pkgname-dev" source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz 0001-silence-sandbox-violations.patch fix-musl-build.patch fix-soname-lib.patch big-endian.patch " builddir="$srcdir"/firefox-$pkgver _builddir="$builddir/js/src" # secfixes: # 60.7.2-r0: # - CVE-2019-11708 # - CVE-2019-11707 build() { cd "$_builddir" export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576" # avoid complains about autoconf touch configure # Fix broken ARM_ARCH check which doesn't work with newer GCCs it seems. case "$CTARGET" in armv*) ARM_ARCH=$(echo ${CTARGET#*armv} | sed "s|-.*||") sed -i "s|ARM_ARCH=.*|ARM_ARCH=$ARM_ARCH|" "$builddir"/build/autoconf/arch.m4 ;; esac export SHELL=/bin/ash PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ --with-system-icu \ --with-system-nspr \ --with-system-zlib \ --with-intl-api \ --enable-ctypes \ --enable-shared-js \ --enable-readline \ --enable-system-ffi \ --disable-optimize \ --disable-jemalloc \ --enable-pie make } check() { cd "$_builddir" dist/bin/jsapi-tests } package() { cd "$_builddir" make DESTDIR="$pkgdir" install rm -f "$pkgdir"/usr/lib/*.ajs } sha512sums="0332b6049b97e488e55a3b9540baad3bd159e297084e9a625b8492497c73f86eb3e144219dabc5e9f2c2e4a27630d83d243c919cd4f86b7f59f47133ed3afc54 firefox-60.8.0esr.source.tar.xz adaacd6e087a07bd4ded598f6a66ee00c67c9092bb93d88729668516f6f00f497ad8ece1866680e6c371e4705e0f9194ade41ea3a986f793bd972c92029cf03a 0001-silence-sandbox-violations.patch bc91c2fb15eb22acb8acc36d086fb18fbf6f202b4511d138769b5ecaaed4a673349c55f808270c762616fafa42e3b01e74dc0af1dcbeea1289e043926e2750c8 fix-musl-build.patch 4782794a0f409f767293fb5f61a9ad58985e05197538975ed8f7372bfae6921a3b9bcbbbfcf8ce2843cdfe8ee799d08cee71a6391ed5ae939f051d13038b0960 fix-soname-lib.patch d9d587b614e2a08131688cac9bc3c78ffea96a79c7bcf8ae51ce208de5001250e0cd6f03269e1e09a387afcbc003c6f4446eb25411f65ad3073ed06539d7f74b big-endian.patch"