# $Id$ PNAME="spidermonkey" PVER="52.7.3" PBUILD="r1" PCAT="dev-java" DESCRIPTION="SpiderMonkey is the code-name for the Mozilla's C implementation of JavaScript." HOMEPAGE="https://developer.mozilla.org/en-US/docs/SpiderMonkey" DEPEND=">= sys-libs/zlib-1.2 >= sys-libs/readline-7 >= sys-libs/libstdc++-7.3" SDEPEND=">= dev-lang/python-2.7 >= app-arch/zip-3" # direct mecurial export SRCFILE="FIREFOX_${PVER//./_}esr_RELEASE.tar.bz2" SRCDIR="${BUILDDIR}/mozilla-unified-FIREFOX_${PVER//./_}esr_RELEASE" EMUL_LINUX_32=true sminclude multilib msetfeature "!check" SRC_URI=( #https://hg.mozilla.org/mozilla-unified/archive/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-fix-soname.patch mirror://${PNAME}/${PNAME}-${PVER}-copy-headers.patch mirror://${PNAME}/${PNAME}-${PVER}-disable-mozglue.patch mirror://${PNAME}/${PNAME}-${PVER}-include-configure-script.patch ) UP2DATE="updatecmd https://hg.mozilla.org/mozilla-unified/tags | grep '/FIREFOX_.*esr_RELEASE' | sed -e 's:.*/FIREFOX_\(.*\)esr_RELEASE:\1:' -e 's:_:\.:g' | upsort_pipe" src_prepare() { munpack ${SRCFILE} || die mpatch ${PNAME}-${PVER}-fix-soname.patch || die mpatch ${PNAME}-${PVER}-copy-headers.patch || die mpatch ${PNAME}-${PVER}-disable-mozglue.patch || die mpatch ${PNAME}-${PVER}-include-configure-script.patch || die } src_compile() { export CFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp -flto=3' export CXXFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp -flto=3' export CC=gcc export CXX=g++ export PYTHON=/usr/bin/python2 SRCSUBDIR="js/src" \ mconfigure \ --disable-debug \ --disable-debug-symbols \ --disable-strip \ --enable-gold \ --enable-optimize="-O2" \ --enable-pie \ --enable-posix-nspr-emulation \ --enable-readline \ --enable-release \ --enable-shared-js \ --enable-tests \ --with-intl-api \ --with-system-zlib \ --without-system-icu \ || die SRCSUBDIR="js/src" mmake || die } src_install() { SRCSUBDIR="js/src" mmake DESTDIR=${BINDIR} install || die }