Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/
Date: Thu, 04 Jun 2020 11:02:49
Message-Id: 1591268292.24901b3b8c52926e9bdf562e3911302b8b19db99.whissi@gentoo
1 commit: 24901b3b8c52926e9bdf562e3911302b8b19db99
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 4 10:53:42 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 4 10:58:12 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24901b3b
7
8 dev-lang/spidermonkey: bump to v68.9.0
9
10 Package-Manager: Portage-2.3.100, Repoman-2.3.22
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 dev-lang/spidermonkey/Manifest | 1 +
14 dev-lang/spidermonkey/spidermonkey-68.9.0.ebuild | 222 +++++++++++++++++++++++
15 2 files changed, 223 insertions(+)
16
17 diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
18 index e6630331c2c..ba567eedc1d 100644
19 --- a/dev-lang/spidermonkey/Manifest
20 +++ b/dev-lang/spidermonkey/Manifest
21 @@ -2,6 +2,7 @@ DIST firefox-68.0-patches-12.tar.xz 17476 BLAKE2B bd788e24820f902f4ca908b0cf7a49
22 DIST firefox-68.0-patches-14.tar.xz 17488 BLAKE2B 697aecf97b04b45ea17ed1c1eaded95ca5064760cd0468968326f1683c10d91b76458c0f3e1ae7772b0d43c33632c03a69e5b09579284de19ecaaf7603dc2412 SHA512 9a601b80f747eb52ce772ec931d4f5ff0180ca1531c92d46ca116fb8218c829b9be496392e785d79106c76abef149e666cdc65204bdf1ebb7904b65264cfa6b6
23 DIST firefox-68.7.0esr.source.tar.xz 312235932 BLAKE2B 17030bc74341ecae74d7dadcb0fc0212e61e3f01463671e57f73c90e534db1088d597d43bc362cd083ca26b056bce45684eda121b2cd91c7793c44a7c40efb7a SHA512 a3ddcf8ffe5f568b30b1fc9ddcaa5cebe600bf11ce353c09507d5466f999022d45a0dee9a08f53f37b10202a2e2ce4c180743cd6a2ca38dfea1c3e4487b18593
24 DIST firefox-68.8.0esr.source.tar.xz 312602308 BLAKE2B 19be922cdadc705a267f35450e742cf9cf2f793a3e74dd9a397f898ff879cf9d7e59ccc148a9fa47f3c637c30887c205f01069e689f0586fb9ef82f4e6b160ce SHA512 139a63dc85ae76a50da6be9a31425f97144e6c7e4a65b0f3009a84eb5c8c9566f6bb331e26590f8aecd5045c4d730ab4e848cf7220f3444a31147b5533c742b3
25 +DIST firefox-68.9.0esr.source.tar.xz 317469120 BLAKE2B f04f8ca1abe802edb6d37c0de5f8024d513331fd80c9b701c93de74cbafc0650b1c0f58e54a2dbe6bee0457698dc386093aab7749c9b0738bf146bfbae6bf4e2 SHA512 98431800d80f7c680aef9eede29df8217810912a319a7f7f8c2e637c43ecd4f4e29223a417afb2a6315e825f979453ff6e6b5a575649aba5cc63ce5956375bb8
26 DIST js-1.7.0.tar.gz 1165607 BLAKE2B 61749e10886bbb9e4958a41925fae8dcbd7d943b9bf838878368c30e26ba61f300bc2ec37982653b87fedf76707dda2ffd510282de4bce87d1da11ca42fa108c SHA512 9d9fbd9c1dae969ca19ddb0f977ac56f3e0479ec393b859de252fcdd8b7fc325e80399073540884ed365ce56a3219be34c0db9300d5e50f32969660c90527e51
27 DIST js185-1.0.0.tar.gz 6164605 BLAKE2B 76a37f0ceae05d3475853875bd0ce4be6e525e4114816f8f281ea6fc6b60a71060975a0fa1cb843f57ad1e2f842dfb26b24244fa0fd6c20f6ae2ebbe430f70be SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718
28 DIST mozjs-38.3.0sfink2.tar.bz2 27232902 BLAKE2B 42a039a41b7479a32e22f260cb58f098e1a1d4833f801f193bdd8b75403f94567b9ef2ebe85b2a811fe2f9b27cd934afe1054bd4e7d9aae0b8a80acdec8e42a4 SHA512 debad1fbd21e025c567b083677cfd0a2023ec2aff750241f495ac2977034a7299e068cb3b0b2351c97457119cc8aef563f00416092a70a3a269d20947b700206
29
30 diff --git a/dev-lang/spidermonkey/spidermonkey-68.9.0.ebuild b/dev-lang/spidermonkey/spidermonkey-68.9.0.ebuild
31 new file mode 100644
32 index 00000000000..b69b7f5d7c7
33 --- /dev/null
34 +++ b/dev-lang/spidermonkey/spidermonkey-68.9.0.ebuild
35 @@ -0,0 +1,222 @@
36 +# Copyright 1999-2020 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI="7"
40 +
41 +PYTHON_COMPAT=( python3_{6..8} )
42 +
43 +WANT_AUTOCONF="2.1"
44 +
45 +inherit autotools check-reqs python-any-r1
46 +
47 +MY_PN="mozjs"
48 +MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
49 +
50 +MY_MAJOR=$(ver_cut 1)
51 +
52 +MOZ_ESR="1"
53 +
54 +# Convert the ebuild version to the upstream mozilla version
55 +MOZ_PV="${MY_PV/_alpha/a}" # Handle alpha for SRC_URI
56 +MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
57 +MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
58 +
59 +if [[ ${MOZ_ESR} == 1 ]] ; then
60 + # ESR releases have slightly different version numbers
61 + MOZ_PV="${MOZ_PV}esr"
62 +fi
63 +
64 +# Patch version
65 +FIREFOX_PATCHSET="firefox-68.0-patches-14"
66 +SPIDERMONKEY_PATCHSET="${PN}-68.6.0-patches-03"
67 +
68 +MOZ_HTTP_URI="https://archive.mozilla.org/pub/firefox/releases"
69 +MOZ_SRC_URI="${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz"
70 +
71 +if [[ "${PV}" == *_rc* ]]; then
72 + MOZ_HTTP_URI="https://archive.mozilla.org/pub/firefox/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
73 + MOZ_SRC_URI="${MOZ_HTTP_URI}/source/firefox-${MOZ_PV}.source.tar.xz"
74 +fi
75 +
76 +PATCH_URIS=(
77 + https://dev.gentoo.org/~{anarchy,whissi,polynomial-c,axs}/mozilla/patchsets/${FIREFOX_PATCHSET}.tar.xz
78 + https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}.tar.xz
79 +)
80 +
81 +SRC_URI="${MOZ_SRC_URI}
82 + ${PATCH_URIS[@]}"
83 +
84 +DESCRIPTION="SpiderMonkey is Mozilla's JavaScript engine written in C and C++"
85 +HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
86 +
87 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
88 +
89 +SLOT="68"
90 +LICENSE="MPL-2.0"
91 +IUSE="debug +jit test"
92 +
93 +RESTRICT="!test? ( test )"
94 +
95 +BDEPEND="dev-lang/python:2.7
96 + test? ( ${PYTHON_DEPS} )"
97 +
98 +DEPEND=">=dev-libs/icu-63.1:=
99 + >=dev-libs/nspr-4.21
100 + sys-libs/readline:0=
101 + >=sys-libs/zlib-1.2.3"
102 +RDEPEND="${DEPEND}"
103 +
104 +S="${WORKDIR}/firefox-${MY_PV}/js/src"
105 +
106 +pkg_pretend() {
107 + if use test ; then
108 + CHECKREQS_DISK_BUILD="6G"
109 + else
110 + CHECKREQS_DISK_BUILD="5G"
111 + fi
112 +
113 + check-reqs_pkg_pretend
114 +}
115 +
116 +pkg_setup() {
117 + if use test ; then
118 + CHECKREQS_DISK_BUILD="6G"
119 + else
120 + CHECKREQS_DISK_BUILD="5G"
121 + fi
122 +
123 + check-reqs_pkg_setup
124 +
125 + use test && python-any-r1_pkg_setup
126 +}
127 +
128 +src_prepare() {
129 + cd ../.. || die
130 + rm "${WORKDIR}"/firefox/2013_avoid_noinline_on_GCC_with_skcms.patch
131 + rm "${WORKDIR}"/firefox/2015_fix_cssparser.patch
132 + eapply "${WORKDIR}"/firefox
133 + eapply "${WORKDIR}"/spidermonkey-patches
134 +
135 + default
136 +
137 + MOZJS_BUILDDIR="${WORKDIR}/build"
138 + mkdir "${MOZJS_BUILDDIR}" || die
139 +
140 + cd "${S}" || die
141 + eautoconf
142 +}
143 +
144 +src_configure() {
145 + tc-export CC CXX LD AR RANLIB
146 +
147 + # backup current active Python version
148 + local PYTHON_OLD=${PYTHON}
149 +
150 + # build system will require Python2.7
151 + export PYTHON=python2.7
152 +
153 + cd "${MOZJS_BUILDDIR}" || die
154 +
155 + # ../python/mach/mach/mixin/process.py fails to detect SHELL
156 + export SHELL="${EPREFIX}/bin/bash"
157 +
158 + # forcing system-icu allows us to skip patching bundled ICU for PPC
159 + # and other minor arches
160 + ECONF_SOURCE="${S}" \
161 + econf \
162 + --disable-jemalloc \
163 + --disable-optimize \
164 + --disable-strip \
165 + --enable-readline \
166 + --enable-shared-js \
167 + --with-intl-api \
168 + --with-system-icu \
169 + --with-system-nspr \
170 + --with-system-zlib \
171 + $(use_enable debug) \
172 + $(use_enable jit ion) \
173 + $(use_enable test tests) \
174 + XARGS="${EPREFIX}/usr/bin/xargs"
175 +
176 + # restore PYTHON
177 + export PYTHON=${PYTHON_OLD}
178 +}
179 +
180 +src_compile() {
181 + cd "${MOZJS_BUILDDIR}" || die
182 + default
183 +}
184 +
185 +src_test() {
186 + if "${MOZJS_BUILDDIR}/js/src/js" -e 'print("Hello world!")'; then
187 + einfo "Smoke-test successful, continuing with full test suite"
188 + else
189 + die "Smoke-test failed: did interpreter initialization fail?"
190 + fi
191 +
192 + local -a KNOWN_TESTFAILURES
193 + KNOWN_TESTFAILURES+=( test262/intl402/RelativeTimeFormat/prototype/format/en-us-numeric-auto.js )
194 + KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/tz-environment-variable.js )
195 + KNOWN_TESTFAILURES+=( non262/Intl/RelativeTimeFormat/format.js )
196 + KNOWN_TESTFAILURES+=( non262/Date/time-zones-imported.js )
197 + KNOWN_TESTFAILURES+=( non262/Date/toString-localized.js )
198 + KNOWN_TESTFAILURES+=( non262/Date/time-zone-path.js )
199 + KNOWN_TESTFAILURES+=( non262/Date/time-zones-historic.js )
200 + KNOWN_TESTFAILURES+=( non262/Date/toString-localized-posix.js )
201 + KNOWN_TESTFAILURES+=( non262/Date/reset-time-zone-cache-same-offset.js )
202 +
203 + echo "" > "${T}"/known_failures.list || die
204 +
205 + local KNOWN_TESTFAILURE
206 + for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
207 + echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
208 + done
209 +
210 + PYTHONPATH="${S}/tests/lib" \
211 + ${PYTHON} \
212 + "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
213 + --exclude-file="${T}"/known_failures.list \
214 + "${MOZJS_BUILDDIR}"/js/src/js \
215 + || die
216 +
217 + if use jit ; then
218 + KNOWN_TESTFAILURES=()
219 +
220 + echo "" > "${T}"/known_failures.list || die
221 +
222 + for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
223 + echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
224 + done
225 +
226 + PYTHONPATH="${S}/tests/lib" \
227 + ${PYTHON} \
228 + "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
229 + --exclude-file="${T}"/known_failures.list \
230 + "${MOZJS_BUILDDIR}"/js/src/js basic \
231 + || die
232 + fi
233 +}
234 +
235 +src_install() {
236 + cd "${MOZJS_BUILDDIR}" || die
237 + default
238 +
239 + # fix soname links
240 + pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
241 + mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die
242 + ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die
243 + ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die
244 + popd &>/dev/null || die
245 +
246 + # remove unneeded files
247 + rm \
248 + "${ED}"/usr/bin/js${MY_MAJOR}-config \
249 + "${ED}"/usr/$(get_libdir)/libjs_static.ajs \
250 + || die
251 +
252 + # fix permissions
253 + chmod -x \
254 + "${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \
255 + "${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h \
256 + || die
257 +}