* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2017-05-11 20:53 Ian Stakenvicius
0 siblings, 0 replies; 14+ messages in thread
From: Ian Stakenvicius @ 2017-05-11 20:53 UTC (permalink / raw
To: gentoo-commits
commit: b8d5670e2b0fb6cd6d2e0eef71b6acb74beec527
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 20:52:03 2017 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Thu May 11 20:53:01 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8d5670e
dev-lang/spidermonkey: fix pointer dereference causing c++11 compile error
Backported fix from mozilla25 to spidermonkey-17 and spidermonkey-24.
Also bumped spidermonkey-24 EAPI to 6.
Bug: http://bugs.gentoo.org/601030
Package-Manager: Portage-2.3.3, Repoman-2.3.1
.../spidermonkey-17-fix_pointer_dereference.patch | 30 +++++++++
.../spidermonkey/spidermonkey-17.0.0-r5.ebuild | 3 +-
...0.0-r5.ebuild => spidermonkey-24.2.0-r4.ebuild} | 75 +++++++++++++---------
3 files changed, 78 insertions(+), 30 deletions(-)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-17-fix_pointer_dereference.patch b/dev-lang/spidermonkey/files/spidermonkey-17-fix_pointer_dereference.patch
new file mode 100644
index 00000000000..da6a49f637c
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-17-fix_pointer_dereference.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1373958382 -32400
+# Tue Jul 16 16:06:22 2013 +0900
+# Node ID 1880537f26d2ce22866974a8cdf1927dc66f6dbc
+# Parent 673ea5cd6ba7fc37086d1dab71ee4a6d6a77a1ab
+Bug 894240 - Fix pointer dereference in js::cli::OptionParser::extractValue
+
+diff --git a/js/src/shell/jsoptparse.cpp b/js/src/shell/jsoptparse.cpp
+--- a/js/src/shell/jsoptparse.cpp
++++ b/js/src/shell/jsoptparse.cpp
+@@ -248,17 +248,17 @@ OptionParser::printHelp(const char *prog
+
+ OptionParser::Result
+ OptionParser::extractValue(size_t argc, char **argv, size_t *i, char **value)
+ {
+ JS_ASSERT(*i < argc);
+ char *eq = strchr(argv[*i], '=');
+ if (eq) {
+ *value = eq + 1;
+- if (value[0] == '\0')
++ if (*value[0] == '\0')
+ return error("A value is required for option %.*s", eq - argv[*i], argv[*i]);
+ return Okay;
+ }
+
+ if (argc == *i + 1)
+ return error("Expected a value for option %s", argv[*i]);
+
+ *i += 1;
diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
index b88a9ce84dc..05a4758968e 100644
--- a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -47,6 +47,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-17.0.0-fix-file-permissions.patch
"${FILESDIR}"/${PN}-17-clang.patch
"${FILESDIR}"/${PN}-perl-defined-array-check.patch
+ "${FILESDIR}"/${PN}-17-fix_pointer_dereference.patch
)
src_prepare() {
diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild
similarity index 63%
copy from dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
copy to dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild
index b88a9ce84dc..1e3f7b5b040 100644
--- a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild
@@ -1,39 +1,46 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=6
WANT_AUTOCONF="2.1"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads"
-inherit toolchain-funcs multilib python-any-r1 versionator pax-utils
+inherit autotools toolchain-funcs multilib python-any-r1 versionator pax-utils
MY_PN="mozjs"
-MY_P="${MY_PN}${PV}"
+MY_P="${MY_PN}-${PV/_/.}"
DESCRIPTION="Stand-alone JavaScript C library"
HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
-SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/js/${MY_PN}${PV}.tar.gz"
+SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.bz2"
LICENSE="NPL-1.1"
-SLOT="17"
-# "MIPS, MacroAssembler is not supported" wrt #491294 for -mips
-KEYWORDS="~alpha ~amd64 ~arm -hppa ~ia64 -mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
-IUSE="debug jit minimal static-libs test"
+SLOT="24"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug icu jit minimal static-libs +system-icu test"
-REQUIRED_USE="debug? ( jit )"
RESTRICT="ia64? ( test )"
-S="${WORKDIR}/${MY_P}"
+S="${WORKDIR}/${MY_P%.rc*}"
BUILDDIR="${S}/js/src"
RDEPEND=">=dev-libs/nspr-4.9.4
virtual/libffi
sys-libs/readline:0=
- >=sys-libs/zlib-1.1.4"
+ >=sys-libs/zlib-1.1.4
+ system-icu? ( >=dev-libs/icu-1.51:= )"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
app-arch/zip
virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${PN}-${SLOT}-system-icu.patch
+ "${FILESDIR}"/${PN}-24.2.0-fix-file-permissions.patch
+ "${FILESDIR}"/${PN}-${SLOT}-upward-growing-stack.patch
+ "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+ "${FILESDIR}"/${PN}-17-fix_pointer_dereference.patch
+)
+
pkg_setup(){
if [[ ${MERGE_TYPE} != "binary" ]]; then
python-any-r1_pkg_setup
@@ -41,29 +48,29 @@ pkg_setup(){
fi
}
-PATCHES=(
- "${FILESDIR}"/${PN}-${SLOT}-js-config-shebang.patch
- "${FILESDIR}"/${PN}-${SLOT}-ia64-mmap.patch
- "${FILESDIR}"/${PN}-17.0.0-fix-file-permissions.patch
- "${FILESDIR}"/${PN}-17-clang.patch
- "${FILESDIR}"/${PN}-perl-defined-array-check.patch
-)
-
src_prepare() {
default
- # Remove obsolete jsuword bug #506160
- sed -i -e '/jsuword/d' "${BUILDDIR}"/jsval.h || die "sed failed"
-
if [[ ${CHOST} == *-freebsd* ]]; then
# Don't try to be smart, this does not work in cross-compile anyway
ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
fi
+
+ cd "${BUILDDIR}" || die
+ eautoconf
}
src_configure() {
+ export SHELL=/bin/sh
cd "${BUILDDIR}" || die
+ local myopts=""
+ if use icu; then # make sure system-icu flag only affects icu-enabled build
+ myopts+="$(use_with system-icu)"
+ else
+ myopts+="--without-system-icu"
+ fi
+
CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
LD="$(tc-getLD)" \
@@ -74,10 +81,11 @@ src_configure() {
--enable-threadsafe \
--with-system-nspr \
--enable-system-ffi \
- --enable-jemalloc \
+ --disable-optimize \
+ $(use_enable icu intl-api) \
$(use_enable debug) \
- $(use_enable jit tracejit) \
- $(use_enable jit methodjit) \
+ $(use_enable jit yarr-jit) \
+ $(use_enable jit ion) \
$(use_enable static-libs static) \
$(use_enable test tests)
}
@@ -96,8 +104,14 @@ src_compile() {
cd "${BUILDDIR}" || die
if tc-is-cross-compiler; then
tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
- cross_make host_jsoplengen host_jskwgen
- cross_make -C config nsinstall
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ host_jsoplengen host_jskwgen
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall
mv {,native-}host_jskwgen || die
mv {,native-}host_jsoplengen || die
mv config/{,native-}nsinstall || die
@@ -111,7 +125,10 @@ src_compile() {
host_jskwgen.o \
host_jsoplengen.o || die
fi
- emake
+ emake \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS=""
}
src_test() {
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2018-11-17 16:52 Ian Stakenvicius
0 siblings, 0 replies; 14+ messages in thread
From: Ian Stakenvicius @ 2018-11-17 16:52 UTC (permalink / raw
To: gentoo-commits
commit: e74b13eda475b72b1d3e9020aa585fe5544a10c7
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 17 16:12:19 2018 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Sat Nov 17 16:52:20 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e74b13ed
dev-lang/spidermonkey: fix bitness on alpha
Thanks to Brian Parkhurst for doing all the leg work on this one.
Closes: https://bugs.gentoo.org/663620
Signed-off-by: Ian Stakenvicius <axs <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11
.../spidermonkey-52.0-fix-alpha-bitness.patch | 32 ++++++++++++++++++++++
.../spidermonkey/spidermonkey-52.9.1_pre1.ebuild | 2 +-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-52.0-fix-alpha-bitness.patch b/dev-lang/spidermonkey/files/spidermonkey-52.0-fix-alpha-bitness.patch
new file mode 100644
index 00000000000..b0f87296438
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-52.0-fix-alpha-bitness.patch
@@ -0,0 +1,32 @@
+
+# HG changeset patch
+# User John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+# Date 1482966103 -3600
+# Node ID 1f4d99d8dff27bcc25eff21dc6a16dae63f48595
+# Parent ce9e9f0dc752896ac7ba00bb0610b3f731e948b0
+Bug 1326496 - mozbuild: Fix bitness from 32 to 64 bits on alpha. r=glandium
+
+
+diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
+--- a/python/mozbuild/mozbuild/configure/constants.py
++++ b/python/mozbuild/mozbuild/configure/constants.py
+@@ -35,17 +35,17 @@ Kernel = EnumString.subclass(
+ 'Linux',
+ 'NetBSD',
+ 'OpenBSD',
+ 'WINNT',
+ )
+
+ CPU_bitness = {
+ 'aarch64': 64,
+- 'Alpha': 32,
++ 'Alpha': 64,
+ 'arm': 32,
+ 'hppa': 32,
+ 'ia64': 64,
+ 'mips32': 32,
+ 'mips64': 64,
+ 'ppc': 32,
+ 'ppc64': 64,
+ 's390': 32,
+
diff --git a/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild b/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild
index cadf22413d7..7faa0034468 100644
--- a/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild
@@ -48,7 +48,7 @@ src_prepare() {
eapply "${WORKDIR}/${PN}"
eapply "${FILESDIR}"/moz38-dont-hardcode-libc-soname.patch
- #eapply "${FILESDIR}"/${PN}-52-baseconfig.patch
+ eapply "${FILESDIR}"/${PN}-52.0-fix-alpha-bitness.patch
eapply_user
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2020-04-21 11:50 Thomas Deutschmann
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Deutschmann @ 2020-04-21 11:50 UTC (permalink / raw
To: gentoo-commits
commit: 40244e2b380a51c29d895828c134ca1090810581
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 21 11:50:14 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 21 11:50:14 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40244e2b
dev-lang/spidermonkey: fix virtual address length on ia64
Closes: https://bugs.gentoo.org/703538
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
...ey-60.5.2-ia64-fix-virtual-address-length.patch | 59 ++++++++
.../spidermonkey/spidermonkey-60.5.2_p0-r4.ebuild | 155 +++++++++++++++++++++
2 files changed, 214 insertions(+)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch b/dev-lang/spidermonkey/files/spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch
new file mode 100644
index 00000000000..8b2245f1e35
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch
@@ -0,0 +1,59 @@
+From 8099213b51180254b322332ecd573239da4212c4 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 23 Jan 2020 22:57:53 +0000
+Subject: [PATCH] ProcessExecutableMemory.cpp: fix virtual address length on
+ ia64
+
+ia64's usable virtual address space is page dependent. For 16K
+pages with 3 levels of page tables de can address only 44 bits
+of virtual memory, not default 47.
+
+The change makes page size detection dynamic and adapts to
+addressable bits. On ia64 it is '4 * log2(page_size/8)'.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ js/src/jit/ProcessExecutableMemory.cpp | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/js/src/jit/ProcessExecutableMemory.cpp b/js/src/jit/ProcessExecutableMemory.cpp
+index 9e55c262..8581c150 100644
+--- a/js/src/jit/ProcessExecutableMemory.cpp
++++ b/js/src/jit/ProcessExecutableMemory.cpp
+
+@@ -248,7 +248,32 @@ static void* ComputeRandomAllocationAddress() {
+ // x64 CPUs have a 48-bit address space and on some platforms the OS will
+ // give us access to 47 bits, so to be safe we right shift by 18 to leave
+ // 46 bits.
++# ifdef __ia64__
++ // On ia64 virtual address space looks like one of:
++ // virt_addr_64 = [ <63..61> | <unimplemented> | L3 | L2 | L1 | offset ]
++ // virt_addr_64 = [ <63..61> | <unimplemented> | L4 | L3 | L2 | L1 | offset ]
++ // where L{1..L4} are page tables. Each page table (except top-level L3 or L4)
++ // is itself a page-size entry and can store PageSize / 8 entries. Top-level
++ // entry is 1/8 of of L1/L2 (as 3 upper bits are part of <63..61> address part).
++ // Note: that makes addressable size directly depend on page size.
++ //
++ // We conservatively assume 3 levels of page tables here. This makes the
++ // following formula:
++ // L3 = log2(PAGE / 8 / 8) = log2(PAGE / 8) - 3
++ // L2 = log2(PAGE / 8)
++ // L1 = log2(PAGE / 8)
++ // offset = log2(PAGE) = log2(PAGE / 8) + 3
++ // thus
++ // L3 + L2 + L1 + offset = 4 * log2(PAGE / 8)
++ // For more details see http://www.ia64-linux.org/doc/IA64linuxkernel.PDF
++ // (slide 19: "user regions").
++ static uint64_t ia64_virt_bits = std::min<uint64_t>(
++ 4 * (mozilla::FloorLog2(gc::SystemPageSize() / 8)),
++ 46);
++ rand >>= (64 - ia64_virt_bits);
++# else
+ rand >>= 18;
++# endif
+ #else
+ // On 32-bit, right shift by 34 to leave 30 bits, range [0, 1GiB). Then add
+ // 512MiB to get range [512MiB, 1.5GiB), or [0x20000000, 0x60000000). This
+--
+2.25.0
+
diff --git a/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r4.ebuild
new file mode 100644
index 00000000000..997ed760522
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r4.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WANT_AUTOCONF="2.1"
+inherit autotools check-reqs toolchain-funcs pax-utils mozcoreconf-v5
+
+MY_PN="mozjs"
+MY_P="${MY_PN}-${PV/_rc/.rc}"
+MY_P="${MY_P/_pre/pre}"
+MY_P="${MY_P%_p[0-9]*}"
+DESCRIPTION="Stand-alone JavaScript C++ library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+#SRC_URI="https://archive.mozilla.org/pub/spidermonkey/prereleases/60/pre3/${MY_P}.tar.bz2
+SRC_URI="https://dev.gentoo.org/~axs/distfiles/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~anarchy/mozilla/patchsets/${PN}-60.0-patches-04.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="60"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="debug +jit minimal +system-icu test"
+
+RESTRICT="!test? ( test ) ia64? ( test )"
+
+S="${WORKDIR}/${MY_P%.rc*}"
+
+BUILDDIR="${S}/jsobj"
+
+RDEPEND=">=dev-libs/nspr-4.13.1
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.2.3:=
+ system-icu? ( >=dev-libs/icu-59.1:= )"
+DEPEND="${RDEPEND}"
+
+pkg_pretend() {
+ CHECKREQS_DISK_BUILD="2G"
+
+ check-reqs_pkg_setup
+}
+pkg_setup() {
+ [[ ${MERGE_TYPE} == "binary" ]] || \
+ moz_pkgsetup
+ export SHELL="${EPREFIX}/bin/bash"
+}
+
+src_prepare() {
+ eapply "${WORKDIR}/${PN}"
+ eapply "${FILESDIR}/${PN}-60.5.2-ia64-support.patch"
+ eapply "${FILESDIR}/${PN}-60.5.2-ia64-fix-virtual-address-length.patch"
+
+ eapply_user
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+
+ cd "${S}/js/src" || die
+ eautoconf old-configure.in
+ eautoconf
+
+ # remove options that are not correct from js-config
+ sed '/lib-filenames/d' -i "${S}"/js/src/build/js-config.in || die "failed to remove invalid option from js-config"
+
+ # there is a default config.cache that messes everything up
+ rm -f "${S}/js/src"/config.cache || die
+
+ mkdir -p "${BUILDDIR}" || die
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ ECONF_SOURCE="${S}/js/src" \
+ econf \
+ --disable-jemalloc \
+ --enable-readline \
+ --with-system-nspr \
+ --with-system-zlib \
+ --disable-optimize \
+ --with-intl-api \
+ $(use_with system-icu) \
+ $(use_enable debug) \
+ $(use_enable jit ion) \
+ $(use_enable test tests) \
+ XARGS="/usr/bin/xargs" \
+ CONFIG_SHELL="${EPREFIX}/bin/bash" \
+ CC="${CC}" CXX="${CXX}" LD="${LD}" AR="${AR}" RANLIB="${RANLIB}"
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ host_jsoplengen host_jskwgen
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \
+ emake \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS=""
+}
+
+src_test() {
+ cd "${BUILDDIR}/js/src/jsapi-tests" || die
+ ./jsapi-tests || die
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}"usr/bin/js${SLOT}
+ fi
+ else
+ rm -f "${ED}"usr/bin/js${SLOT}
+ fi
+
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -o -iname '*.ajs' -delete || die
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2020-08-14 9:29 Thomas Deutschmann
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Deutschmann @ 2020-08-14 9:29 UTC (permalink / raw
To: gentoo-commits
commit: 0df0f88749de1f5b840fc78f59fc4df7cf022c4a
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 14 09:29:17 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 14 09:29:17 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0df0f887
dev-lang/spidermonkey: fix building using clang
Closes: https://bugs.gentoo.org/737084
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
.../files/spidermonkey-17.0.0-unbreak-clang.patch | 32 ++++++++++++++++++++++
.../spidermonkey/spidermonkey-17.0.0-r5.ebuild | 1 +
2 files changed, 33 insertions(+)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-17.0.0-unbreak-clang.patch b/dev-lang/spidermonkey/files/spidermonkey-17.0.0-unbreak-clang.patch
new file mode 100644
index 00000000000..ef428e70b52
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-17.0.0-unbreak-clang.patch
@@ -0,0 +1,32 @@
+commit ad6d8397a05a
+Author: Dan Gohman <sunfish@mozilla.com>
+Date: Thu May 22 11:15:06 2014 -0700
+
+ Bug 1012971 - SpiderMonkey: Fix various warnings. r=nbp
+---
+ js/public/RootingAPI.h | 4 +++-
+ js/src/configure.in | 1 +
+ js/src/jit/IonFrames.h | 17 ++++++++---------
+ js/src/jit/MIR.h | 12 +++++-------
+ js/src/jit/PerfSpewer.cpp | 12 ++++++------
+ js/src/jit/RegisterSets.h | 2 +-
+ js/src/jscntxt.h | 2 +-
+ js/src/jsgcinlines.h | 4 ++--
+ js/src/jsopcode.cpp | 2 +-
+ js/src/jsscript.cpp | 6 +++---
+ js/src/shell/js.cpp | 2 +-
+ js/src/vm/ArrayBufferObject.h | 16 ++++++++--------
+ js/src/vm/TypedArrayObject.cpp | 26 +++++++++++++-------------
+ 13 files changed, 53 insertions(+), 53 deletions(-)
+
+--- old/js/src/jsopcode.cpp.orig 2013-02-11 22:33:23 UTC
++++ new/js/src/jsopcode.cpp
+@@ -6067,7 +6067,7 @@ ExpressionDecompiler::write(JSString *s)
+ bool
+ ExpressionDecompiler::quote(JSString *s, uint32_t quote)
+ {
+- return QuoteString(&sprinter, s, quote) >= 0;
++ return QuoteString(&sprinter, s, quote) != NULL;
+ }
+
+ JSAtom *
diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
index b5ba36c3093..4bade3f5fcc 100644
--- a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
@@ -49,6 +49,7 @@ PATCHES=(
"${WORKDIR}"/sm17/${PN}-17-clang.patch
"${FILESDIR}"/${PN}-perl-defined-array-check.patch
"${WORKDIR}"/sm17/${PN}-17-fix_pointer_dereference.patch
+ "${FILESDIR}"/${PN}-17.0.0-unbreak-clang.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2021-09-06 14:03 Thomas Deutschmann
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Deutschmann @ 2021-09-06 14:03 UTC (permalink / raw
To: gentoo-commits
commit: 2d7ce270016a7b986aed4560f1b09889b1cb77f1
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 6 13:50:02 2021 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Sep 6 14:03:12 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d7ce270
dev-lang/spidermonkey: add patch to build on Linux/RISC-V
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
.../spidermonkey-68.0-add-riscv-support.patch | 107 +++++++++++++++++++++
dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild | 1 +
2 files changed, 108 insertions(+)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-68.0-add-riscv-support.patch b/dev-lang/spidermonkey/files/spidermonkey-68.0-add-riscv-support.patch
new file mode 100644
index 00000000000..cc44da80589
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-68.0-add-riscv-support.patch
@@ -0,0 +1,107 @@
+From f144113688168e2bd86d24a48c8d7cdfdb4ccaab Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Fri, 21 May 2021 17:17:45 +0200
+Subject: [PATCH] bmo#1318905: Make SpiderMonkey build on Linux/RISC-V
+
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ build/moz.configure/init.configure | 3 +++
+ js/src/jit/AtomicOperations.h | 2 +-
+ js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h | 5 +++++
+ mfbt/tests/TestPoisonArea.cpp | 3 +++
+ python/mozbuild/mozbuild/configure/constants.py | 2 ++
+ .../mozbuild/test/configure/test_toolchain_configure.py | 4 ++++
+ 6 files changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
+index b887153321a..5c275076061 100644
+--- a/build/moz.configure/init.configure
++++ b/build/moz.configure/init.configure
+@@ -755,6 +755,9 @@ def split_triplet(triplet, allow_msvc=False):
+ elif cpu.startswith('aarch64'):
+ canonical_cpu = 'aarch64'
+ endianness = 'little'
++ elif cpu in ('riscv64', 'riscv64gc'):
++ canonical_cpu = 'riscv64'
++ endianness = 'little'
+ elif cpu == 'sh4':
+ canonical_cpu = 'sh4'
+ endianness = 'little'
+diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
+index 0f45ac8b58e..f48d2adce97 100644
+--- a/js/src/jit/AtomicOperations.h
++++ b/js/src/jit/AtomicOperations.h
+@@ -392,7 +392,7 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) {
+ defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
+ defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) || \
+ defined(__ia64__) || defined(__sh__) || defined(__s390__) || \
+- defined(__s390x__)
++ defined(__s390x__) || defined(__riscv)
+ # include "jit/shared/AtomicOperations-feeling-lucky.h"
+ #else
+ # error "No AtomicOperations support provided for this platform"
+diff --git a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+index f002cd46c93..1ce40efaccc 100644
+--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
++++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+@@ -63,6 +63,11 @@
+ # define HAS_64BIT_LOCKFREE
+ #endif
+
++#if defined(__riscv) && __riscv_xlen == 64
++# define HAS_64BIT_ATOMICS
++# define HAS_64BIT_LOCKFREE
++#endif
++
+ #ifdef __sparc__
+ # ifdef __LP64__
+ # define HAS_64BIT_ATOMICS
+diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp
+index fbd33647150..9d2ffa498b7 100644
+--- a/mfbt/tests/TestPoisonArea.cpp
++++ b/mfbt/tests/TestPoisonArea.cpp
+@@ -132,6 +132,9 @@
+ #elif defined _ARCH_PPC || defined _ARCH_PWR || defined _ARCH_PWR2
+ # define RETURN_INSTR 0x4E800020 /* blr */
+
++#elif defined __riscv
++# define RETURN_INSTR 0x80828082 /* ret; ret */
++
+ #elif defined __sparc || defined __sparcv9
+ # define RETURN_INSTR 0x81c3e008 /* retl */
+
+diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
+index 7542dcdc636..49ef3b857db 100644
+--- a/python/mozbuild/mozbuild/configure/constants.py
++++ b/python/mozbuild/mozbuild/configure/constants.py
+@@ -49,6 +49,7 @@
+ 'mips64': 64,
+ 'ppc': 32,
+ 'ppc64': 64,
++ 'riscv64': 64,
+ 's390': 32,
+ 's390x': 64,
+ 'sh4': 32,
+@@ -87,6 +88,7 @@
+ ('sparc', '__sparc__'),
+ ('mips64', '__mips64'),
+ ('mips32', '__mips__'),
++ ('riscv64', '__riscv && __riscv_xlen == 64'),
+ ('sh4', '__sh__'),
+ ))
+
+diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+index 37c4e26f0fb..5d3d5891dca 100755
+--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
++++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+@@ -1208,6 +1208,10 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest):
+ 'mips-unknown-linux-gnu': big_endian + {
+ '__mips__': 1,
+ },
++ 'riscv64-unknown-linux-gnu': little_endian + {
++ '__riscv': 1,
++ '__riscv_xlen': 64,
++ },
+ 'sh4-unknown-linux-gnu': little_endian + {
+ '__sh__': 1,
+ },
diff --git a/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild b/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild
index 17fed702c27..250dca91fcc 100644
--- a/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild
@@ -98,6 +98,7 @@ src_prepare() {
rm "${WORKDIR}"/firefox/2016_set_CARGO_PROFILE_RELEASE_LTO.patch
eapply "${WORKDIR}"/firefox
eapply "${WORKDIR}"/spidermonkey-patches
+ eapply "${FILESDIR}"/spidermonkey-68.0-add-riscv-support.patch
default
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2022-05-26 0:58 WANG Xuerui
0 siblings, 0 replies; 14+ messages in thread
From: WANG Xuerui @ 2022-05-26 0:58 UTC (permalink / raw
To: gentoo-commits
commit: ba4514f5b434a0a974c6d5ad759f4f6bde11eaaf
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Wed May 25 14:32:30 2022 +0000
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Thu May 26 00:55:36 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba4514f5
dev-lang/spidermonkey: fix build on loong for 68.12.0-r1
Patch applied here has been running on real loong hardware since late
2021, simple and no problems so far.
See: https://github.com/gentoo/gentoo/pull/25632
Acked-by: Joonas Niilola <juippis <AT> gentoo.org>
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
.../files/spidermonkey-68.0-loong-support.patch | 103 +++++++++++++++++++++
.../spidermonkey/spidermonkey-68.12.0-r1.ebuild | 1 +
2 files changed, 104 insertions(+)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-68.0-loong-support.patch b/dev-lang/spidermonkey/files/spidermonkey-68.0-loong-support.patch
new file mode 100644
index 000000000000..f7010d5ebf32
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-68.0-loong-support.patch
@@ -0,0 +1,103 @@
+https://raw.githubusercontent.com/xen0n/loongson-overlay/00901fd4c599ec320c7852cbd30b40d3f6aa8971/dev-lang/spidermonkey/files/spidermonkey-68.0-add-loongarch64-support.patch
+
+--- a/build/moz.configure/init.configure
++++ b/build/moz.configure/init.configure
+@@ -734,6 +734,9 @@ def split_triplet(triplet, allow_unknown
+ elif cpu == 'sh4':
+ canonical_cpu = 'sh4'
+ endianness = 'little'
++ elif cpu == 'loongarch64':
++ canonical_cpu = 'loongarch64'
++ endianness = 'little'
+ elif allow_unknown:
+ canonical_cpu = cpu
+ endianness = 'unknown'
+--- a/js/src/jit/AtomicOperations.h
++++ b/js/src/jit/AtomicOperations.h
+@@ -382,6 +382,9 @@ inline bool AtomicOperations::isLockfree
+ # else
+ # include "jit/shared/AtomicOperations-feeling-lucky.h"
+ # endif
++#elif defined(__loongarch64)
++// This is only here to avoid merge conflict with spidermonkey-68.0-add-riscv-support.patch.
++# include "jit/shared/AtomicOperations-feeling-lucky.h"
+ #elif defined(__mips__)
+ # if defined(__clang__) || defined(__GNUC__)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
++++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+@@ -57,6 +57,11 @@
+ # define HAS_64BIT_LOCKFREE
+ #endif
+
++#ifdef __loongarch64
++# define HAS_64BIT_ATOMICS
++# define HAS_64BIT_LOCKFREE
++#endif
++
+ #if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
+ defined(__PPC64LE__)
+ # define HAS_64BIT_ATOMICS
+--- a/mfbt/tests/TestPoisonArea.cpp
++++ b/mfbt/tests/TestPoisonArea.cpp
+@@ -127,6 +127,9 @@
+ #elif defined __arm__ || defined _M_ARM
+ # define RETURN_INSTR 0xE12FFF1E /* bx lr */
+
++#elif defined __loongarch__
++# define RETURN_INSTR 0x4c000020 /* jirl zero, ra, 0 */
++
+ // PPC has its own style of CPU-id #defines. There is no Windows for
+ // PPC as far as I know, so no _M_ variant.
+ #elif defined _ARCH_PPC || defined _ARCH_PWR || defined _ARCH_PWR2
+--- a/python/mozbuild/mozbuild/configure/constants.py
++++ b/python/mozbuild/mozbuild/configure/constants.py
+@@ -46,6 +46,7 @@ CPU_bitness = {
+ 'arm': 32,
+ 'hppa': 32,
+ 'ia64': 64,
++ 'loongarch64': 64,
+ 'mips32': 32,
+ 'mips64': 64,
+ 'ppc': 32,
+@@ -78,6 +79,7 @@ CPU_preprocessor_checks = OrderedDict((
+ ('arm', '__arm__ || _M_ARM'),
+ ('aarch64', '__aarch64__ || _M_ARM64'),
+ ('ia64', '__ia64__'),
++ ('loongarch64', '__loongarch64'),
+ ('s390x', '__s390x__'),
+ ('s390', '__s390__'),
+ ('ppc64', '__powerpc64__'),
+--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
++++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+@@ -1068,6 +1068,10 @@ class LinuxCrossCompileToolchainTest(Bas
+ 'ia64-unknown-linux-gnu': little_endian + {
+ '__ia64__': 1,
+ },
++ 'loongarch64-unknown-linux-gnu': little_endian + {
++ '__loongarch__': 1,
++ '__loongarch64': 1,
++ },
+ 's390x-unknown-linux-gnu': big_endian + {
+ '__s390x__': 1,
+ '__s390__': 1,
+--- a/intl/icu/source/i18n/double-conversion-utils.h
++++ b/intl/icu/source/i18n/double-conversion-utils.h
+@@ -117,6 +117,7 @@ int main(int argc, char** argv) {
+ #if defined(_M_X64) || defined(__x86_64__) || \
+ defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
+ defined(__hppa__) || defined(__ia64__) || \
++ defined(__loongarch__) || \
+ defined(__mips__) || \
+ defined(__nios2__) || defined(__ghs) || \
+ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+--- a/mfbt/double-conversion/double-conversion/utils.h
++++ b/mfbt/double-conversion/double-conversion/utils.h
+@@ -117,6 +117,7 @@ int main(int argc, char** argv) {
+ #if defined(_M_X64) || defined(__x86_64__) || \
+ defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
+ defined(__hppa__) || defined(__ia64__) || \
++ defined(__loongarch__) || \
+ defined(__mips__) || \
+ defined(__nios2__) || defined(__ghs) || \
+ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
diff --git a/dev-lang/spidermonkey/spidermonkey-68.12.0-r1.ebuild b/dev-lang/spidermonkey/spidermonkey-68.12.0-r1.ebuild
index a836814ad075..46cc4b1b3634 100644
--- a/dev-lang/spidermonkey/spidermonkey-68.12.0-r1.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-68.12.0-r1.ebuild
@@ -101,6 +101,7 @@ src_prepare() {
eapply "${WORKDIR}"/firefox
eapply "${WORKDIR}"/spidermonkey-patches
eapply "${FILESDIR}"/spidermonkey-68.0-add-riscv-support.patch
+ eapply "${FILESDIR}"/spidermonkey-68.0-loong-support.patch
default
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2022-08-16 7:55 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2022-08-16 7:55 UTC (permalink / raw
To: gentoo-commits
commit: f4244d268d795cf30a18adb4e03864f6cbf20e23
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 16 07:47:01 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 07:55:02 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4244d26
dev-lang/spidermonkey: add 102.1.0
Bug: https://bugs.gentoo.org/854591
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 3 +
.../files/spidermonkey-102-known-test-failures.txt | 5 +
dev-lang/spidermonkey/spidermonkey-102.1.0.ebuild | 403 +++++++++++++++++++++
3 files changed, 411 insertions(+)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 294377e9f668..0f65729860f9 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -1,3 +1,5 @@
+DIST firefox-102.1.0esr.source.tar.xz 486756700 BLAKE2B d046c386f7c6822510fa309a5455cc80deaaf59a5cc274176a74b4dfe2feaa60140d3197f91c221338d7d96ddae48a411c4a376afa1db3ed6fc8688cf2f97119 SHA512 2505b87ce4115445568eb6b7d8af41678bd787fd07f3f79e9f0a22d90cdf752ae5d4371856cf9c56e2d9da7d5b7c3939dc2aab5753fcc017398e7d65260f6f03
+DIST firefox-102esr-patches-01j.tar.xz 16572 BLAKE2B 28be4564c6ae20cd44ee4034e61d594bc9d0d5ef06abca81e8d319fc629ee768adb662226acc69454b6875b033bce89b30da3679f3b9a53dbdc97d78f94a2b14 SHA512 36ec59f1ea88513c69bc1b42b47b639510b91cfe59fc80da393bc89c239024af2a9787e33b49e73d380b3c07603ea7b6c95fb435416f25c1baa285b4e0462679
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.15.0esr.source.tar.xz 330819568 BLAKE2B dc8785613c2f72c55d484642c89c2545765a9efbd609bc7c2cf57b4a3a06a2ea22e6959e42b5b8af867db782e8b2097a67dec858796b744e47008a8e575e2316 SHA512 ac3de735b246ce4f0e1619cd2664321ffa374240ce6843e785d79a350dc30c967996bbcc5e3b301cb3d822ca981cbea116758fc4122f1738d75ddfd1165b6378
@@ -6,6 +8,7 @@ DIST firefox-91.11.0esr.source.tar.xz 384459848 BLAKE2B cff327378a1712d0dfb99e1a
DIST firefox-91.12.0esr.source.tar.xz 379877004 BLAKE2B c00e5cc219c59d8347a69e5236a4a4f439d9caae6ab7dabc3ed8c8f9a096ded26ec1ffb53b015b86481f1d43ec4f263bb8acbd841ebf36e8a741d73e12a0a914 SHA512 323fb752488b45872b40f0b0ee1d8c1dffa16874dbff2afde19a54286c824ef48177233e029faeafa5946184e71c31c6bc5ba7ec17a571e21af64fc5f7334042
DIST firefox-91esr-patches-10j.tar.xz 18320 BLAKE2B ec882411eed19bafab8676e3d79f4ae43947bb97c44571c1497bb93a44fcfec99de06ebacbdf8c4944dcecdf949e4f684908d7ce4226cdcec60241e62e75810e SHA512 670a14d852bb74b9074c3fef9310650f71ce1c56314109c49aea02a7a69acc836af60a8beab11da53e21b10a8e6da341fcfa18b68a1dfd33b26978dd63758e9c
DIST mozjs-60.5.2.tar.bz2 32816585 BLAKE2B 45ac4c9646e1275faf60eeedbf486f802cd106583eb7f640fe2243adc7cbb811dced5cefa94426cceca63468b0112be84078ffcef24cb2b8c1a7b6c8173c0d45 SHA512 5fb73330e7803bdd524fbe7cfdf4e6b72e85d4b22b0c827400317b5d052d1088d36e558ceac376393089e9d03e658b24e69262851fc04a66bbcda47135423dc0
+DIST spidermonkey-102-patches-01j.tar.xz 5208 BLAKE2B abac43e27efa1501968dcf50f8a05a95e7f1107c1b1b4f4bc5ffa2b6ba5968b29dbafbcd8ff3c11e44c2d8ab31fff538ad076dfd55a5ff9951cc019ce11756b2 SHA512 003217c05be67d03b59a1b9ed536079c19b07b90e7279ef362d6d95cdb8bcdadd2ee87ffd9b22cfe05a395adf082a20ecae3e0e94d4971b298cd88015f3918c7
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-04.tar.xz 3408 BLAKE2B f2fdd4882e1e4de1908c458dc8dfedd5665ef7118f19704dabf2b2a80e2fae48813e9bc3d0c3410287e32c21e3f9d09233d8e5d15917f53aa2f60e6190cd9cdb SHA512 87ac83c0ccc05f482913b1fbf043db1878536f935f934362a47283809c0cbfdeff040206a9c18c687384b606ba8a7bd9a7c1fc3c0bcfdd620987990a33ca1fe2
diff --git a/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
new file mode 100644
index 000000000000..e3ba380635b8
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
@@ -0,0 +1,5 @@
+non262/Intl/available-locales-supported.js
+non262/Intl/available-locales-resolved.js
+non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
+non262/Intl/DateTimeFormat/day-period-hour-cycle.js
+non262/Date/time-zone-etc_localetime.js
diff --git a/dev-lang/spidermonkey/spidermonkey-102.1.0.ebuild b/dev-lang/spidermonkey/spidermonkey-102.1.0.ebuild
new file mode 100644
index 000000000000..ffb342118c01
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-102.1.0.ebuild
@@ -0,0 +1,403 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-102esr-patches-01j.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-102-patches-01j.tar.xz"
+
+LLVM_MAX_SLOT=14
+
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE="ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix 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/~{juippis,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~{juippis,whissi}/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://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+SLOT="$(ver_cut 1)"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ >=virtual/rust-1.51.0
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )
+ || (
+ (
+ sys-devel/llvm:14
+ clang? (
+ sys-devel/clang:14
+ lto? ( =sys-devel/lld-14* )
+ )
+ )
+ (
+ sys-devel/llvm:13
+ clang? (
+ sys-devel/clang:13
+ lto? ( =sys-devel/lld-13* )
+ )
+ )
+ )"
+DEPEND=">=dev-libs/icu-71.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use lto ; then
+ if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
+ einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ python_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 [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7600M"
+ else
+ CHECKREQS_DISK_BUILD="6400M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ 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 cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # 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"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ 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() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang && ! tc-is-clang ; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+ have_switched_compiler=yes
+ AR=llvm-ar
+ AS=llvm-as
+ CC=${CHOST}-clang
+ CXX=${CHOST}-clang++
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
+
+ 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-ctype
+ --disable-jemalloc
+ --disable-optimize
+ --disable-smoosh
+ --disable-strip
+
+ --enable-readline
+ --enable-release
+ --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
+ if use clang ; then
+ myeconfargs+=( --enable-linker=lld )
+ myeconfargs+=( --enable-lto=cross )
+ else
+ myeconfargs+=( --enable-linker=bfd )
+ myeconfargs+=( --enable-lto=full )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-flags '-flto*'
+
+ if tc-is-gcc ; then
+ if ver_test $(gcc-fullversion) -ge 10 ; then
+ einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..."
+ append-cxxflags -fno-tree-loop-vectorize
+ fi
+ fi
+
+ export MACH_USE_SYSTEM_PYTHON=1
+ export PIP_NO_CACHE_DIR=off
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # 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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
+
+ if [[ $(tc-endian) == "big" ]] ; then
+ echo "non262/extensions/clone-errors.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js" >> "${T}"/known_failures.list
+ fi
+
+ ${EPYTHON} \
+ "${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
+ ${EPYTHON} \
+ "${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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2022-10-23 6:27 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2022-10-23 6:27 UTC (permalink / raw
To: gentoo-commits
commit: e981f16884a12a39bc8ce103c9cb2ae8f063fd81
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 06:25:39 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 06:27:25 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e981f168
dev-lang/spidermonkey: add 102.4.0
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 2 +
.../files/spidermonkey-102-known-test-failures.txt | 94 ++++-
dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild | 404 +++++++++++++++++++++
3 files changed, 498 insertions(+), 2 deletions(-)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 5df8900dc4c9..7a2fd0ae9d22 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -1,5 +1,7 @@
DIST firefox-102.3.0esr.source.tar.xz 478260896 BLAKE2B c40ddcfefee874f6dff5d175331144461917269e912d959af20aa19cb8bdc57209403d1e5962311614be8fede33733f734c19bb0d32d881421fa1197539dce5f SHA512 35357791f4de8b474780083a22fb52b7846b8012cbf01403f2b9526151d11c196ce0f9fba8e0f16d8235d7259af6fba1bc3acbb5b7e79129a28f390467aa7556
+DIST firefox-102.4.0esr.source.tar.xz 482118312 BLAKE2B dadb293edf4df20da5345aab6845ca9da8143a966b38d3660ea8ebc4f24ecab72097ba4345d30895907c83895883379867437f8097b86af4e7e0e691da551793 SHA512 30d9e6ef04fd86516e2cea3c797ec99af4c96b08576bb3409c0026da4fd1218167f89a007109e1fa4e2571f98f2dbe5ab58a26473533d45301f75b90ec3dbf28
DIST firefox-102esr-patches-02j.tar.xz 19688 BLAKE2B f26b8dd2613712ab49db34247c432769386ac066238b86c0eea367cebbd167334f822866129d0874efc35da4da686e6185881649b0b3095dede28ec8c658a3b2 SHA512 456cd2b7d9f907080afb5225d353154117624fa938f24dcfae7ada03f5b39572e5d6d6e1a4bba7825465b48f6d38b04e5c0f69556c82d4ebbe1463e11dc809d7
+DIST firefox-102esr-patches-04j.tar.xz 21860 BLAKE2B 1cc1d6493912f85e71cb5a0ec2c3196cda203242f3503bb6ce8c23a93e71a6e8b1138f88498a6a9698066134cc234989b35cb378693fb2cbc9ba4caa8d66761d SHA512 9f7188dd79b9856826ae2a60b0109c2c86c60c10b03cd1828a9f7a7576df5c49ed3e11e4d3319d80e117204d6bc3408e375a62ad16ec8d2e53f999cd298811d8
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.15.0esr.source.tar.xz 330819568 BLAKE2B dc8785613c2f72c55d484642c89c2545765a9efbd609bc7c2cf57b4a3a06a2ea22e6959e42b5b8af867db782e8b2097a67dec858796b744e47008a8e575e2316 SHA512 ac3de735b246ce4f0e1619cd2664321ffa374240ce6843e785d79a350dc30c967996bbcc5e3b301cb3d822ca981cbea116758fc4122f1738d75ddfd1165b6378
diff --git a/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
index 2585667d7260..c2b558c0b2b0 100644
--- a/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
+++ b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
@@ -1,9 +1,99 @@
+non262/Date/15.9.5.7.js
+non262/Date/reset-time-zone-cache-same-offset.js
non262/Date/time-zone-etc_localetime.js
+non262/Date/time-zones-historic.js
non262/Date/time-zones-imported.js
+non262/Date/toString-localized-posix.js
+non262/Date/toString-localized.js
+non262/Intl/Array/toLocaleString-date.js
+non262/Intl/Collator/collation.js
+non262/Intl/Date/toLocaleString_timeZone.js
+non262/Intl/Date/toLocaleTimeString_timeZone.js
non262/Intl/DateTimeFormat/day-period-hour-cycle.js
+non262/Intl/DateTimeFormat/extended-time-zone-names.js
+non262/Intl/DateTimeFormat/field-widths.js
+non262/Intl/DateTimeFormat/format.js
+non262/Intl/DateTimeFormat/formatRange-hour-cycle.js
+non262/Intl/DateTimeFormat/formatToParts.js
+non262/Intl/DateTimeFormat/format_timeZone.js
non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
-non262/Intl/DateTimeFormat/timeZone_backward_links.js
+non262/Intl/DateTimeFormat/hourCycle.js
+non262/Intl/DateTimeFormat/implied-script-has-consistent-output.js
non262/Intl/DateTimeFormat/timeZone_version.js
+non262/Intl/DisplayNames/calendar.js
+non262/Intl/DisplayNames/dateTimeField.js
+non262/Intl/ListFormat/conjunction-type.js
+non262/Intl/Locale/likely-subtags-generated.js
+non262/Intl/NumberFormat/currency-narrow-symbol.js
+non262/Intl/NumberFormat/format.js
+non262/Intl/NumberFormat/notation-compact-long.js
non262/Intl/available-locales-resolved.js
non262/Intl/available-locales-supported.js
-non262/Intl/supportedValuesOf-timeZones-canonical.js
+test262/built-ins/RegExp/property-escapes/generated/Alphabetic.js
+test262/built-ins/RegExp/property-escapes/generated/Assigned.js
+test262/built-ins/RegExp/property-escapes/generated/Case_Ignorable.js
+test262/built-ins/RegExp/property-escapes/generated/Cased.js
+test262/built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded.js
+test262/built-ins/RegExp/property-escapes/generated/Diacritic.js
+test262/built-ins/RegExp/property-escapes/generated/Emoji.js
+test262/built-ins/RegExp/property-escapes/generated/Emoji_Modifier_Base.js
+test262/built-ins/RegExp/property-escapes/generated/Emoji_Presentation.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Cased_Letter.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Format.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Letter.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Lowercase_Letter.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Letter.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Nonspacing_Mark.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Number.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Letter.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Number.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Punctuation.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Symbol.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Spacing_Mark.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Symbol.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned.js
+test262/built-ins/RegExp/property-escapes/generated/Grapheme_Base.js
+test262/built-ins/RegExp/property-escapes/generated/Grapheme_Extend.js
+test262/built-ins/RegExp/property-escapes/generated/ID_Continue.js
+test262/built-ins/RegExp/property-escapes/generated/ID_Start.js
+test262/built-ins/RegExp/property-escapes/generated/Ideographic.js
+test262/built-ins/RegExp/property-escapes/generated/Lowercase.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Arabic.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Common.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Cyrillic.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Devanagari.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Egyptian_Hieroglyphs.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Han.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Hiragana.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Kannada.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Katakana.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Khojki.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Lao.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Latin.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Arabic.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Common.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cyrillic.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Devanagari.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Egyptian_Hieroglyphs.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hiragana.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kannada.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khojki.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lao.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Latin.js
+test262/built-ins/RegExp/property-escapes/generated/Sentence_Terminal.js
+test262/built-ins/RegExp/property-escapes/generated/Soft_Dotted.js
+test262/built-ins/RegExp/property-escapes/generated/Terminal_Punctuation.js
+test262/built-ins/RegExp/property-escapes/generated/Unified_Ideograph.js
+test262/built-ins/RegExp/property-escapes/generated/XID_Continue.js
+test262/built-ins/RegExp/property-escapes/generated/XID_Start.js
+test262/intl402/DateTimeFormat/prototype/format/timedatestyle-en.js
+test262/intl402/DateTimeFormat/prototype/formatRange/en-US.js
+test262/intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js
+test262/intl402/DateTimeFormat/prototype/formatRangeToParts/en-US.js
+test262/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js
diff --git a/dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild b/dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild
new file mode 100644
index 000000000000..40a248c7290f
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild
@@ -0,0 +1,404 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-102esr-patches-04j.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-102-patches-04j.tar.xz"
+
+LLVM_MAX_SLOT=14
+
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE="ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix 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/~{juippis,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~{juippis,whissi}/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://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+SLOT="$(ver_cut 1)"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ >=virtual/rust-1.59.0
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )
+ || (
+ (
+ sys-devel/llvm:14
+ clang? (
+ sys-devel/clang:14
+ lto? ( sys-devel/lld:14 )
+ )
+ )
+ (
+ sys-devel/llvm:13
+ clang? (
+ sys-devel/clang:13
+ lto? ( sys-devel/lld:13 )
+ )
+ )
+ )"
+DEPEND=">=dev-libs/icu-71.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use lto ; then
+ if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
+ einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7000M"
+ else
+ CHECKREQS_DISK_BUILD="6000M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7000M"
+ else
+ CHECKREQS_DISK_BUILD="6000M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ 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 cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # 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"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ 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() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang && ! tc-is-clang ; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+ have_switched_compiler=yes
+ AR=llvm-ar
+ AS=llvm-as
+ CC=${CHOST}-clang
+ CXX=${CHOST}-clang++
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
+
+ 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-ctype
+ --disable-jemalloc
+ --disable-optimize
+ --disable-smoosh
+ --disable-strip
+
+ --enable-readline
+ --enable-release
+ --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
+ if use clang ; then
+ myeconfargs+=( --enable-linker=lld )
+ myeconfargs+=( --enable-lto=cross )
+ else
+ myeconfargs+=( --enable-linker=bfd )
+ myeconfargs+=( --enable-lto=full )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-flags '-flto*'
+
+ if tc-is-gcc ; then
+ if ver_test $(gcc-fullversion) -ge 10 ; then
+ einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..."
+ append-cxxflags -fno-tree-loop-vectorize
+ fi
+ fi
+
+ # Use system's Python environment
+ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+ export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # 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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
+
+ if [[ $(tc-endian) == "big" ]] ; then
+ echo "non262/extensions/clone-errors.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js" >> "${T}"/known_failures.list
+ fi
+
+ ${EPYTHON} \
+ "${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
+ ${EPYTHON} \
+ "${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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2022-12-15 11:40 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2022-12-15 11:40 UTC (permalink / raw
To: gentoo-commits
commit: 7cb5c829801b369b8dc7ce1dc068d9ee4d1a0967
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 15 11:39:45 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Dec 15 11:39:45 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cb5c829
dev-lang/spidermonkey: add 102.6.0
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 2 +
.../files/spidermonkey-102-known-test-failures.txt | 1 +
dev-lang/spidermonkey/spidermonkey-102.6.0.ebuild | 413 +++++++++++++++++++++
3 files changed, 416 insertions(+)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 0f972083e53f..c70d9f09d55a 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -1,6 +1,8 @@
DIST firefox-102.4.0esr.source.tar.xz 482118312 BLAKE2B dadb293edf4df20da5345aab6845ca9da8143a966b38d3660ea8ebc4f24ecab72097ba4345d30895907c83895883379867437f8097b86af4e7e0e691da551793 SHA512 30d9e6ef04fd86516e2cea3c797ec99af4c96b08576bb3409c0026da4fd1218167f89a007109e1fa4e2571f98f2dbe5ab58a26473533d45301f75b90ec3dbf28
DIST firefox-102.5.0esr.source.tar.xz 478705384 BLAKE2B ee005b0e75151e39a9f34ab38a7a704a1f2efd4fe33bacb6a604a8a6ce8727210d0794b81e03e448d5baa2be264a7150728aac4f5b86d0a5154d549abf0c75ac SHA512 f4e105209c61e9537ddc90afdb05ede0a31caceb9b164d96276c811abbd646d14bc246c00caa386c0b0561055096d30b298329c69270dd085b943bdbc3a91a13
+DIST firefox-102.6.0esr.source.tar.xz 478856656 BLAKE2B 2094bbb3ba00fc2d726a620e9946ca1ec98ad4c930ed611486ac92a7c74aa84da9c15b1353603eb36ce0a9098bd1f311dea2bea255f2bb6dd06fafbc7808d52c SHA512 c0f0160bea612d0ae74c29dd44beb7fd9a1c292694b8cd5c4faf2e54feb5c27684eee821b67dd40df714d69866a4e3a8b19e22182d9bc3023050d2d96b02d308
DIST firefox-102esr-patches-04j.tar.xz 21860 BLAKE2B 1cc1d6493912f85e71cb5a0ec2c3196cda203242f3503bb6ce8c23a93e71a6e8b1138f88498a6a9698066134cc234989b35cb378693fb2cbc9ba4caa8d66761d SHA512 9f7188dd79b9856826ae2a60b0109c2c86c60c10b03cd1828a9f7a7576df5c49ed3e11e4d3319d80e117204d6bc3408e375a62ad16ec8d2e53f999cd298811d8
+DIST firefox-102esr-patches-07j.tar.xz 23012 BLAKE2B 41b706f5ae8695ddd33e971cf1aa99317382a57618cf19163c5bca09ed5d430dba672ac51b7ab3072360452cc89ac50397bb7992882a61a3adda37022239e654 SHA512 7048353ea5504e34d9d3950e3e5e3125f631f95269d5c9e422ca052173a316718fdd4b57ea7980a452139b1192805cb598f47f398fb148a426a85a5e979c6cdd
DIST firefox-78.15.0esr.source.tar.xz 330819568 BLAKE2B dc8785613c2f72c55d484642c89c2545765a9efbd609bc7c2cf57b4a3a06a2ea22e6959e42b5b8af867db782e8b2097a67dec858796b744e47008a8e575e2316 SHA512 ac3de735b246ce4f0e1619cd2664321ffa374240ce6843e785d79a350dc30c967996bbcc5e3b301cb3d822ca981cbea116758fc4122f1738d75ddfd1165b6378
DIST firefox-78esr-patches-19.tar.xz 88424 BLAKE2B fdc7bf8f28b3e799551a70f1cec7a695f52c4712f3b28733648fcd7dac5a599613f4c3d2cfa169266dc62b65619b7f28c0e06d32317adb8ec0056ca79c87e9f6 SHA512 3c81dadc9bf74207c4e361605127ef6141d77700c5c54f1f9cd5ad3be13df9f73c6eec2f51d779558e4bdad1e7395c6aa8943a93415bd1786d461042bc03550a
DIST firefox-91.13.0esr.source.tar.xz 380053584 BLAKE2B 75d0daa512b3a2d41974a0169778be9ef19a100de2bd382add9831860ca93976585a41e760b6a7ec753268fb78f9f61049780fa7961834248bc8157cfdcc2827 SHA512 38b4cc52de21e76d6061e6ba175e1cbfd888a16070aa951f5a44283f2db9d7e94f2504621f0da78feac6e71491a6d0e7038f63dd0ae112dcad700eb02e9aa516
diff --git a/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
index c2b558c0b2b0..44d7f767c1d7 100644
--- a/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
+++ b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
@@ -29,6 +29,7 @@ non262/Intl/NumberFormat/format.js
non262/Intl/NumberFormat/notation-compact-long.js
non262/Intl/available-locales-resolved.js
non262/Intl/available-locales-supported.js
+non262/Intl/supportedValuesOf-timeZones-canonical.js
test262/built-ins/RegExp/property-escapes/generated/Alphabetic.js
test262/built-ins/RegExp/property-escapes/generated/Assigned.js
test262/built-ins/RegExp/property-escapes/generated/Case_Ignorable.js
diff --git a/dev-lang/spidermonkey/spidermonkey-102.6.0.ebuild b/dev-lang/spidermonkey/spidermonkey-102.6.0.ebuild
new file mode 100644
index 000000000000..5a4a29c4453f
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-102.6.0.ebuild
@@ -0,0 +1,413 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-102esr-patches-07j.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-102-patches-04j.tar.xz"
+
+LLVM_MAX_SLOT=15
+
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE="ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix 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/~{juippis,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~{juippis,whissi}/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://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+SLOT="$(ver_cut 1)"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ || (
+ (
+ sys-devel/llvm:15
+ clang? (
+ sys-devel/clang:15
+ virtual/rust:0/llvm-15
+ lto? ( sys-devel/lld:15 )
+ )
+ )
+ (
+ sys-devel/llvm:14
+ clang? (
+ sys-devel/clang:14
+ virtual/rust:0/llvm-14
+ lto? ( sys-devel/lld:14 )
+ )
+ )
+ )
+ !clang? ( virtual/rust )
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )"
+DEPEND=">=dev-libs/icu-71.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use lto ; then
+ if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+ einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7000M"
+ else
+ CHECKREQS_DISK_BUILD="6000M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7000M"
+ else
+ CHECKREQS_DISK_BUILD="6000M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ 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 cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # 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"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ 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() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+ if tc-is-gcc; then
+ have_switched_compiler=yes
+ fi
+ AR=llvm-ar
+ CC=${CHOST}-clang
+ CXX=${CHOST}-clang++
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ export AS="$(tc-getCC) -c"
+ tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
+
+ 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-ctype
+ --disable-jemalloc
+ --disable-optimize
+ --disable-smoosh
+ --disable-strip
+
+ --enable-readline
+ --enable-release
+ --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
+ if use clang ; then
+ myeconfargs+=( --enable-linker=lld )
+ myeconfargs+=( --enable-lto=cross )
+ else
+ myeconfargs+=( --enable-linker=bfd )
+ myeconfargs+=( --enable-lto=full )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-flags '-flto*'
+
+ if tc-is-gcc ; then
+ if ver_test $(gcc-fullversion) -ge 10 ; then
+ einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..."
+ append-cxxflags -fno-tree-loop-vectorize
+ fi
+ fi
+
+ # Use system's Python environment
+ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+ export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # 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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
+
+ if [[ $(tc-endian) == "big" ]] ; then
+ echo "non262/extensions/clone-errors.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js" >> "${T}"/known_failures.list
+ fi
+
+ ${EPYTHON} \
+ "${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
+ ${EPYTHON} \
+ "${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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2023-05-10 12:14 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-05-10 12:14 UTC (permalink / raw
To: gentoo-commits
commit: 6aad8625f0579570a07e4d437557ca7c7e842f07
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 12:14:25 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed May 10 12:14:51 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6aad8625
dev-lang/spidermonkey: add 102.11.0
Closes: https://bugs.gentoo.org/906045
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 1 +
.../files/spidermonkey-102-known-test-failures.txt | 5 +
dev-lang/spidermonkey/spidermonkey-102.11.0.ebuild | 413 +++++++++++++++++++++
3 files changed, 419 insertions(+)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index f033e43944c3..215166143f4b 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -1,4 +1,5 @@
DIST firefox-102.10.0esr.source.tar.xz 479026088 BLAKE2B b4d8eaa6d72b009d12b435781c360f043bca7554d8b069b8d858399ece03f20703d7e36427a3f92d0b801a94b1c3f132904f21e51ba4118116bbfa4e5668d651 SHA512 f2b53c35bdd22a3de6f32699b832babcbf499667197c02dd50cf0b6cd956e0f4471f420938c2ab72f0a0686ed99fe74e3184afe9b5f7169130879b8f8fd99f0b
+DIST firefox-102.11.0esr.source.tar.xz 477769716 BLAKE2B b19db1b35e6c652e2cd44ec5219bd5c42aacd55987962dbcaf50b5ec54d2ac5066290264f938ba3d45ef111779b9f27b06736ae7df11fa62478ab2179acfe723 SHA512 fdfed404c87f33001c0ab50f9899fa80c897fac645be8ed832e426f412aafbf1468b1c8301bad463b3f5535b6d6f2005a96a748b6e2d6bf5afbc3b5bc10983d6
DIST firefox-102.6.0esr.source.tar.xz 478856656 BLAKE2B 2094bbb3ba00fc2d726a620e9946ca1ec98ad4c930ed611486ac92a7c74aa84da9c15b1353603eb36ce0a9098bd1f311dea2bea255f2bb6dd06fafbc7808d52c SHA512 c0f0160bea612d0ae74c29dd44beb7fd9a1c292694b8cd5c4faf2e54feb5c27684eee821b67dd40df714d69866a4e3a8b19e22182d9bc3023050d2d96b02d308
DIST firefox-102.8.0esr.source.tar.xz 479172816 BLAKE2B 0b4cbf11028abc73a8479fb94670e98f0a293fc12381b1eccbadd64a33db068ab7434357abbe3ce0773382c7c90b8fe4d2258cc55abe8bdc2f551bba1dc2b797 SHA512 93ea87997b66088b94c6e943b6e99e9a71d1908444d096c0f65b6876d2c584e55ff6120266f3851f986b664bd1f12fa31206b03479c2b751e7c3ca097ac14275
DIST firefox-102.9.0esr.source.tar.xz 484308672 BLAKE2B dffd3928c268562802b9d9788cc83203ca932c85758b822c344e54259d81ef84668231149f3452cec3c2bf32c654db321303bcb9f81f8ccaac477ad2499ce346 SHA512 3923212ce4b7d1f589129025961ff1b380b8aaf1dd074674f3bd63cf14e9a44ff051bda556b7796c25634e153de00ce62243ece15a520f63dd0791a19b2a6685
diff --git a/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
index 44d7f767c1d7..ad245956ef03 100644
--- a/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
+++ b/dev-lang/spidermonkey/files/spidermonkey-102-known-test-failures.txt
@@ -19,11 +19,14 @@ non262/Intl/DateTimeFormat/format_timeZone.js
non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
non262/Intl/DateTimeFormat/hourCycle.js
non262/Intl/DateTimeFormat/implied-script-has-consistent-output.js
+non262/Intl/DateTimeFormat/timeZone_backzone.js
non262/Intl/DateTimeFormat/timeZone_version.js
non262/Intl/DisplayNames/calendar.js
non262/Intl/DisplayNames/dateTimeField.js
+non262/Intl/DisplayNames/language-dialect.js
non262/Intl/ListFormat/conjunction-type.js
non262/Intl/Locale/likely-subtags-generated.js
+non262/Intl/Locale/likely-subtags.js
non262/Intl/NumberFormat/currency-narrow-symbol.js
non262/Intl/NumberFormat/format.js
non262/Intl/NumberFormat/notation-compact-long.js
@@ -98,3 +101,5 @@ test262/intl402/DateTimeFormat/prototype/formatRange/en-US.js
test262/intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js
test262/intl402/DateTimeFormat/prototype/formatRangeToParts/en-US.js
test262/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js
+test262/intl402/Locale/constructor-non-iana-canon.js
+test262/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js
diff --git a/dev-lang/spidermonkey/spidermonkey-102.11.0.ebuild b/dev-lang/spidermonkey/spidermonkey-102.11.0.ebuild
new file mode 100644
index 000000000000..925c94a3b13e
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-102.11.0.ebuild
@@ -0,0 +1,413 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-102esr-patches-10j.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-102-patches-05j.tar.xz"
+
+LLVM_MAX_SLOT=15
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix 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/~{juippis,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~{juippis,whissi}/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://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+SLOT="$(ver_cut 1)"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ || (
+ (
+ sys-devel/llvm:15
+ clang? (
+ sys-devel/clang:15
+ virtual/rust:0/llvm-15
+ lto? ( sys-devel/lld:15 )
+ )
+ )
+ (
+ sys-devel/llvm:14
+ clang? (
+ sys-devel/clang:14
+ virtual/rust:0/llvm-14
+ lto? ( sys-devel/lld:14 )
+ )
+ )
+ )
+ !clang? ( virtual/rust )
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )"
+DEPEND=">=dev-libs/icu-71.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use lto ; then
+ if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+ einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7000M"
+ else
+ CHECKREQS_DISK_BUILD="6000M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7000M"
+ else
+ CHECKREQS_DISK_BUILD="6000M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ 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 cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # 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"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ 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() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+ if tc-is-gcc; then
+ have_switched_compiler=yes
+ fi
+ AR=llvm-ar
+ CC=${CHOST}-clang
+ CXX=${CHOST}-clang++
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ export AS="$(tc-getCC) -c"
+ tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
+
+ 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-ctype
+ --disable-jemalloc
+ --disable-smoosh
+ --disable-strip
+
+ --enable-readline
+ --enable-release
+ --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 debug; then
+ myeconfargs+=( --disable-optimize )
+ myeconfargs+=( --enable-debug-symbols )
+ else
+ myeconfargs+=( --enable-optimize )
+ myeconfargs+=( --disable-debug-symbols )
+ fi
+
+ 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
+ if use clang ; then
+ myeconfargs+=( --enable-linker=lld )
+ myeconfargs+=( --enable-lto=cross )
+ else
+ myeconfargs+=( --enable-linker=bfd )
+ myeconfargs+=( --enable-lto=full )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-flags '-flto*'
+
+ # Use system's Python environment
+ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+ export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # 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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
+
+ if [[ $(tc-endian) == "big" ]] ; then
+ echo "non262/extensions/clone-errors.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js" >> "${T}"/known_failures.list
+ fi
+
+ ${EPYTHON} \
+ "${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
+ ${EPYTHON} \
+ "${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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2023-08-12 8:38 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-08-12 8:38 UTC (permalink / raw
To: gentoo-commits
commit: ed4aed200e80d87236078666a4d10d7393fa364b
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 12 08:38:05 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Aug 12 08:38:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed4aed20
dev-lang/spidermonkey: add 115.1.0
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 3 +
.../files/spidermonkey-115-known-test-failures.txt | 9 +
dev-lang/spidermonkey/spidermonkey-115.1.0.ebuild | 465 +++++++++++++++++++++
3 files changed, 477 insertions(+)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index b3f678fd4068..883ea275a639 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -4,11 +4,14 @@ DIST firefox-102.14.0esr.source.tar.xz 479449456 BLAKE2B 14dc7b9a4d4ab99b342f64f
DIST firefox-102.6.0esr.source.tar.xz 478856656 BLAKE2B 2094bbb3ba00fc2d726a620e9946ca1ec98ad4c930ed611486ac92a7c74aa84da9c15b1353603eb36ce0a9098bd1f311dea2bea255f2bb6dd06fafbc7808d52c SHA512 c0f0160bea612d0ae74c29dd44beb7fd9a1c292694b8cd5c4faf2e54feb5c27684eee821b67dd40df714d69866a4e3a8b19e22182d9bc3023050d2d96b02d308
DIST firefox-102esr-patches-07j.tar.xz 23012 BLAKE2B 41b706f5ae8695ddd33e971cf1aa99317382a57618cf19163c5bca09ed5d430dba672ac51b7ab3072360452cc89ac50397bb7992882a61a3adda37022239e654 SHA512 7048353ea5504e34d9d3950e3e5e3125f631f95269d5c9e422ca052173a316718fdd4b57ea7980a452139b1192805cb598f47f398fb148a426a85a5e979c6cdd
DIST firefox-102esr-patches-10j.tar.xz 21744 BLAKE2B 326f206dfcd5b6ea2f06f5f537505e23d358f6d7930f7e72fd8e54af88d97172170999c246af888278143810df42be9414541e47feb48b60732565a4ee38579e SHA512 5efa50b221abedbb84c1b3d19d8ac089ac5752448e8c90c6aed9f43bf3eee876b7e7050a1678bca65f6b23734c4945b016bf059a3921ad7290b0150538111bbd
+DIST firefox-115.1.0esr.source.tar.xz 507060904 BLAKE2B 4da0535e05e193d0d7509790f3a6b0f8dd4dd809bdfab14da357ef06ce2b665d89a5620994393d6bdbe6a8fba1db55157063b7760fdd2e75f2bddca86f9992b4 SHA512 b2abb706fef2f1aa9451e7ac7c2affa0cc92cf2b0c6629f106a94c62017476380c7b6f406861fa468f60ea898d8402f534ad74844eb3932741fbd981cec66592
+DIST firefox-115esr-patches-04.tar.xz 14608 BLAKE2B 78143b2ed2f0c71bef84c26ebbb9f29912e6d8bb2f513cf95f5d97203efb556cb339bbb1f61666300786eb5b1f93294816481a0396bd8acc497c9f51b138376a SHA512 f6b07b9f94a79c766b864c4f73044dfd6aea5faf16e742202ca78f4f6e0399a71fc3dcf4d40d4dd67d3f13612c26a5e1a5f845e6892901c0ee6168aabf131f79
DIST firefox-78.15.0esr.source.tar.xz 330819568 BLAKE2B dc8785613c2f72c55d484642c89c2545765a9efbd609bc7c2cf57b4a3a06a2ea22e6959e42b5b8af867db782e8b2097a67dec858796b744e47008a8e575e2316 SHA512 ac3de735b246ce4f0e1619cd2664321ffa374240ce6843e785d79a350dc30c967996bbcc5e3b301cb3d822ca981cbea116758fc4122f1738d75ddfd1165b6378
DIST firefox-78esr-patches-19.tar.xz 88424 BLAKE2B fdc7bf8f28b3e799551a70f1cec7a695f52c4712f3b28733648fcd7dac5a599613f4c3d2cfa169266dc62b65619b7f28c0e06d32317adb8ec0056ca79c87e9f6 SHA512 3c81dadc9bf74207c4e361605127ef6141d77700c5c54f1f9cd5ad3be13df9f73c6eec2f51d779558e4bdad1e7395c6aa8943a93415bd1786d461042bc03550a
DIST firefox-91.13.0esr.source.tar.xz 380053584 BLAKE2B 75d0daa512b3a2d41974a0169778be9ef19a100de2bd382add9831860ca93976585a41e760b6a7ec753268fb78f9f61049780fa7961834248bc8157cfdcc2827 SHA512 38b4cc52de21e76d6061e6ba175e1cbfd888a16070aa951f5a44283f2db9d7e94f2504621f0da78feac6e71491a6d0e7038f63dd0ae112dcad700eb02e9aa516
DIST firefox-91esr-patches-10j.tar.xz 18320 BLAKE2B ec882411eed19bafab8676e3d79f4ae43947bb97c44571c1497bb93a44fcfec99de06ebacbdf8c4944dcecdf949e4f684908d7ce4226cdcec60241e62e75810e SHA512 670a14d852bb74b9074c3fef9310650f71ce1c56314109c49aea02a7a69acc836af60a8beab11da53e21b10a8e6da341fcfa18b68a1dfd33b26978dd63758e9c
DIST spidermonkey-102-patches-04j.tar.xz 3996 BLAKE2B 468697521adacc5d647b04f2228fc4c1a8131bc2523142f2d57f32e321303581ae8f793baae48966ecb27f48bf77eb084f7b2df1c1a0c667e9ed59ae93d786e6 SHA512 201bb779e2373cc00dfadc29a62b593030dfc12eec076114b92927f29f476d3fafdd056112dd1bb1f19f82827f4fe1252141e3998bec719e4196737a316d4ef2
DIST spidermonkey-102-patches-05j.tar.xz 4596 BLAKE2B 215b770bbdf17973d7b3fd1df6cee9647459d2b02b0be5bdb289d457e5dbdb06ceac7a3082fc2f5836e991a4ac4486d73330b0276a466b5c528dab226a27829c SHA512 d2b8e32dac87d60a00fd93479dc34d8adab4feec24a38591cebeb4cf271aa2fd964f4dc26e67ebfb127a47bc8f684d50b32b2cff18ed5286701a04a289058185
+DIST spidermonkey-115-patches-01.tar.xz 3992 BLAKE2B e97d0cb3edfb885119226f54f22485ed4e8220cd904d3356b87ccc013403f976a042171cf9ca7250bcf3fe3d90996dd80b4104e7d614f95d7bcfcb0e710a8a78 SHA512 cece96f172a09dd0e29f7c2fdbf650cde405b276bc4083956365289f1da4b1d078ccbde760da6553888ddb3c53cf9aded52051db556a2c4ec492fed01dcb03a1
DIST spidermonkey-78-patches-05.tar.xz 4480 BLAKE2B aaba61d1ee72496ef02463333a9fa9cc18b873953d1875411667fec73cd9f485224371cde65be0506fa3853368a0885cba3a109e052a3408e7d0ff22a8066e22 SHA512 c2522081bcc58d6f517320c344747403e1525c887b2f7ad6d23df76a954cdac1660d7fe5e2ae7a040763d6a6e0e6eaf127c8bffbd9d3ac0283d19d0d6f1f5edd
DIST spidermonkey-91-patches-05j.tar.xz 5964 BLAKE2B 13f09f77bf16bc61b03c9488b7ab521552e179bfb123e390d0883ea4a3f55e87e0a5d5a246f31a9ddc35f212ea84655fe9d4fc364bbdddc1aac421eb28dbe41f SHA512 4d9cf21b712234ff6a18554a010badd756028e6147597040c423f7e27d260e3984938f956d9bc3572557163a144345ed28d9f88e459fc959aaa6fd448f6deab7
diff --git a/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
new file mode 100644
index 000000000000..14c4db040eda
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
@@ -0,0 +1,9 @@
+non262/Date/time-zone-etc_localetime.js
+non262/Intl/Collator/big5han-gb2312han.js
+non262/Intl/Collator/implicithan.js
+non262/Intl/DateTimeFormat/day-period-hour-cycle.js
+non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
+non262/Intl/DateTimeFormat/timeZone_backzone.js
+non262/Intl/available-locales-resolved.js
+non262/Intl/available-locales-supported.js
+non262/Intl/supportedValuesOf-timeZones-canonical.js
diff --git a/dev-lang/spidermonkey/spidermonkey-115.1.0.ebuild b/dev-lang/spidermonkey/spidermonkey-115.1.0.ebuild
new file mode 100644
index 000000000000..e82f8f901136
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-115.1.0.ebuild
@@ -0,0 +1,465 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-115esr-patches-04.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-115-patches-01.tar.xz"
+
+LLVM_MAX_SLOT=16
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix 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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~juippis/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://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
+
+KEYWORDS="~amd64"
+
+SLOT="$(ver_cut 1)"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ || (
+ (
+ sys-devel/llvm:16
+ clang? (
+ || (
+ sys-devel/lld:16
+ sys-devel/mold
+ )
+ sys-devel/clang:16
+ virtual/rust:0/llvm-16
+ )
+ )
+ (
+ sys-devel/llvm:15
+ clang? (
+ || (
+ sys-devel/lld:15
+ sys-devel/mold
+ )
+ sys-devel/clang:15
+ virtual/rust:0/llvm-15
+ )
+ )
+ )
+ !clang? ( virtual/rust )
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )"
+DEPEND=">=dev-libs/icu-73.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! tc-ld-is-mold ; then
+ if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+ einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily
+# placed here until toolchain-funcs.eclass gets an official support for mold linker.
+# Please see:
+# https://github.com/gentoo/gentoo/pull/28366 ||
+# https://github.com/gentoo/gentoo/pull/28355
+tc-ld-is-mold() {
+ local out
+
+ # Ensure ld output is in English.
+ local -x LC_ALL=C
+
+ # First check the linker directly.
+ out=$($(tc-getLD "$@") --version 2>&1)
+ if [[ ${out} == *"mold"* ]] ; then
+ return 0
+ fi
+
+ # Then see if they're selecting mold via compiler flags.
+ # Note: We're assuming they're using LDFLAGS to hold the
+ # options and not CFLAGS/CXXFLAGS.
+ local base="${T}/test-tc-linker"
+ cat <<-EOF > "${base}.c"
+ int main() { return 0; }
+ EOF
+ out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
+ rm -f "${base}"*
+ if [[ ${out} == *"mold"* ]] ; then
+ return 0
+ fi
+
+ # No mold here!
+ return 1
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4000M"
+ else
+ CHECKREQS_DISK_BUILD="3600M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4000M"
+ else
+ CHECKREQS_DISK_BUILD="3600M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto && tc-ld-is-lld ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ fi
+}
+
+src_prepare() {
+ pushd ../.. &>/dev/null || die
+
+ use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
+
+ if ! use ppc64; then
+ rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die
+ fi
+
+ eapply "${WORKDIR}"/firefox-patches
+ eapply "${WORKDIR}"/spidermonkey-patches
+
+ default
+
+ # Make cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # 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"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ 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
+}
+
+src_configure() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+
+ local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
+ [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
+ [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+ if tc-is-gcc; then
+ have_switched_compiler=yes
+ fi
+ AR=llvm-ar
+ CC=${CHOST}-clang-${version_clang}
+ CXX=${CHOST}-clang++-${version_clang}
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain,
+ # AS is used in a non-standard way by upstream, #bmo1654031
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ export AS="$(tc-getCC) -c"
+ tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
+
+ 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-ctype
+ --disable-jemalloc
+ --disable-smoosh
+ --disable-strip
+
+ --enable-project=js
+ --enable-readline
+ --enable-release
+ --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 debug; then
+ myeconfargs+=( --disable-optimize )
+ myeconfargs+=( --enable-debug-symbols )
+ myeconfargs+=( --enable-real-time-tracing )
+ else
+ myeconfargs+=( --enable-optimize )
+ myeconfargs+=( --disable-debug-symbols )
+ myeconfargs+=( --disable-real-time-tracing )
+ fi
+
+ 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
+ if use clang ; then
+ if tc-ld-is-mold ; then
+ myeconfargs+=( --enable-linker=mold )
+ else
+ myeconfargs+=( --enable-linker=lld )
+ fi
+ myeconfargs+=( --enable-lto=cross )
+
+ else
+ myeconfargs+=( --enable-linker=bfd )
+ myeconfargs+=( --enable-lto=full )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-lto
+
+ # Use system's Python environment
+ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+ export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # 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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
+
+ ${EPYTHON} \
+ "${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
+ ${EPYTHON} \
+ "${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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2024-02-23 8:23 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2024-02-23 8:23 UTC (permalink / raw
To: gentoo-commits
commit: d2961f12f31380319adafadf56f94b35243d13e2
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 23 08:22:42 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Feb 23 08:23:21 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2961f12
dev-lang/spidermonkey: add 115.8.0
Closes: https://bugs.gentoo.org/924944
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 2 +
.../files/spidermonkey-115-known-test-failures.txt | 1 +
dev-lang/spidermonkey/spidermonkey-115.8.0.ebuild | 474 +++++++++++++++++++++
3 files changed, 477 insertions(+)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index c4dc49bea2e3..cb5bb9b4edd6 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -2,7 +2,9 @@ DIST firefox-102.15.0esr.source.tar.xz 486592324 BLAKE2B b70727fa91d0d270673374b
DIST firefox-102esr-patches-13.tar.xz 22212 BLAKE2B 02e9edd071a99abbac02faa11ffce061d5d12d8baa9ce54b51d6bfdbf8160022a1565902d65ca30fe51b5670e509fa921b11a460989933cbb797fcd59d635125 SHA512 8b8b0f3789978447a1293fd9acb5c2db3d7e9f724357a0d762b54f7e34d28f11655997ffeafccfe8001a01dd595848d257f90cb983462c405d434cc794216520
DIST firefox-115.3.1esr.source.tar.xz 515785920 BLAKE2B ad5ec24361e94d9185eed210f681c50159f5be3e6046d79200b5e2586107f1ed98ebe7935f1e266afadd570fc1aa6a1aec81fe3b7fb86efb48afe82514f26c68 SHA512 65cb6fc46bba03eed742bd67f8e36b63b19f2ad7b85d2f503595704a4e88f554758a1e66ba548c8efe97a76322fb2514db72e6ff4bb2992d1aaa86edc3af85f1
DIST firefox-115.7.0esr.source.tar.xz 515513828 BLAKE2B 9cacd9cd7e9b9040f37843645bc6823d72b3b736a3c4dcef7706304ebeda718e36e98962d9d9c000b7507fdfda40bd19ca4c8267573dc623a9507a7f77b17b52 SHA512 d468d8ef117d76e0660c5359c3becf0502354c61bdaaeb4137d86f52b50143abec2ac4578af69afa5670700b57efff1c7323ca23e3339a9eaaa888dee7e8e922
+DIST firefox-115.8.0esr.source.tar.xz 507569724 BLAKE2B 37bb3d0ef990922baa81f0083ba91f079755c6cf45df238d7ccfa4f9bc0cb597f59c7d08bc0b976dae422df0b3897d1cd153ae12970ac4e3e9fad892781c3b45 SHA512 4b8c06b5eb3617700a72aaad8831d703a537fe600740f1acb8377bd0ce198a199938603fd7e6b2007671a578dfb24aa8f5c031c6c1ccf15d4a34562679eaa883
DIST firefox-115esr-patches-06.tar.xz 14944 BLAKE2B e60a8a32f8c5e6d897e8c3e13d291ffab651937505ce258f031e7e75560c9eb89fce4a22c61872d639e6e1d40244e94761baa1660c2d3d02584ad4cc4778946f SHA512 d9ea1a063df287fa651042c90529b1a1b5ebd5a28735c44b5527cc7dd29678c2f8a9204f007db328371ed6af9613ca7215464c00df5e685c3af4296a22139257
DIST firefox-115esr-patches-08.tar.xz 15912 BLAKE2B 3f94deb17920672ad2184e813bd38e390ecaa50bfc6e00973db717bc56a5adb4f096224cc366da525db25aaa3d198d57716bcb765ddc906783532864e23dd8d4 SHA512 4474fbed14b2c4fac03d82f4b37849a69dbdd61fc15f01cefa373eb8a64a692f5a584247acdf7c349ab6965225c3cd47be3fc4523f93db5299680e2a22e94d94
+DIST firefox-115esr-patches-09.tar.xz 16660 BLAKE2B 1dcdf62f35013b82dd70bf00c0505394b9277affcd1b1cbde92421778f4fcc146f536a546c2db8d6a70f92d40e4b1c96927fedec54383e6bb80bd9806d9b4461 SHA512 e003d0a2a5304dcdd0851b57ceb11993333326c8221d5d99555cd0c64090d5eda1bdb2a2a52e605f6094a3214ffa2238e43d57ff64eb7d424ff54b8125c16f5c
DIST spidermonkey-102-patches-05j.tar.xz 4596 BLAKE2B 215b770bbdf17973d7b3fd1df6cee9647459d2b02b0be5bdb289d457e5dbdb06ceac7a3082fc2f5836e991a4ac4486d73330b0276a466b5c528dab226a27829c SHA512 d2b8e32dac87d60a00fd93479dc34d8adab4feec24a38591cebeb4cf271aa2fd964f4dc26e67ebfb127a47bc8f684d50b32b2cff18ed5286701a04a289058185
DIST spidermonkey-115-patches-01.tar.xz 3992 BLAKE2B e97d0cb3edfb885119226f54f22485ed4e8220cd904d3356b87ccc013403f976a042171cf9ca7250bcf3fe3d90996dd80b4104e7d614f95d7bcfcb0e710a8a78 SHA512 cece96f172a09dd0e29f7c2fdbf650cde405b276bc4083956365289f1da4b1d078ccbde760da6553888ddb3c53cf9aded52051db556a2c4ec492fed01dcb03a1
diff --git a/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
index e71ebabdc356..8a200a87ad57 100644
--- a/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
+++ b/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
@@ -3,6 +3,7 @@ non262/Intl/Collator/big5han-gb2312han.js
non262/Intl/Collator/implicithan.js
non262/Intl/DateTimeFormat/day-period-hour-cycle.js
non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
+non262/Intl/DateTimeFormat/related-year.js
non262/Intl/DateTimeFormat/timeZone_backzone.js
non262/Intl/DisplayNames/calendar.js
non262/Intl/DisplayNames/currency.js
diff --git a/dev-lang/spidermonkey/spidermonkey-115.8.0.ebuild b/dev-lang/spidermonkey/spidermonkey-115.8.0.ebuild
new file mode 100644
index 000000000000..b8e646b0f86d
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-115.8.0.ebuild
@@ -0,0 +1,474 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-115esr-patches-09.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-115-patches-01.tar.xz"
+
+LLVM_MAX_SLOT=17
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="ncurses,ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix 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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~juippis/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://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
+
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+SLOT="$(ver_cut 1)"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ || (
+ (
+ sys-devel/llvm:17
+ clang? (
+ sys-devel/lld:17
+ sys-devel/clang:17
+ virtual/rust:0/llvm-17
+ )
+ )
+ (
+ sys-devel/llvm:16
+ clang? (
+ sys-devel/lld:16
+ sys-devel/clang:16
+ virtual/rust:0/llvm-16
+ )
+ )
+ (
+ sys-devel/llvm:15
+ clang? (
+ sys-devel/lld:15
+ sys-devel/clang:15
+ virtual/rust:0/llvm-15
+ )
+ )
+ )
+ !clang? ( virtual/rust )
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )"
+DEPEND=">=dev-libs/icu-73.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! tc-ld-is-mold ; then
+ if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+ einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily
+# placed here until toolchain-funcs.eclass gets an official support for mold linker.
+# Please see:
+# https://github.com/gentoo/gentoo/pull/28366 ||
+# https://github.com/gentoo/gentoo/pull/28355
+tc-ld-is-mold() {
+ local out
+
+ # Ensure ld output is in English.
+ local -x LC_ALL=C
+
+ # First check the linker directly.
+ out=$($(tc-getLD "$@") --version 2>&1)
+ if [[ ${out} == *"mold"* ]] ; then
+ return 0
+ fi
+
+ # Then see if they're selecting mold via compiler flags.
+ # Note: We're assuming they're using LDFLAGS to hold the
+ # options and not CFLAGS/CXXFLAGS.
+ local base="${T}/test-tc-linker"
+ cat <<-EOF > "${base}.c"
+ int main() { return 0; }
+ EOF
+ out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
+ rm -f "${base}"*
+ if [[ ${out} == *"mold"* ]] ; then
+ return 0
+ fi
+
+ # No mold here!
+ return 1
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4000M"
+ else
+ CHECKREQS_DISK_BUILD="3600M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4000M"
+ else
+ CHECKREQS_DISK_BUILD="3600M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto && tc-ld-is-lld ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ fi
+}
+
+src_prepare() {
+ pushd ../.. &>/dev/null || die
+
+ use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
+
+ if ! use ppc64; then
+ rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die
+ fi
+
+ eapply "${WORKDIR}"/firefox-patches
+ eapply "${WORKDIR}"/spidermonkey-patches
+
+ default
+
+ # Make cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # 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"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ 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
+}
+
+src_configure() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+
+ local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
+ [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
+ [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+ if tc-is-gcc; then
+ have_switched_compiler=yes
+ fi
+ AR=llvm-ar
+ CC=${CHOST}-clang-${version_clang}
+ CXX=${CHOST}-clang++-${version_clang}
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain,
+ # AS is used in a non-standard way by upstream, #bmo1654031
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ export AS="$(tc-getCC) -c"
+ tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
+
+ 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-ctype
+ --disable-jemalloc
+ --disable-smoosh
+ --disable-strip
+
+ --enable-project=js
+ --enable-readline
+ --enable-release
+ --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 debug; then
+ myeconfargs+=( --disable-optimize )
+ myeconfargs+=( --enable-debug-symbols )
+ myeconfargs+=( --enable-real-time-tracing )
+ else
+ myeconfargs+=( --enable-optimize )
+ myeconfargs+=( --disable-debug-symbols )
+ myeconfargs+=( --disable-real-time-tracing )
+ fi
+
+ 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
+ if use clang ; then
+ if tc-ld-is-mold ; then
+ myeconfargs+=( --enable-linker=mold )
+ else
+ myeconfargs+=( --enable-linker=lld )
+ fi
+ myeconfargs+=( --enable-lto=cross )
+
+ else
+ myeconfargs+=( --enable-linker=bfd )
+ myeconfargs+=( --enable-lto=full )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-lto
+
+ # Use system's Python environment
+ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+ export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # 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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
+
+ if use x86 ; then
+ echo "non262/Date/timeclip.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
+ echo "test262/language/types/number/S8.5_A2.1.js" >> "${T}"/known_failures.list
+ echo "test262/language/types/number/S8.5_A2.2.js" >> "${T}"/known_failures.list
+ fi
+
+ ${EPYTHON} \
+ "${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
+ ${EPYTHON} \
+ "${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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2024-03-21 7:03 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2024-03-21 7:03 UTC (permalink / raw
To: gentoo-commits
commit: 876b3535d1675c6c549e528df18ac5ed1476931e
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 21 07:03:14 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Mar 21 07:03:44 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=876b3535
dev-lang/spidermonkey: add 115.9.0
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 1 +
.../files/spidermonkey-115-known-test-failures.txt | 1 +
dev-lang/spidermonkey/spidermonkey-115.9.0.ebuild | 474 +++++++++++++++++++++
3 files changed, 476 insertions(+)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index cb5bb9b4edd6..4220ed4f6822 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -3,6 +3,7 @@ DIST firefox-102esr-patches-13.tar.xz 22212 BLAKE2B 02e9edd071a99abbac02faa11ffc
DIST firefox-115.3.1esr.source.tar.xz 515785920 BLAKE2B ad5ec24361e94d9185eed210f681c50159f5be3e6046d79200b5e2586107f1ed98ebe7935f1e266afadd570fc1aa6a1aec81fe3b7fb86efb48afe82514f26c68 SHA512 65cb6fc46bba03eed742bd67f8e36b63b19f2ad7b85d2f503595704a4e88f554758a1e66ba548c8efe97a76322fb2514db72e6ff4bb2992d1aaa86edc3af85f1
DIST firefox-115.7.0esr.source.tar.xz 515513828 BLAKE2B 9cacd9cd7e9b9040f37843645bc6823d72b3b736a3c4dcef7706304ebeda718e36e98962d9d9c000b7507fdfda40bd19ca4c8267573dc623a9507a7f77b17b52 SHA512 d468d8ef117d76e0660c5359c3becf0502354c61bdaaeb4137d86f52b50143abec2ac4578af69afa5670700b57efff1c7323ca23e3339a9eaaa888dee7e8e922
DIST firefox-115.8.0esr.source.tar.xz 507569724 BLAKE2B 37bb3d0ef990922baa81f0083ba91f079755c6cf45df238d7ccfa4f9bc0cb597f59c7d08bc0b976dae422df0b3897d1cd153ae12970ac4e3e9fad892781c3b45 SHA512 4b8c06b5eb3617700a72aaad8831d703a537fe600740f1acb8377bd0ce198a199938603fd7e6b2007671a578dfb24aa8f5c031c6c1ccf15d4a34562679eaa883
+DIST firefox-115.9.0esr.source.tar.xz 507156076 BLAKE2B 2b70c0396763ef6662450c1001b847adfc7c8cbf6e4e2ffd3120473aebcc4ff9e25091e2d8e3f9462c2094de9211d658776746a0d8ce9ed73efa824b4e25b508 SHA512 2828931e79f6f2476a699afdac02133f2f04d478c5a8ed288339701387d57354f73df50d1d2a08e6afdddc9a2b95b1820c9ca1bfdce3e0772cb0ba71e12aab88
DIST firefox-115esr-patches-06.tar.xz 14944 BLAKE2B e60a8a32f8c5e6d897e8c3e13d291ffab651937505ce258f031e7e75560c9eb89fce4a22c61872d639e6e1d40244e94761baa1660c2d3d02584ad4cc4778946f SHA512 d9ea1a063df287fa651042c90529b1a1b5ebd5a28735c44b5527cc7dd29678c2f8a9204f007db328371ed6af9613ca7215464c00df5e685c3af4296a22139257
DIST firefox-115esr-patches-08.tar.xz 15912 BLAKE2B 3f94deb17920672ad2184e813bd38e390ecaa50bfc6e00973db717bc56a5adb4f096224cc366da525db25aaa3d198d57716bcb765ddc906783532864e23dd8d4 SHA512 4474fbed14b2c4fac03d82f4b37849a69dbdd61fc15f01cefa373eb8a64a692f5a584247acdf7c349ab6965225c3cd47be3fc4523f93db5299680e2a22e94d94
DIST firefox-115esr-patches-09.tar.xz 16660 BLAKE2B 1dcdf62f35013b82dd70bf00c0505394b9277affcd1b1cbde92421778f4fcc146f536a546c2db8d6a70f92d40e4b1c96927fedec54383e6bb80bd9806d9b4461 SHA512 e003d0a2a5304dcdd0851b57ceb11993333326c8221d5d99555cd0c64090d5eda1bdb2a2a52e605f6094a3214ffa2238e43d57ff64eb7d424ff54b8125c16f5c
diff --git a/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
index 8a200a87ad57..9d21ef6dc615 100644
--- a/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
+++ b/dev-lang/spidermonkey/files/spidermonkey-115-known-test-failures.txt
@@ -5,6 +5,7 @@ non262/Intl/DateTimeFormat/day-period-hour-cycle.js
non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
non262/Intl/DateTimeFormat/related-year.js
non262/Intl/DateTimeFormat/timeZone_backzone.js
+non262/Intl/DateTimeFormat/timeZone_version.js
non262/Intl/DisplayNames/calendar.js
non262/Intl/DisplayNames/currency.js
non262/Intl/DisplayNames/language-dialect.js
diff --git a/dev-lang/spidermonkey/spidermonkey-115.9.0.ebuild b/dev-lang/spidermonkey/spidermonkey-115.9.0.ebuild
new file mode 100644
index 000000000000..b8e646b0f86d
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-115.9.0.ebuild
@@ -0,0 +1,474 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-115esr-patches-09.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-115-patches-01.tar.xz"
+
+LLVM_MAX_SLOT=17
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="ncurses,ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix 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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~juippis/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://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
+
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+SLOT="$(ver_cut 1)"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ || (
+ (
+ sys-devel/llvm:17
+ clang? (
+ sys-devel/lld:17
+ sys-devel/clang:17
+ virtual/rust:0/llvm-17
+ )
+ )
+ (
+ sys-devel/llvm:16
+ clang? (
+ sys-devel/lld:16
+ sys-devel/clang:16
+ virtual/rust:0/llvm-16
+ )
+ )
+ (
+ sys-devel/llvm:15
+ clang? (
+ sys-devel/lld:15
+ sys-devel/clang:15
+ virtual/rust:0/llvm-15
+ )
+ )
+ )
+ !clang? ( virtual/rust )
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )"
+DEPEND=">=dev-libs/icu-73.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! tc-ld-is-mold ; then
+ if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+ einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily
+# placed here until toolchain-funcs.eclass gets an official support for mold linker.
+# Please see:
+# https://github.com/gentoo/gentoo/pull/28366 ||
+# https://github.com/gentoo/gentoo/pull/28355
+tc-ld-is-mold() {
+ local out
+
+ # Ensure ld output is in English.
+ local -x LC_ALL=C
+
+ # First check the linker directly.
+ out=$($(tc-getLD "$@") --version 2>&1)
+ if [[ ${out} == *"mold"* ]] ; then
+ return 0
+ fi
+
+ # Then see if they're selecting mold via compiler flags.
+ # Note: We're assuming they're using LDFLAGS to hold the
+ # options and not CFLAGS/CXXFLAGS.
+ local base="${T}/test-tc-linker"
+ cat <<-EOF > "${base}.c"
+ int main() { return 0; }
+ EOF
+ out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
+ rm -f "${base}"*
+ if [[ ${out} == *"mold"* ]] ; then
+ return 0
+ fi
+
+ # No mold here!
+ return 1
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4000M"
+ else
+ CHECKREQS_DISK_BUILD="3600M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4000M"
+ else
+ CHECKREQS_DISK_BUILD="3600M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto && tc-ld-is-lld ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ fi
+}
+
+src_prepare() {
+ pushd ../.. &>/dev/null || die
+
+ use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
+
+ if ! use ppc64; then
+ rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die
+ fi
+
+ eapply "${WORKDIR}"/firefox-patches
+ eapply "${WORKDIR}"/spidermonkey-patches
+
+ default
+
+ # Make cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # 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"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ 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
+}
+
+src_configure() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+
+ local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
+ [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
+ [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+ if tc-is-gcc; then
+ have_switched_compiler=yes
+ fi
+ AR=llvm-ar
+ CC=${CHOST}-clang-${version_clang}
+ CXX=${CHOST}-clang++-${version_clang}
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain,
+ # AS is used in a non-standard way by upstream, #bmo1654031
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ export AS="$(tc-getCC) -c"
+ tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
+
+ 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-ctype
+ --disable-jemalloc
+ --disable-smoosh
+ --disable-strip
+
+ --enable-project=js
+ --enable-readline
+ --enable-release
+ --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 debug; then
+ myeconfargs+=( --disable-optimize )
+ myeconfargs+=( --enable-debug-symbols )
+ myeconfargs+=( --enable-real-time-tracing )
+ else
+ myeconfargs+=( --enable-optimize )
+ myeconfargs+=( --disable-debug-symbols )
+ myeconfargs+=( --disable-real-time-tracing )
+ fi
+
+ 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
+ if use clang ; then
+ if tc-ld-is-mold ; then
+ myeconfargs+=( --enable-linker=mold )
+ else
+ myeconfargs+=( --enable-linker=lld )
+ fi
+ myeconfargs+=( --enable-lto=cross )
+
+ else
+ myeconfargs+=( --enable-linker=bfd )
+ myeconfargs+=( --enable-lto=full )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-lto
+
+ # Use system's Python environment
+ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+ export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # 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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
+
+ if use x86 ; then
+ echo "non262/Date/timeclip.js" >> "${T}"/known_failures.list
+ echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
+ echo "test262/language/types/number/S8.5_A2.1.js" >> "${T}"/known_failures.list
+ echo "test262/language/types/number/S8.5_A2.2.js" >> "${T}"/known_failures.list
+ fi
+
+ ${EPYTHON} \
+ "${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
+ ${EPYTHON} \
+ "${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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/
@ 2024-10-09 6:09 Joonas Niilola
0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2024-10-09 6:09 UTC (permalink / raw
To: gentoo-commits
commit: 004d820fd3814248c3faf4eac508022e389bc84f
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 9 06:06:25 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Oct 9 06:06:25 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=004d820f
dev-lang/spidermonkey: add 128.3.0
- enable python-3.13 support with a patch from RedHat/Fedora,
- "machify" configure, compile and tests phases to finally bring SM on par
with other Mozilla products using mach, allowing us to most likely
re-introduce an eclass to handle SM, Firefox and Thunderbird at some point.
Closes: https://bugs.gentoo.org/912170
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/spidermonkey/Manifest | 3 +
.../files/spidermonkey-128-known-test-failures.txt | 44 ++
dev-lang/spidermonkey/spidermonkey-128.3.0.ebuild | 476 +++++++++++++++++++++
3 files changed, 523 insertions(+)
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 15055529ddfb..2843f7b0e31c 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -5,6 +5,9 @@ DIST firefox-115.15.0esr.source.tar.xz 507920832 BLAKE2B 997a3148b7019fbec95e1e0
DIST firefox-115.16.0esr.source.tar.xz 515133700 BLAKE2B 9501b617b346d56f6de975f88974be6fdc3d4a901b2a1b952b6bbf6cc46384084260078d23c52bedff83a65bec4ea5ec78c3bcaac86c78d0b44e796317534840 SHA512 b6f93ec3d6acac5df177253c65b833c017e65ed6e78e96ff029098443928d291f6f67164aedb83d80aa28ee9dee305086597798238d3330e35183030e53e3550
DIST firefox-115esr-patches-10.tar.xz 17256 BLAKE2B 0f6265d6e12f55e9b5128f2f261ba3785b80563e049d2441fde09dedf419c6086c9d994d2b44d1aab35af64cde375bdc254206da9ef148fc20fa90da0417606d SHA512 a1f0012420593a1c1b38dba1785ee9092e0923f56458c38f003cca4ebaac30a73fe3d1f5806a5795c76b2b8d729f8184372e63681daa450c3bb8e5afbe9e2e4f
DIST firefox-115esr-patches-13.tar.xz 51360 BLAKE2B a048bfadba989ebbd4c6e3df97d303d6853844e66ed92f5f5f322acf18866218b91d52dbbece63827de283eef855c932d67e329c8d93200aa83f11268a5d1b2f SHA512 186ec72323e621362dcef1bc67c476716aff97dfad701faa9220a7302e798d3cb4ed90d5ea59e3e92f016be29875bb5219787635db99a8848b7c76e4e2e09e90
+DIST firefox-128.3.0esr.source.tar.xz 560960556 BLAKE2B 015fefb408dcea5733053151aff05579b007ab757542a47956e007dc127b460f4a35e885a2ee4ef4dbb936820c8ea3907b00383f659b15a84e701590b50a5d72 SHA512 3c6ef272c0fb653d030fe3f7f72aa0e1097b1c6759556166815cde15465330f988b3bc23df4b4eb753daee930edbb1ef72145273cb29d0952bd9d7c547050f9b
+DIST firefox-128esr-patches-03.tar.xz 14156 BLAKE2B 9a618f0ddb8596b740893dc9113f374d193a00e4e8e76dbb2794928ceaafc7b5309cb6f69f6287ae1e423f0be0a060580b0d9d59307c9889362dd17fb7d31d3d SHA512 c6ec7233b368fac623ec0cce6f5c37d358a0fa5bb2154dc67eebb50968376ca9d46f3a734f5d79a4aa4edde9e300a9c65315d0e499aa6a1325b6c76a6c164258
DIST spidermonkey-102-patches-05j.tar.xz 4596 BLAKE2B 215b770bbdf17973d7b3fd1df6cee9647459d2b02b0be5bdb289d457e5dbdb06ceac7a3082fc2f5836e991a4ac4486d73330b0276a466b5c528dab226a27829c SHA512 d2b8e32dac87d60a00fd93479dc34d8adab4feec24a38591cebeb4cf271aa2fd964f4dc26e67ebfb127a47bc8f684d50b32b2cff18ed5286701a04a289058185
DIST spidermonkey-115-patches-01.tar.xz 3992 BLAKE2B e97d0cb3edfb885119226f54f22485ed4e8220cd904d3356b87ccc013403f976a042171cf9ca7250bcf3fe3d90996dd80b4104e7d614f95d7bcfcb0e710a8a78 SHA512 cece96f172a09dd0e29f7c2fdbf650cde405b276bc4083956365289f1da4b1d078ccbde760da6553888ddb3c53cf9aded52051db556a2c4ec492fed01dcb03a1
DIST spidermonkey-115-patches-02.tar.xz 4896 BLAKE2B f78d9804c1427b45d6fda496b4991ec6f672dec9ce031ed57a2920fa1968c942a235f46e40166c8ab8d731a1963f322d34bb2f6984133179175e6f7376d27d13 SHA512 11fd01152d1e7b8ca89bf628076e1f4fb4f1ba6c9dc0f9dd544252495c580c04e4d5ffc238d5587f9e993aa91a47828333564ca55f60e008bd370089cd07d2e6
+DIST spidermonkey-128-patches-01.tar.xz 3612 BLAKE2B 21143ee914743f21c9c68c8ba06b5662019c9526c658514e117da54ae0e82b0c361b859656be9d6cf7db83e64b1164cc19c878dce94f777f200304473fa05041 SHA512 8b21b5b637d00272479333d8d0ef9c04b63e569fa7d123972692e0c3f8b44d2d9fa45e702ed942ae05a0074609e3e41277580768e3228293e9d6256c7ebe7979
diff --git a/dev-lang/spidermonkey/files/spidermonkey-128-known-test-failures.txt b/dev-lang/spidermonkey/files/spidermonkey-128-known-test-failures.txt
new file mode 100644
index 000000000000..5c6f6941b2ad
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-128-known-test-failures.txt
@@ -0,0 +1,44 @@
+non262/Date/15.9.5.7.js
+non262/Date/time-zone-etc_localetime.js
+non262/Intl/Collator/big5han-gb2312han.js
+non262/Intl/Collator/implicithan.js
+non262/Intl/DateTimeFormat/day-period-hour-cycle.js
+non262/Intl/DateTimeFormat/formatRange-timeZone-offset.js
+non262/Intl/DateTimeFormat/formatRange-timeZoneName-matches-format.js
+non262/Intl/DateTimeFormat/formatRange-timeZoneName.js
+non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
+non262/Intl/DateTimeFormat/related-year.js
+non262/Intl/DisplayNames/calendar.js
+non262/Intl/DisplayNames/currency.js
+non262/Intl/DisplayNames/language-dialect.js
+non262/Intl/ListFormat/conjunction-type.js
+non262/Intl/Locale/likely-subtags-generated.js
+non262/Intl/Locale/likely-subtags.js
+non262/Intl/NumberFormat/currency-narrow-symbol.js
+non262/Intl/available-locales-resolved.js
+non262/Intl/available-locales-supported.js
+test262/built-ins/RegExp/property-escapes/generated/Alphabetic.js
+test262/built-ins/RegExp/property-escapes/generated/Assigned.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Letter.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Letter.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Symbol.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Symbol.js
+test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned.js
+test262/built-ins/RegExp/property-escapes/generated/Grapheme_Base.js
+test262/built-ins/RegExp/property-escapes/generated/IDS_Binary_Operator.js
+test262/built-ins/RegExp/property-escapes/generated/ID_Continue.js
+test262/built-ins/RegExp/property-escapes/generated/ID_Start.js
+test262/built-ins/RegExp/property-escapes/generated/Ideographic.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Common.js
+test262/built-ins/RegExp/property-escapes/generated/Script_-_Han.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Common.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Malayalam.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sharada.js
+test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sinhala.js
+test262/built-ins/RegExp/property-escapes/generated/Sentence_Terminal.js
+test262/built-ins/RegExp/property-escapes/generated/Unified_Ideograph.js
+test262/built-ins/RegExp/property-escapes/generated/XID_Continue.js
+test262/built-ins/RegExp/property-escapes/generated/XID_Start.js
+test262/intl402/NumberFormat/prototype/format/useGrouping-extended-en-IN.js
diff --git a/dev-lang/spidermonkey/spidermonkey-128.3.0.ebuild b/dev-lang/spidermonkey/spidermonkey-128.3.0.ebuild
new file mode 100644
index 000000000000..a85726775523
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-128.3.0.ebuild
@@ -0,0 +1,476 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+FIREFOX_PATCHSET="firefox-128esr-patches-03.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-128-patches-01.tar.xz"
+
+LLVM_COMPAT=( 17 18 )
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE="ncurses,ssl,xml(+)"
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing python-any-r1 toolchain-funcs
+
+MY_PN="mozjs"
+MY_PV="${PV/_pre*}"
+
+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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~juippis/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
+)
+
+DESCRIPTION="Mozilla's JavaScript engine written in C and C++"
+HOMEPAGE="https://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html"
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz
+ ${PATCH_URIS[@]}"
+KEYWORDS="~amd64"
+
+LICENSE="MPL-2.0"
+SLOT="$(ver_cut 1)"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+#RESTRICT="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ $(llvm_gen_dep '
+ sys-devel/llvm:${LLVM_SLOT}
+ clang? (
+ sys-devel/clang:${LLVM_SLOT}
+ sys-devel/lld:${LLVM_SLOT}
+ virtual/rust:0/llvm-${LLVM_SLOT}
+ )
+ ')
+ !clang? ( virtual/rust )
+ !elibc_glibc? ( dev-lang/rust )
+ >=dev-util/cbindgen-0.26.0
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )"
+DEPEND=">=dev-libs/icu-73.1:=
+ dev-libs/nspr
+ sys-libs/readline:0=
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/firefox-${PV%_*}"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if ! tc-ld-is-mold ; then
+ if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+ einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+mozconfig_add_options_ac() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ ${#} -lt 2 ]] ; then
+ die "${FUNCNAME} requires at least two arguments"
+ fi
+
+ local reason=${1}
+ shift
+
+ local option
+ for option in ${@} ; do
+ echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG}
+ done
+}
+
+mozconfig_add_options_mk() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ ${#} -lt 2 ]] ; then
+ die "${FUNCNAME} requires at least two arguments"
+ fi
+
+ local reason=${1}
+ shift
+
+ local option
+ for option in ${@} ; do
+ echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG}
+ done
+}
+
+mozconfig_use_enable() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ ${#} -lt 1 ]] ; then
+ die "${FUNCNAME} requires at least one arguments"
+ fi
+
+ local flag=$(use_enable "${@}")
+ mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}"
+}
+
+python_check_deps() {
+ if use test ; then
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4400M"
+ else
+ CHECKREQS_DISK_BUILD="4300M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="4400M"
+ else
+ CHECKREQS_DISK_BUILD="4300M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm-r1_pkg_setup
+
+ if use clang && use lto && tc-ld-is-lld ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
+ eerror " llvm/clang/lld/rust chain depending on your @world updates)"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ 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
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ fi
+}
+
+src_prepare() {
+ if use lto ; then
+ rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die
+ fi
+
+ # Workaround for bgo #915651,915651,929013 on musl
+ if use elibc_glibc ; then
+ rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die
+ fi
+
+ eapply "${WORKDIR}"/firefox-patches
+ eapply "${WORKDIR}"/spidermonkey-patches
+
+ default
+
+ # Make cargo respect MAKEOPTS
+ export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+ # Workaround for bgo #915651,915651,929013 on musl
+ if ! use elibc_glibc ; then
+ if use amd64 ; then
+ export RUST_TARGET="x86_64-unknown-linux-musl"
+ elif use x86 ; then
+ export RUST_TARGET="i686-unknown-linux-musl"
+ elif use arm64 ; then
+ export RUST_TARGET="aarch64-unknown-linux-musl"
+ elif use ppc64 ; then
+ export RUST_TARGET="powerpc64le-unknown-linux-musl"
+ else
+ die "Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651"
+ fi
+ fi
+
+ # 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
+
+ # Create build dir
+ BUILD_DIR="${WORKDIR}/${PN}_build"
+ mkdir -p "${BUILD_DIR}" || die
+}
+
+src_configure() {
+ # Show flags set at the beginning
+ einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+
+ local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
+ [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
+ [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+ if tc-is-gcc; then
+ have_switched_compiler=yes
+ fi
+ AR=llvm-ar
+ CC=${CHOST}-clang-${version_clang}
+ CXX=${CHOST}-clang++-${version_clang}
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain,
+ # AS is used in a non-standard way by upstream, #bmo1654031
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ export AS="$(tc-getCC) -c"
+
+ tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
+
+ # Pass the correct toolchain paths through cbindgen
+ if tc-is-cross-compiler ; then
+ export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} --target=${CHOST} ${BINDGEN_CFLAGS-}"
+ fi
+
+ # ../python/mach/mach/mixin/process.py fails to detect SHELL
+ export SHELL="${EPREFIX}/bin/bash"
+
+ # Set state path
+ export MOZBUILD_STATE_PATH="${BUILD_DIR}"
+
+ # Set MOZCONFIG
+ export MOZCONFIG="${S}/.mozconfig"
+
+ # Initialize MOZCONFIG
+ mozconfig_add_options_ac '' --enable-project=js
+
+ mozconfig_add_options_ac 'Gentoo default' \
+ --host="${CBUILD:-${CHOST}}" \
+ --target="${CHOST}" \
+ --disable-ctype \
+ --disable-jemalloc \
+ --disable-smoosh \
+ --disable-strip \
+ --enable-readline \
+ --enable-release \
+ --enable-shared-js \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --prefix="${EPREFIX}/usr" \
+ --with-intl-api \
+ --with-system-icu \
+ --with-system-nspr \
+ --with-system-zlib \
+ --with-toolchain-prefix="${CHOST}-" \
+ --x-includes="${ESYSROOT}/usr/include" \
+ --x-libraries="${ESYSROOT}/usr/$(get_libdir)"
+
+ mozconfig_use_enable debug
+ mozconfig_use_enable jit
+ mozconfig_use_enable test tests
+
+ if use debug ; then
+ mozconfig_add_options_ac '+debug' --disable-optimize
+ mozconfig_add_options_ac '+debug' --enable-debug-symbols
+ mozconfig_add_options_ac '+debug' --enable-real-time-tracing
+ else
+ mozconfig_add_options_ac '-debug' --enable-optimize
+ mozconfig_add_options_ac '-debug' --disable-debug-symbols
+ mozconfig_add_options_ac '-debug' --disable-real-time-tracing
+ fi
+
+ # We always end up disabling this at some point due to newer rust versions. bgo#933372
+ mozconfig_add_options_ac '--disable-rust-simd' --disable-rust-simd
+
+ # Modifications to better support ARM, bug 717344
+ if use cpu_flags_arm_neon ; then
+ mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon
+
+ if ! tc-is-clang ; then
+ # thumb options aren't supported when using clang, bug 666966
+ mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-thumb=yes
+ mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-thumb-interwork=no
+ fi
+ fi
+
+ # Tell build system that we want to use LTO
+ if use lto ; then
+ if use clang ; then
+ if tc-ld-is-mold ; then
+ mozconfig_add_options_ac '+lto' --enable-linker=mold
+ else
+ mozconfig_add_options_ac '+lto' --enable-linker=lld
+ fi
+ mozconfig_add_options_ac '+lto' --enable-lto=cross
+
+ else
+ mozconfig_add_options_ac '+lto' --enable-linker=bfd
+ mozconfig_add_options_ac '+lto' --enable-lto=full
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-lto
+
+ # Pass MAKEOPTS to build system
+ export MOZ_MAKE_FLAGS="${MAKEOPTS}"
+
+ # Use system's Python environment
+ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+ export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+ # Disable notification when build system has finished
+ export MOZ_NOSPAM=1
+
+ # Portage sets XARGS environment variable to "xargs -r" by default which
+ # breaks build system's check_prog() function which doesn't support arguments
+ mozconfig_add_options_ac 'Gentoo default' "XARGS=${EPREFIX}/usr/bin/xargs"
+
+ # Set build dir
+ mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}"
+
+ # Show flags we will use
+ einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ ./mach configure || die
+}
+
+src_compile() {
+ ./mach build --verbose || die
+}
+
+src_test() {
+ if "${BUILD_DIR}/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
+
+ cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_test_failures.list || die
+
+ ./mach jstests --exclude-file="${T}"/known_test_failures.list || die
+}
+
+src_install() {
+ cd "${BUILD_DIR}" || die
+ default
+ # DESTDIR="${D}" ./mach install || die
+
+ # 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
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-10-09 6:09 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23 8:23 [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/ Joonas Niilola
-- strict thread matches above, loose matches on Subject: below --
2024-10-09 6:09 Joonas Niilola
2024-03-21 7:03 Joonas Niilola
2023-08-12 8:38 Joonas Niilola
2023-05-10 12:14 Joonas Niilola
2022-12-15 11:40 Joonas Niilola
2022-10-23 6:27 Joonas Niilola
2022-08-16 7:55 Joonas Niilola
2022-05-26 0:58 WANG Xuerui
2021-09-06 14:03 Thomas Deutschmann
2020-08-14 9:29 Thomas Deutschmann
2020-04-21 11:50 Thomas Deutschmann
2018-11-17 16:52 Ian Stakenvicius
2017-05-11 20:53 Ian Stakenvicius
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox