diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-10-20 15:36:55 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-10-20 16:26:10 +0200 |
commit | 04b3ce9b4f6c6234a8b64f4037940bf66349ca48 (patch) | |
tree | 69ddfbf0b3f9c730db2821061fcff0c0a0f0d371 /dev-lang | |
parent | www-client/firefox: bump to v78.4.0 ESR (diff) | |
download | gentoo-04b3ce9b4f6c6234a8b64f4037940bf66349ca48.tar.gz gentoo-04b3ce9b4f6c6234a8b64f4037940bf66349ca48.tar.bz2 gentoo-04b3ce9b4f6c6234a8b64f4037940bf66349ca48.zip |
dev-lang/spidermonkey: bump to v78.4.0
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/spidermonkey/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/spidermonkey/spidermonkey-78.4.0.ebuild | 290 |
2 files changed, 293 insertions, 0 deletions
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest index 7ad6c61afb7e..751cb12f7062 100644 --- a/dev-lang/spidermonkey/Manifest +++ b/dev-lang/spidermonkey/Manifest @@ -1,6 +1,8 @@ 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.sources.tar.xz 335094656 BLAKE2B 6c3e85353b52465e00393bed14dc067cf1663ce1d7d737de1d51ec6c747c465f998600ed5a03b1a5b116a65054f1addb31a23e8e0d8364a2763e3dab693d016b SHA512 d9de975e9acf7dab6186db877fe2df87a0e9e3c016e884473ecb188025a31032b1fe7f202598285970ed7a48268c7f3e265657708725da4eb7846db85a036246 +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 @@ -9,4 +11,5 @@ DIST spidermonkey-52.0-patches-1.tar.xz 3112 BLAKE2B d8f4c44cb2ae290fa51efc4725a DIST spidermonkey-60.0-patches-04.tar.xz 4428 BLAKE2B af78049cd9b3ee6a9b689e6253486c4670fd3b506faade7d745dafaa7af329c0bd15cd35e95528a4c96688230f4803130967fb09b97aae2bda0ce0f73acaaf3e SHA512 fb1326a81512146ba98773d4f7e0c4bc1bff0f076897c13f576fcf63b56f6965efeff633eea9160bca9f9bc4546505901084eabc33bc955de0b7ab3d6334387a DIST spidermonkey-68.6.0-patches-03.tar.xz 4744 BLAKE2B 2a323ea9b6291e427631f986822e779cd3d302b617a827ff020760bb1b19cacbc588d5c76637e386f62b8b64036b0b665bfecae7fdb08477fa5d7fb13630523c SHA512 1465331b61abc9c14245bc6510f1f6996274795853d12d209d7e0a088b37a1a2488cc5cc61a6c2bd0fe05971dad54b19614fb477ec3176b240aa6e0190e89b47 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.4.0.ebuild b/dev-lang/spidermonkey/spidermonkey-78.4.0.ebuild new file mode 100644 index 000000000000..abdf04b4212c --- /dev/null +++ b/dev-lang/spidermonkey/spidermonkey-78.4.0.ebuild @@ -0,0 +1,290 @@ +# 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}.sources.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 +} + +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 +} |