From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1A2C61382C5 for ; Wed, 23 Dec 2020 01:34:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 58C5DE09DF; Wed, 23 Dec 2020 01:34:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30917E09DF for ; Wed, 23 Dec 2020 01:34:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D60A6340B98 for ; Wed, 23 Dec 2020 01:34:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 472C3CB for ; Wed, 23 Dec 2020 01:34:10 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1608687244.703f2808eefdeefd8ee837badaeddca26a07a667.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/spidermonkey/Manifest dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild dev-lang/spidermonkey/spidermonkey-78.5.0.ebuild X-VCS-Directories: dev-lang/spidermonkey/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 703f2808eefdeefd8ee837badaeddca26a07a667 X-VCS-Branch: master Date: Wed, 23 Dec 2020 01:34:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ca0b8672-301a-4427-8e6e-70e2efe24021 X-Archives-Hash: 8cfff075c8f484bb4630bedc073aff35 commit: 703f2808eefdeefd8ee837badaeddca26a07a667 Author: Thomas Deutschmann gentoo org> AuthorDate: Wed Dec 23 01:34:04 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Wed Dec 23 01:34:04 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=703f2808 dev-lang/spidermonkey: drop old Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann gentoo.org> dev-lang/spidermonkey/Manifest | 4 - dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild | 303 ----------------------- dev-lang/spidermonkey/spidermonkey-78.5.0.ebuild | 303 ----------------------- 3 files changed, 610 deletions(-) diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest index a13d0ff063f..9f61526c28b 100644 --- a/dev-lang/spidermonkey/Manifest +++ b/dev-lang/spidermonkey/Manifest @@ -1,9 +1,6 @@ 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.4.1esr.source.tar.xz 334673424 BLAKE2B 3ba8bf545c4c2b92914bf7f63b539ba61dc2ee6c14fb8995a6d75adb4bd11988f1d47d2c64639cbecf7a4b01b99085e63af4eb3afc7a27047f03048ffa9c2c2d SHA512 287096ad67e86b307554475c3b5d1003a325d6d13987bfbec2ec79aa0f8004dce1614ab62585ba5cf153545618906ab640cd4657d5a910085afb3d8ceb46e8de -DIST firefox-78.5.0esr.source.tar.xz 333995288 BLAKE2B 35140afb6b4d15052858e7864753ca74099edb24ed5e459f1f48114f0946f5e007486b5561ba9a545566033d71a69f0e6163dd17204cab717c441323972f089e SHA512 0d16013342b6e8d67adb5c111177ea4796db4fb593da8aa254d0d95bdf33fad798c2dbb235d44db4177c32dd2d7b3ac26b938b476342753ee8d6c83d968d0281 DIST firefox-78.6.0esr.source.tar.xz 338098664 BLAKE2B 9d082b6104bffbd0d918dc1adf2a01ac32613d8048faf399177834c4949714a00c1f4383b778a21d6b6684296d8f9bd44fa547ee2507a8631d206e3764d2ceeb SHA512 a1e2d6af0020784d00ed3cb4d778c136685e7c2f6ae536cc270fbd331d51d483d17dff9acd7ad8e6b3b231b9df894c146092889357b23715814a080c6f08d11a -DIST firefox-78esr-patches-04.tar.xz 171504 BLAKE2B d51e55c255d1f5cfa0c7c030b1ea50cb54951bed3bc21b21f5cb3b1e4b8b2ad406b3d12db2baabd4a90e3c88a38f187f277e7a4afe441ea6cf82c48f84bb0ac5 SHA512 6f00ec898fafb34d7c7e0ff2a6fb5c1cbf1205458845e14eb39c131125c5bf6b2418fea1050bb72449ec40e18fd775fc844437ce0290281d66961de40a53235a DIST firefox-78esr-patches-07.tar.xz 66156 BLAKE2B 8f69883432dcbd484b1fb15e3fde1630b1424e502ba78d9ec3cbe70cb2676a6876853d3477c8bfe35e92bca91b200e2d14543de1778d895676a52d2608109af2 SHA512 b4a01d3499002bd33a7fb45a1a80e9e73ba27a0986b6bfa43b3482dd8d82a686a14ae0c5e013402c8c8f359a642632a40bf4c362a0e83a1f53b453914f42e3a7 DIST js185-1.0.0.tar.gz 6164605 BLAKE2B 76a37f0ceae05d3475853875bd0ce4be6e525e4114816f8f281ea6fc6b60a71060975a0fa1cb843f57ad1e2f842dfb26b24244fa0fd6c20f6ae2ebbe430f70be SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718 DIST mozjs-52.9.1pre1.tar.bz2 30178574 BLAKE2B 0920432b5140e78297a9bcbccb54268d75a223d5e75e4ff90b3b01aab4f7736b4a4e05c47b3a925ff0a74607a0abad3b6583c75d070ef5142009b20ebaf6e4bf SHA512 187b231b246a5ae09e55c0fef77866b316d75f38f4c2e066d5d4325d8da63433027020c929439cab46af3253ac63ab2f780223a8fd2c6ff535b3409bb6c4aa0f @@ -11,6 +8,5 @@ DIST mozjs-60.5.2.tar.bz2 32816585 BLAKE2B 45ac4c9646e1275faf60eeedbf486f802cd10 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-02.tar.xz 3432 BLAKE2B 3ac46306f1740e704ed1aa8cb0f2a963d0b94bee60349ce31bc0ac477942781c9cdfa1d791a22e31c9258ade5d955cf6d32696ced73247777a908cb3e5c464c2 SHA512 d94c33d327d07072aa5ca66135ab2100e86acf38e091bf5b9644c537f77fb734433246a2f4bf58bf76d884510bce565b6ab75c23472be7e9d1f566dc4e812b5c DIST spidermonkey-78-patches-03.tar.xz 3732 BLAKE2B 5dc47527581c010994a102e6458119c762ec3836f57e403cbaac88c457f5f119bd75ae1a067307b20d229536f75db4b2b797408874d28156667ac63b61de8501 SHA512 f0921562dcd0ea519bf3f5ef2da43f87565e92493781d56e6e0b73d4124f41e7aadd34d8285bbb181f4286160dde0c9684920e98058f0683143a2687eb93cc1a DIST spidermonkey-slot0-patches-02.tar.xz 10952 BLAKE2B fb7bf5cdac6c821a48d407ff172fe0ec7297e047d3b3bab952f226f413b83ea70325175b41c1680725ff588111b424efc97a0c66e392989da510c43d38528ff1 SHA512 cd62890c4b58658d99fc1b52f05ccb35c07da835b168bb9d5e6b219de5021122c199cc2255c5b0be01ef582f53dd51c9975921e6bde9f14e9b43536e2bee85f2 diff --git a/dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild b/dev-lang/spidermonkey/spidermonkey-78.4.1.ebuild deleted file mode 100644 index 51c99770b03..00000000000 --- a/dev-lang/spidermonkey/spidermonkey-78.4.1.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="7600M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_pretend -} - -pkg_setup() { - if use test ; then - CHECKREQS_DISK_BUILD="7600M" - else - CHECKREQS_DISK_BUILD="6400M" - 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 -} diff --git a/dev-lang/spidermonkey/spidermonkey-78.5.0.ebuild b/dev-lang/spidermonkey/spidermonkey-78.5.0.ebuild deleted file mode 100644 index cf316804750..00000000000 --- a/dev-lang/spidermonkey/spidermonkey-78.5.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-07.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="7600M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_pretend -} - -pkg_setup() { - if use test ; then - CHECKREQS_DISK_BUILD="7600M" - else - CHECKREQS_DISK_BUILD="6400M" - 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 -}