description="JS is Mozilla's JavaScript engine written in C."
url="https://people.mozilla.org"

packager="tnut <tnut@nutyx.org>"

makedepends=(autoconf2-13 icu libffi nspr python2 zip)

name=js60
version=60.8.0
release=4

source=( https://download.gnome.org/teams/releng/tarballs-needing-help/mozjs/mozjs-$version.tar.bz2)

build() {

  cd mozjs-$version

  mkdir mozjs-build
  cd    mozjs-build

  ../js/src/configure --prefix=/usr       \
              --with-intl-api     \
              --with-system-zlib  \
              --with-system-nspr  \
              --with-system-icu   \
              --disable-jemalloc  \
              --enable-readline

  make

  make DESTDIR=$PKG install

  # static
  rm $PKG/usr/lib/libjs_static.ajs
}
