commit:     cebe79f19723b370e8a68a2ad094b9e6d7ed7c99
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  9 19:27:51 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov  9 19:27:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cebe79f1

dev-lang/spidermonkey: bump to v78.4.1

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-lang/spidermonkey/Manifest                   |   1 +
 dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild | 303 +++++++++++++++++++++++
 2 files changed, 304 insertions(+)

diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index aea2fc95f11..7c7e0e877d3 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -2,6 +2,7 @@ DIST firefox-68.0-patches-15.tar.xz 16060 BLAKE2B 
f9e6cd58ea51bed1af90a9d30fd551
 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

diff --git a/dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild 
b/dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild
new file mode 100644
index 00000000000..065952b5eb4
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild
@@ -0,0 +1,303 @@
+# 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
+}

Reply via email to