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