summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-10-07 02:59:21 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-10-07 03:03:31 +0200
commit5533d1d37ba15705b6b1ca7d747c2676911a032d (patch)
tree6df50c49d4cbc1e863c43013dd097525e911a4ca /dev-lang
parentmedia-fonts/ja-ipafonts: Stabilize 003.03 arm, #745552 (diff)
downloadgentoo-5533d1d37ba15705b6b1ca7d747c2676911a032d.tar.gz
gentoo-5533d1d37ba15705b6b1ca7d747c2676911a032d.tar.bz2
gentoo-5533d1d37ba15705b6b1ca7d747c2676911a032d.zip
dev-lang/spidermonkey: bump to v78.3.1
Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/spidermonkey/Manifest1
-rw-r--r--dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild267
2 files changed, 268 insertions, 0 deletions
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 540d0dd4f2a6..3130949053da 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.2.0esr.source.tar.xz 331996944 BLAKE2B bd16877d078de66a418ae114c534b26313f112b9e40ad5cf112fb07a4d7335dc47071ee6e959e3e4c179b95afbdc5ab9cda7cdefa96355dbbaf6b75c7805d171 SHA512 38f91a24634ce5d0c10340c9ac762071f8488f4bd7649bff9ed9cb1cbecda23e207b593118d38488810540e63be39d9c1c45c3b9a6acb477b6b2edf636e56d5b
DIST firefox-78.3.0esr.source.tar.xz 331073228 BLAKE2B 01f3d3c0b8b963dedfa89631c518225104c739637a8bf22c121e3a942fa0b1d1f8cf1c4c2edad2e823e0e3922f865cc8d3430c6fc9246deea855295eaff84a0e SHA512 89e12797429d99760b294e302d803432f533b7c2c10f1fcd3781b89b27ec9698173d4fbf1bfe7506186602daf6666c09152407ce5668fb5b7391e38b5566f2f2
+DIST firefox-78.3.1esr.source.tar.xz 339088596 BLAKE2B 27e594a23b111b937ed277ddafa99c07fa9ee003cbd6b7c6cbdc4428e54769ec9ec1961653c1ec127d7adf159ff8b3be08ebbdefb0d11f1ac21717ffde9461b3 SHA512 162860df8e4ef7322e91924bd4aae731a49dbd9829f02b306e4e5acc69c611f4a1e5727c3857b2f98e951745a3b1d8f550966105badc095205644d1ad7f5a340
DIST firefox-esr-78-patches-01.tar.xz 30808 BLAKE2B c3005a04233462c800ff0da7ba5e4f1e4d350c21e2642a93aa48637fcc19b8c0e97222669629a152ad6403652f83d4fdf3191b3c2741dca5327b101ef491d962 SHA512 7b2aba8dd4ff2f8ac3236ae95eec73aff3560e8f11f170f09b28ae2c7681dc0220ac63724a331dcc792c86e73145acee173a19bce5fcf995ba40ed5d067e1eff
DIST firefox-esr-78-patches-02.tar.xz 36288 BLAKE2B f177027ea550b4f41616c104865a4d1a99fa0a84ca431176b5191107f23b2fcdd8361ad97493d3182d01dfeb7f2805caf16725b8a81bf1f7847cf400f87018d6 SHA512 7eff0a4f5d2b4abcb0293877b3fe562b5fa2581f46b4905ff8ad839559049e4d903dcca4aad6a7196720cc7b3cd93ae88ca0093da51f70e56609faaadf646c78
DIST js185-1.0.0.tar.gz 6164605 BLAKE2B 76a37f0ceae05d3475853875bd0ce4be6e525e4114816f8f281ea6fc6b60a71060975a0fa1cb843f57ad1e2f842dfb26b24244fa0fd6c20f6ae2ebbe430f70be SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718
diff --git a/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild b/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
new file mode 100644
index 000000000000..beec62444260
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
@@ -0,0 +1,267 @@
+# 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 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-02.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 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
+
+ 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)
+ )
+
+ # 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
+
+ # 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
+}