summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-11-09 20:28:16 +0100
committerThomas Deutschmann <whissi@gentoo.org>2020-11-09 20:28:16 +0100
commit04205912f54fdf4a780684dc3ab29da1a8929909 (patch)
tree21a5df8014755f8330c5a9f019cf08d6519958dd /dev-lang/spidermonkey
parentdev-lang/spidermonkey: bump to v78.4.1 (diff)
downloadgentoo-04205912f54fdf4a780684dc3ab29da1a8929909.tar.gz
gentoo-04205912f54fdf4a780684dc3ab29da1a8929909.tar.bz2
gentoo-04205912f54fdf4a780684dc3ab29da1a8929909.zip
dev-lang/spidermonkey: security cleanup
Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-lang/spidermonkey')
-rw-r--r--dev-lang/spidermonkey/Manifest4
-rw-r--r--dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild281
-rw-r--r--dev-lang/spidermonkey/spidermonkey-78.4.0.ebuild303
3 files changed, 0 insertions, 588 deletions
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 7c7e0e877d3d..77d22378a948 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -1,16 +1,12 @@
DIST firefox-68.0-patches-15.tar.xz 16060 BLAKE2B f9e6cd58ea51bed1af90a9d30fd551dc7e939afcd1b4d00de1271bd4bda94021c6f1799fd9945962c14ffa1fd0b6a6429369c4e45efc2000f179b9b2e46971e7 SHA512 9cb2479637dd8b84e0ab68dc0fe144acd2dc74feca282fd3c4b485ca6f0de8190244587622713a5421b243ccda153f738e9a8f463e87e15e93e9b725d943e128
DIST firefox-68.12.0esr.source.tar.xz 313856956 BLAKE2B eeaa4acc9fabf15ec1b313170a30cee8e1fc10a8b08512b915b83b7d6a81c09b365733ed94638bd434864fd7b0cb8cbf1bc2e43441be69e31117e8e6a099234c SHA512 839b02422e4c87bdb12e0995cd35ca8c1996f3fba00bbb46b419e46b67df5ec48a264cb14632db777ce29166ee4fdcb06e2ee3ce847e64328c58c9a2f9129f4c
-DIST firefox-78.3.1esr.source.tar.xz 339088596 BLAKE2B 27e594a23b111b937ed277ddafa99c07fa9ee003cbd6b7c6cbdc4428e54769ec9ec1961653c1ec127d7adf159ff8b3be08ebbdefb0d11f1ac21717ffde9461b3 SHA512 162860df8e4ef7322e91924bd4aae731a49dbd9829f02b306e4e5acc69c611f4a1e5727c3857b2f98e951745a3b1d8f550966105badc095205644d1ad7f5a340
-DIST firefox-78.4.0esr.source.tar.xz 335094656 BLAKE2B 6c3e85353b52465e00393bed14dc067cf1663ce1d7d737de1d51ec6c747c465f998600ed5a03b1a5b116a65054f1addb31a23e8e0d8364a2763e3dab693d016b SHA512 d9de975e9acf7dab6186db877fe2df87a0e9e3c016e884473ecb188025a31032b1fe7f202598285970ed7a48268c7f3e265657708725da4eb7846db85a036246
DIST firefox-78.4.1esr.source.tar.xz 334673424 BLAKE2B 3ba8bf545c4c2b92914bf7f63b539ba61dc2ee6c14fb8995a6d75adb4bd11988f1d47d2c64639cbecf7a4b01b99085e63af4eb3afc7a27047f03048ffa9c2c2d SHA512 287096ad67e86b307554475c3b5d1003a325d6d13987bfbec2ec79aa0f8004dce1614ab62585ba5cf153545618906ab640cd4657d5a910085afb3d8ceb46e8de
DIST firefox-78esr-patches-04.tar.xz 171504 BLAKE2B d51e55c255d1f5cfa0c7c030b1ea50cb54951bed3bc21b21f5cb3b1e4b8b2ad406b3d12db2baabd4a90e3c88a38f187f277e7a4afe441ea6cf82c48f84bb0ac5 SHA512 6f00ec898fafb34d7c7e0ff2a6fb5c1cbf1205458845e14eb39c131125c5bf6b2418fea1050bb72449ec40e18fd775fc844437ce0290281d66961de40a53235a
-DIST firefox-esr-78-patches-03.tar.xz 172416 BLAKE2B 2d67e793e4f4bde447a3a3f3296d1c5ea6c92843439f87e0ab08b51d2f0dd74f0d37762807a1f24853e56f7987e18af65f010027602e32d40a3444c7e418ef47 SHA512 86f35b89ad573c10b839b1631149c6fce3374943d101a6496c40a69a813525826cb2bac4926fc7813dca334c9dcca534e0a963b0725ac3f95fbd3a1c2bf8dc3e
DIST js185-1.0.0.tar.gz 6164605 BLAKE2B 76a37f0ceae05d3475853875bd0ce4be6e525e4114816f8f281ea6fc6b60a71060975a0fa1cb843f57ad1e2f842dfb26b24244fa0fd6c20f6ae2ebbe430f70be SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718
DIST mozjs-52.9.1pre1.tar.bz2 30178574 BLAKE2B 0920432b5140e78297a9bcbccb54268d75a223d5e75e4ff90b3b01aab4f7736b4a4e05c47b3a925ff0a74607a0abad3b6583c75d070ef5142009b20ebaf6e4bf SHA512 187b231b246a5ae09e55c0fef77866b316d75f38f4c2e066d5d4325d8da63433027020c929439cab46af3253ac63ab2f780223a8fd2c6ff535b3409bb6c4aa0f
DIST mozjs-60.5.2.tar.bz2 32816585 BLAKE2B 45ac4c9646e1275faf60eeedbf486f802cd106583eb7f640fe2243adc7cbb811dced5cefa94426cceca63468b0112be84078ffcef24cb2b8c1a7b6c8173c0d45 SHA512 5fb73330e7803bdd524fbe7cfdf4e6b72e85d4b22b0c827400317b5d052d1088d36e558ceac376393089e9d03e658b24e69262851fc04a66bbcda47135423dc0
DIST spidermonkey-52.0-patches-1.tar.xz 3112 BLAKE2B d8f4c44cb2ae290fa51efc4725a2c1b3cd85dd9f04f4ccfa5681ba6df5f37f5d8d4ad6859316a70d0f7647ac2cee014d126f88b7d4ca74a82796f35b141200ef SHA512 5328403e3b9ecd1c456037e7cca374c2453d9331752c48b9466e498e22fd8d4ca6e1804e51140ee0be027fcef7d0c3f26822b1f569305a3b2f03209b7fb15499
DIST spidermonkey-60.0-patches-04.tar.xz 4428 BLAKE2B af78049cd9b3ee6a9b689e6253486c4670fd3b506faade7d745dafaa7af329c0bd15cd35e95528a4c96688230f4803130967fb09b97aae2bda0ce0f73acaaf3e SHA512 fb1326a81512146ba98773d4f7e0c4bc1bff0f076897c13f576fcf63b56f6965efeff633eea9160bca9f9bc4546505901084eabc33bc955de0b7ab3d6334387a
DIST spidermonkey-68.6.0-patches-04.tar.xz 5956 BLAKE2B b1250391a5173e676272d5926b710c06b0e9de1ff03b130a57fdac30f2deefbee3fa92250b37e28087572fe5cce73eb112ef4e1fb0c0401d6ecdb22ab9868998 SHA512 94575b11b4f006c6ee0c8d64b315734a173cecb68e9128ca61ba1a28177e3c149b8cf1f3b3c47a7a263fad8da6196fc0101df87392f016686a827e0cd24fdc74
-DIST spidermonkey-78-patches-01.tar.xz 2100 BLAKE2B 5001c30c395c3ad4f77eb2c3f542f5547184b9c7493988b9433a175853983020b4c450efb674ea94e2575be50f9aff36d0e1418777327b7c806c52e37e8be556 SHA512 d31a037ebdda4a1b9d9a53881f5e5d3d547349b3fe4a0dbcf1c1cd27ff8076ee71186f080358fde586af8305cc82283c5fa67f4101637272078d057100a24065
DIST spidermonkey-78-patches-02.tar.xz 3432 BLAKE2B 3ac46306f1740e704ed1aa8cb0f2a963d0b94bee60349ce31bc0ac477942781c9cdfa1d791a22e31c9258ade5d955cf6d32696ced73247777a908cb3e5c464c2 SHA512 d94c33d327d07072aa5ca66135ab2100e86acf38e091bf5b9644c537f77fb734433246a2f4bf58bf76d884510bce565b6ab75c23472be7e9d1f566dc4e812b5c
DIST spidermonkey-slot0-patches-02.tar.xz 10952 BLAKE2B fb7bf5cdac6c821a48d407ff172fe0ec7297e047d3b3bab952f226f413b83ea70325175b41c1680725ff588111b424efc97a0c66e392989da510c43d38528ff1 SHA512 cd62890c4b58658d99fc1b52f05ccb35c07da835b168bb9d5e6b219de5021122c199cc2255c5b0be01ef582f53dd51c9975921e6bde9f14e9b43536e2bee85f2
diff --git a/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild b/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
deleted file mode 100644
index e94dbd3d5733..000000000000
--- a/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
+++ /dev/null
@@ -1,281 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python3_{6..9} )
-
-WANT_AUTOCONF="2.1"
-
-inherit autotools check-reqs flag-o-matic multiprocessing python-any-r1 toolchain-funcs
-
-MY_PN="mozjs"
-MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
-
-MY_MAJOR=$(ver_cut 1)
-
-MOZ_ESR="1"
-
-# Convert the ebuild version to the upstream mozilla version
-MOZ_PV="${MY_PV/_alpha/a}" # Handle alpha for SRC_URI
-MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
-MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
-
-if [[ ${MOZ_ESR} == 1 ]] ; then
- # ESR releases have slightly different version numbers
- MOZ_PV="${MOZ_PV}esr"
-fi
-
-# Patch version
-FIREFOX_PATCHSET="firefox-esr-78-patches-03.tar.xz"
-SPIDERMONKEY_PATCHSET="spidermonkey-78-patches-01.tar.xz"
-
-MOZ_HTTP_URI="https://archive.mozilla.org/pub/firefox/releases"
-MOZ_SRC_URI="${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz"
-
-if [[ "${PV}" == *_rc* ]]; then
- MOZ_HTTP_URI="https://archive.mozilla.org/pub/firefox/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
- MOZ_SRC_URI="${MOZ_HTTP_URI}/source/firefox-${MOZ_PV}.source.tar.xz"
-fi
-
-PATCH_URIS=(
- https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${FIREFOX_PATCHSET}
- https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
-)
-
-SRC_URI="${MOZ_SRC_URI}
- ${PATCH_URIS[@]}"
-
-DESCRIPTION="SpiderMonkey is Mozilla's JavaScript engine written in C and C++"
-HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~s390 ~x86"
-
-SLOT="78"
-LICENSE="MPL-2.0"
-IUSE="cpu_flags_arm_neon debug +jit lto test"
-
-RESTRICT="!test? ( test )"
-
-BDEPEND="${PYTHON_DEPS}
- sys-devel/llvm
- >=virtual/rust-1.41.0
- virtual/pkgconfig"
-
-CDEPEND=">=dev-libs/icu-67.1:=
- >=dev-libs/nspr-4.25
- sys-libs/readline:0=
- >=sys-libs/zlib-1.2.3"
-
-DEPEND="${CDEPEND}
- test? (
- $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
- )"
-
-RDEPEND="${CDEPEND}"
-
-S="${WORKDIR}/firefox-${MY_PV}/js/src"
-
-python_check_deps() {
- if use test ; then
- has_version "dev-python/six[${PYTHON_USEDEP}]"
- fi
-}
-
-pkg_pretend() {
- if use test ; then
- CHECKREQS_DISK_BUILD="6400M"
- else
- CHECKREQS_DISK_BUILD="5600M"
- fi
-
- check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- if use test ; then
- CHECKREQS_DISK_BUILD="6400M"
- else
- CHECKREQS_DISK_BUILD="5600M"
- fi
-
- check-reqs_pkg_setup
-
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- pushd ../.. &>/dev/null || die
-
- use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
-
- eapply "${WORKDIR}"/firefox-patches
- eapply "${WORKDIR}"/spidermonkey-patches
-
- default
-
- # Make LTO respect MAKEOPTS
- sed -i \
- -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
- build/moz.configure/lto-pgo.configure \
- || die "sed failed to set num_cores"
-
- # sed-in toolchain prefix
- sed -i \
- -e "s/objdump/${CHOST}-objdump/" \
- python/mozbuild/mozbuild/configure/check_debug_ranges.py \
- || die "sed failed to set toolchain prefix"
-
- einfo "Removing pre-built binaries ..."
- find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
-
- MOZJS_BUILDDIR="${WORKDIR}/build"
- mkdir "${MOZJS_BUILDDIR}" || die
-
- popd &>/dev/null || die
- eautoconf
-}
-
-src_configure() {
- tc-export CC CXX LD AR RANLIB
-
- cd "${MOZJS_BUILDDIR}" || die
-
- # ../python/mach/mach/mixin/process.py fails to detect SHELL
- export SHELL="${EPREFIX}/bin/bash"
-
- local -a myeconfargs=(
- --host="${CBUILD:-${CHOST}}"
- --target="${CHOST}"
- --disable-jemalloc
- --disable-optimize
- --disable-strip
- --enable-readline
- --enable-shared-js
- --with-intl-api
- --with-system-icu
- --with-system-nspr
- --with-system-zlib
- --with-toolchain-prefix="${CHOST}-"
- $(use_enable debug)
- $(use_enable jit)
- $(use_enable test tests)
- )
-
- if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
- myeconfargs+=( --enable-rust-simd )
- fi
-
- # Modifications to better support ARM, bug 717344
- if use cpu_flags_arm_neon ; then
- myeconfargs+=( --with-fpu=neon )
-
- if ! tc-is-clang ; then
- # thumb options aren't supported when using clang, bug 666966
- myeconfargs+=( --with-thumb=yes )
- myeconfargs+=( --with-thumb-interwork=no )
- fi
- fi
-
- # Tell build system that we want to use LTO
- if use lto ; then
- myeconfargs+=( --enable-lto )
- fi
-
- # LTO flag was handled via configure
- filter-flags '-flto*'
-
- # Forcing system-icu allows us to skip patching bundled ICU for PPC
- # and other minor arches
- ECONF_SOURCE="${S}" \
- econf \
- ${myeconfargs[@]} \
- XARGS="${EPREFIX}/usr/bin/xargs"
-}
-
-src_compile() {
- cd "${MOZJS_BUILDDIR}" || die
- default
-}
-
-src_test() {
- if "${MOZJS_BUILDDIR}/js/src/js" -e 'print("Hello world!")'; then
- einfo "Smoke-test successful, continuing with full test suite"
- else
- die "Smoke-test failed: did interpreter initialization fail?"
- fi
-
- local -a KNOWN_TESTFAILURES
- KNOWN_TESTFAILURES+=( non262/Date/reset-time-zone-cache-same-offset.js )
- KNOWN_TESTFAILURES+=( non262/Date/time-zone-path.js )
- KNOWN_TESTFAILURES+=( non262/Date/time-zones-historic.js )
- KNOWN_TESTFAILURES+=( non262/Date/time-zones-imported.js )
- KNOWN_TESTFAILURES+=( non262/Date/toString-localized.js )
- KNOWN_TESTFAILURES+=( non262/Date/toString-localized-posix.js )
- KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/timeZone_backward_links.js )
- KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/tz-environment-variable.js )
- KNOWN_TESTFAILURES+=( non262/Intl/Locale/likely-subtags.js )
- KNOWN_TESTFAILURES+=( test262/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js )
-
- if use x86 ; then
- KNOWN_TESTFAILURES+=( non262/Date/timeclip.js )
- KNOWN_TESTFAILURES+=( test262/built-ins/Number/prototype/toPrecision/return-values.js )
- KNOWN_TESTFAILURES+=( test262/language/types/number/S8.5_A2.1.js )
- KNOWN_TESTFAILURES+=( test262/language/types/number/S8.5_A2.2.js )
- fi
-
- echo "" > "${T}"/known_failures.list || die
-
- local KNOWN_TESTFAILURE
- for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
- echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
- done
-
- PYTHONPATH="${S}/tests/lib" \
- ${PYTHON} \
- "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
- --exclude-file="${T}"/known_failures.list \
- "${MOZJS_BUILDDIR}"/js/src/js \
- || die
-
- if use jit ; then
- KNOWN_TESTFAILURES=()
-
- echo "" > "${T}"/known_failures.list || die
-
- for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
- echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
- done
-
- PYTHONPATH="${S}/tests/lib" \
- ${PYTHON} \
- "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
- --exclude-file="${T}"/known_failures.list \
- "${MOZJS_BUILDDIR}"/js/src/js basic \
- || die
- fi
-}
-
-src_install() {
- cd "${MOZJS_BUILDDIR}" || die
- default
-
- # fix soname links
- pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
- mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die
- ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die
- ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die
- popd &>/dev/null || die
-
- # remove unneeded files
- rm \
- "${ED}"/usr/bin/js${MY_MAJOR}-config \
- "${ED}"/usr/$(get_libdir)/libjs_static.ajs \
- || die
-
- # fix permissions
- chmod -x \
- "${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \
- "${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h \
- || die
-}
diff --git a/dev-lang/spidermonkey/spidermonkey-78.4.0.ebuild b/dev-lang/spidermonkey/spidermonkey-78.4.0.ebuild
deleted file mode 100644
index 065952b5eb42..000000000000
--- a/dev-lang/spidermonkey/spidermonkey-78.4.0.ebuild
+++ /dev/null
@@ -1,303 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-# Patch version
-FIREFOX_PATCHSET="firefox-78esr-patches-04.tar.xz"
-SPIDERMONKEY_PATCHSET="spidermonkey-78-patches-02.tar.xz"
-
-PYTHON_COMPAT=( python3_{6..9} )
-
-WANT_AUTOCONF="2.1"
-
-inherit autotools check-reqs flag-o-matic multiprocessing python-any-r1 toolchain-funcs
-
-MY_PN="mozjs"
-MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
-
-MY_MAJOR=$(ver_cut 1)
-
-MOZ_ESR=yes
-
-MOZ_PV=${PV}
-MOZ_PV_SUFFIX=
-if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
- MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
-
- # Convert the ebuild version to the upstream Mozilla version
- MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
- MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
- MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
-fi
-
-if [[ -n ${MOZ_ESR} ]] ; then
- # ESR releases have slightly different version numbers
- MOZ_PV="${MOZ_PV}esr"
-fi
-
-MOZ_PN="firefox"
-MOZ_P="${MOZ_PN}-${MOZ_PV}"
-MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
-MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
-
-MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}"
-
-if [[ ${PV} == *_rc* ]] ; then
- MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
-fi
-
-PATCH_URIS=(
- https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${FIREFOX_PATCHSET}
- https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
-)
-
-SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz
- ${PATCH_URIS[@]}"
-
-DESCRIPTION="SpiderMonkey is Mozilla's JavaScript engine written in C and C++"
-HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
-
-KEYWORDS="amd64 arm arm64 ~mips ppc64 ~s390 x86"
-
-SLOT="78"
-LICENSE="MPL-2.0"
-IUSE="cpu_flags_arm_neon debug +jit lto test"
-
-RESTRICT="!test? ( test )"
-
-BDEPEND="${PYTHON_DEPS}
- sys-devel/llvm
- >=virtual/rust-1.41.0
- virtual/pkgconfig"
-
-CDEPEND=">=dev-libs/icu-67.1:=
- >=dev-libs/nspr-4.25
- sys-libs/readline:0=
- >=sys-libs/zlib-1.2.3"
-
-DEPEND="${CDEPEND}
- test? (
- $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
- )"
-
-RDEPEND="${CDEPEND}"
-
-S="${WORKDIR}/firefox-${MY_PV}/js/src"
-
-python_check_deps() {
- if use test ; then
- has_version "dev-python/six[${PYTHON_USEDEP}]"
- fi
-}
-
-pkg_pretend() {
- if use test ; then
- CHECKREQS_DISK_BUILD="6400M"
- else
- CHECKREQS_DISK_BUILD="5600M"
- fi
-
- check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- if use test ; then
- CHECKREQS_DISK_BUILD="6400M"
- else
- CHECKREQS_DISK_BUILD="5600M"
- fi
-
- check-reqs_pkg_setup
-
- python-any-r1_pkg_setup
-
- # Build system is using /proc/self/oom_score_adj, bug #604394
- addpredict /proc/self/oom_score_adj
-
- if ! mountpoint -q /dev/shm ; then
- # If /dev/shm is not available, configure is known to fail with
- # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py
- ewarn "/dev/shm is not mounted -- expect build failures!"
- fi
-}
-
-src_prepare() {
- pushd ../.. &>/dev/null || die
-
- use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
-
- eapply "${WORKDIR}"/firefox-patches
- eapply "${WORKDIR}"/spidermonkey-patches
-
- default
-
- # Make LTO respect MAKEOPTS
- sed -i \
- -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
- build/moz.configure/lto-pgo.configure \
- || die "sed failed to set num_cores"
-
- # sed-in toolchain prefix
- sed -i \
- -e "s/objdump/${CHOST}-objdump/" \
- python/mozbuild/mozbuild/configure/check_debug_ranges.py \
- || die "sed failed to set toolchain prefix"
-
- einfo "Removing pre-built binaries ..."
- find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
-
- MOZJS_BUILDDIR="${WORKDIR}/build"
- mkdir "${MOZJS_BUILDDIR}" || die
-
- popd &>/dev/null || die
- eautoconf
-}
-
-src_configure() {
- tc-export CC CXX LD AR RANLIB
-
- cd "${MOZJS_BUILDDIR}" || die
-
- # ../python/mach/mach/mixin/process.py fails to detect SHELL
- export SHELL="${EPREFIX}/bin/bash"
-
- local -a myeconfargs=(
- --host="${CBUILD:-${CHOST}}"
- --target="${CHOST}"
- --disable-jemalloc
- --disable-optimize
- --disable-strip
- --enable-readline
- --enable-shared-js
- --with-intl-api
- --with-system-icu
- --with-system-nspr
- --with-system-zlib
- --with-toolchain-prefix="${CHOST}-"
- $(use_enable debug)
- $(use_enable jit)
- $(use_enable test tests)
- )
-
- if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
- myeconfargs+=( --enable-rust-simd )
- fi
-
- # Modifications to better support ARM, bug 717344
- if use cpu_flags_arm_neon ; then
- myeconfargs+=( --with-fpu=neon )
-
- if ! tc-is-clang ; then
- # thumb options aren't supported when using clang, bug 666966
- myeconfargs+=( --with-thumb=yes )
- myeconfargs+=( --with-thumb-interwork=no )
- fi
- fi
-
- # Tell build system that we want to use LTO
- if use lto ; then
- myeconfargs+=( --enable-lto )
- fi
-
- # LTO flag was handled via configure
- filter-flags '-flto*'
-
- # Forcing system-icu allows us to skip patching bundled ICU for PPC
- # and other minor arches
- ECONF_SOURCE="${S}" \
- econf \
- ${myeconfargs[@]} \
- XARGS="${EPREFIX}/usr/bin/xargs"
-}
-
-src_compile() {
- cd "${MOZJS_BUILDDIR}" || die
- default
-}
-
-src_test() {
- if "${MOZJS_BUILDDIR}/js/src/js" -e 'print("Hello world!")'; then
- einfo "Smoke-test successful, continuing with full test suite"
- else
- die "Smoke-test failed: did interpreter initialization fail?"
- fi
-
- local -a KNOWN_TESTFAILURES
- KNOWN_TESTFAILURES+=( non262/Date/reset-time-zone-cache-same-offset.js )
- KNOWN_TESTFAILURES+=( non262/Date/time-zone-path.js )
- KNOWN_TESTFAILURES+=( non262/Date/time-zones-historic.js )
- KNOWN_TESTFAILURES+=( non262/Date/time-zones-imported.js )
- KNOWN_TESTFAILURES+=( non262/Date/toString-localized.js )
- KNOWN_TESTFAILURES+=( non262/Date/toString-localized-posix.js )
- KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/timeZone_backward_links.js )
- KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/tz-environment-variable.js )
- KNOWN_TESTFAILURES+=( non262/Intl/Locale/likely-subtags.js )
- KNOWN_TESTFAILURES+=( test262/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js )
-
- if use x86 ; then
- KNOWN_TESTFAILURES+=( non262/Date/timeclip.js )
- KNOWN_TESTFAILURES+=( test262/built-ins/Number/prototype/toPrecision/return-values.js )
- KNOWN_TESTFAILURES+=( test262/language/types/number/S8.5_A2.1.js )
- KNOWN_TESTFAILURES+=( test262/language/types/number/S8.5_A2.2.js )
- fi
-
- if [[ $(tc-endian) == "big" ]] ; then
- KNOWN_TESTFAILURES+=( test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js )
- fi
-
- echo "" > "${T}"/known_failures.list || die
-
- local KNOWN_TESTFAILURE
- for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
- echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
- done
-
- PYTHONPATH="${S}/tests/lib" \
- ${PYTHON} \
- "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
- --exclude-file="${T}"/known_failures.list \
- "${MOZJS_BUILDDIR}"/js/src/js \
- || die
-
- if use jit ; then
- KNOWN_TESTFAILURES=()
-
- echo "" > "${T}"/known_failures.list || die
-
- for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
- echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
- done
-
- PYTHONPATH="${S}/tests/lib" \
- ${PYTHON} \
- "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
- --exclude-file="${T}"/known_failures.list \
- "${MOZJS_BUILDDIR}"/js/src/js basic \
- || die
- fi
-}
-
-src_install() {
- cd "${MOZJS_BUILDDIR}" || die
- default
-
- # fix soname links
- pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
- mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die
- ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die
- ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die
- popd &>/dev/null || die
-
- # remove unneeded files
- rm \
- "${ED}"/usr/bin/js${MY_MAJOR}-config \
- "${ED}"/usr/$(get_libdir)/libjs_static.ajs \
- || die
-
- # fix permissions
- chmod -x \
- "${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \
- "${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h \
- || die
-}