Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/
Date: Fri, 28 Jan 2022 07:45:28
Message-Id: 1643355917.cd527194dbc8fe8e1d4e63779fe679bf9dca0199.juippis@gentoo
1 commit: cd527194dbc8fe8e1d4e63779fe679bf9dca0199
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 28 07:42:39 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 28 07:45:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd527194
7
8 dev-lang/spidermonkey: drop 91.5.0
9
10 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
11
12 dev-lang/spidermonkey/Manifest | 1 -
13 dev-lang/spidermonkey/spidermonkey-91.5.0.ebuild | 424 -----------------------
14 2 files changed, 425 deletions(-)
15
16 diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
17 index 7b7f458d9eb3..c4990f42aa08 100644
18 --- a/dev-lang/spidermonkey/Manifest
19 +++ b/dev-lang/spidermonkey/Manifest
20 @@ -2,7 +2,6 @@ DIST firefox-68.0-patches-15.tar.xz 16060 BLAKE2B f9e6cd58ea51bed1af90a9d30fd551
21 DIST firefox-68.12.0esr.source.tar.xz 313856956 BLAKE2B eeaa4acc9fabf15ec1b313170a30cee8e1fc10a8b08512b915b83b7d6a81c09b365733ed94638bd434864fd7b0cb8cbf1bc2e43441be69e31117e8e6a099234c SHA512 839b02422e4c87bdb12e0995cd35ca8c1996f3fba00bbb46b419e46b67df5ec48a264cb14632db777ce29166ee4fdcb06e2ee3ce847e64328c58c9a2f9129f4c
22 DIST firefox-78.15.0esr.source.tar.xz 330819568 BLAKE2B dc8785613c2f72c55d484642c89c2545765a9efbd609bc7c2cf57b4a3a06a2ea22e6959e42b5b8af867db782e8b2097a67dec858796b744e47008a8e575e2316 SHA512 ac3de735b246ce4f0e1619cd2664321ffa374240ce6843e785d79a350dc30c967996bbcc5e3b301cb3d822ca981cbea116758fc4122f1738d75ddfd1165b6378
23 DIST firefox-78esr-patches-19.tar.xz 88424 BLAKE2B fdc7bf8f28b3e799551a70f1cec7a695f52c4712f3b28733648fcd7dac5a599613f4c3d2cfa169266dc62b65619b7f28c0e06d32317adb8ec0056ca79c87e9f6 SHA512 3c81dadc9bf74207c4e361605127ef6141d77700c5c54f1f9cd5ad3be13df9f73c6eec2f51d779558e4bdad1e7395c6aa8943a93415bd1786d461042bc03550a
24 -DIST firefox-91.5.0esr.source.tar.xz 381371300 BLAKE2B 21b25ded0d0541d2a5c0964ffe5e28a3b238b5dac1c0969383f8a41cb6a0fff8522c4ccfbd1cd309a5c52be9377ca9af446949dd3d9923cf36ce0e6603ff520a SHA512 1712415b6b73c6a21edfefc39eaba5fcbbca54032f78627c0005d291501d16ef4daffb8b9a160d1d5361113ceba04eb5ddb21d903e3dd8d58838aa9596f2d781
25 DIST firefox-91.5.1esr.source.tar.xz 388976720 BLAKE2B 5ade6b402af1ad14438eabefe3d8249b8e0125968b7d6950f29747ff3a41f9f1b02c52a417756b07b68bacdde43549768d1b999b15ecdca237be9c0363d13b0c SHA512 26239e7a94b79f1e24a6667d7cf1c398d75992e8850144affbc5d3f34f04b91f0c9b020cab662b2cd4927924839ff2ddd2f3605c537bb5494fd9ac0d951b14fa
26 DIST firefox-91esr-patches-04.tar.xz 17460 BLAKE2B 305d8b0bc8a4115a76e459afd8bc7987bdde2e76d4564faf664a92a4c6a95c975ce599c5ddde9bdafc3c37ca5c8758e0ef815364d0ce4dd5fd452ddae73a77eb SHA512 6073b31bb898fe61d72435b11deacb5e93a1744227e4704bb3012e0cb363792f3a965d72e7769c4aae3a25f0c81247b287ce145c81bbd0a87470a5438fede11e
27 DIST js185-1.0.0.tar.gz 6164605 BLAKE2B 76a37f0ceae05d3475853875bd0ce4be6e525e4114816f8f281ea6fc6b60a71060975a0fa1cb843f57ad1e2f842dfb26b24244fa0fd6c20f6ae2ebbe430f70be SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718
28
29 diff --git a/dev-lang/spidermonkey/spidermonkey-91.5.0.ebuild b/dev-lang/spidermonkey/spidermonkey-91.5.0.ebuild
30 deleted file mode 100644
31 index f2c8b9767f6c..000000000000
32 --- a/dev-lang/spidermonkey/spidermonkey-91.5.0.ebuild
33 +++ /dev/null
34 @@ -1,424 +0,0 @@
35 -# Copyright 1999-2022 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI="7"
39 -
40 -# Patch version
41 -FIREFOX_PATCHSET="firefox-91esr-patches-04.tar.xz"
42 -SPIDERMONKEY_PATCHSET="spidermonkey-91-patches-02j.tar.xz"
43 -
44 -LLVM_MAX_SLOT=13
45 -
46 -PYTHON_COMPAT=( python3_{8..10} )
47 -PYTHON_REQ_USE="ssl"
48 -
49 -WANT_AUTOCONF="2.1"
50 -
51 -inherit autotools check-reqs flag-o-matic llvm prefix python-any-r1 toolchain-funcs
52 -
53 -MY_PN="mozjs"
54 -MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
55 -
56 -MY_MAJOR=$(ver_cut 1)
57 -
58 -MOZ_ESR=yes
59 -
60 -MOZ_PV=${PV}
61 -MOZ_PV_SUFFIX=
62 -if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
63 - MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
64 -
65 - # Convert the ebuild version to the upstream Mozilla version
66 - MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
67 - MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
68 - MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
69 -fi
70 -
71 -if [[ -n ${MOZ_ESR} ]] ; then
72 - # ESR releases have slightly different version numbers
73 - MOZ_PV="${MOZ_PV}esr"
74 -fi
75 -
76 -MOZ_PN="firefox"
77 -MOZ_P="${MOZ_PN}-${MOZ_PV}"
78 -MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
79 -MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
80 -
81 -MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}"
82 -
83 -if [[ ${PV} == *_rc* ]] ; then
84 - MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
85 -fi
86 -
87 -PATCH_URIS=(
88 - https://dev.gentoo.org/~{juippis,polynomial-c,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
89 - https://dev.gentoo.org/~{juippis,polynomial-c,whissi}/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
90 -)
91 -
92 -SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz
93 - ${PATCH_URIS[@]}"
94 -
95 -DESCRIPTION="SpiderMonkey is Mozilla's JavaScript engine written in C and C++"
96 -HOMEPAGE="https://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
97 -
98 -KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~s390 ~x86"
99 -
100 -SLOT="91"
101 -LICENSE="MPL-2.0"
102 -IUSE="clang cpu_flags_arm_neon debug +jit lto test"
103 -
104 -#RESTRICT="test"
105 -RESTRICT="!test? ( test )"
106 -
107 -BDEPEND="${PYTHON_DEPS}
108 - virtual/rust
109 - virtual/pkgconfig
110 - test? (
111 - $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
112 - )
113 - || (
114 - (
115 - sys-devel/llvm:13
116 - clang? (
117 - sys-devel/clang:13
118 - lto? ( =sys-devel/lld-13* )
119 - )
120 - )
121 - (
122 - sys-devel/llvm:12
123 - clang? (
124 - sys-devel/clang:12
125 - lto? ( =sys-devel/lld-12* )
126 - )
127 - )
128 - (
129 - sys-devel/llvm:11
130 - clang? (
131 - sys-devel/clang:11
132 - lto? ( =sys-devel/lld-11* )
133 - )
134 - )
135 - (
136 - sys-devel/llvm:10
137 - clang? (
138 - sys-devel/clang:10
139 - lto? ( =sys-devel/lld-10* )
140 - )
141 - )
142 - )"
143 -DEPEND=">=dev-libs/icu-69.1:=
144 - dev-libs/nspr
145 - sys-libs/readline:0=
146 - sys-libs/zlib"
147 -RDEPEND="${DEPEND}"
148 -
149 -S="${WORKDIR}/firefox-${MY_PV}/js/src"
150 -
151 -llvm_check_deps() {
152 - if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
153 - einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
154 - return 1
155 - fi
156 -
157 - if use clang ; then
158 - if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
159 - einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
160 - return 1
161 - fi
162 -
163 - if use lto ; then
164 - if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
165 - einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
166 - return 1
167 - fi
168 - fi
169 - fi
170 -
171 - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
172 -}
173 -
174 -python_check_deps() {
175 - if use test ; then
176 - has_version "dev-python/six[${PYTHON_USEDEP}]"
177 - fi
178 -}
179 -
180 -pkg_pretend() {
181 - if use test ; then
182 - CHECKREQS_DISK_BUILD="7600M"
183 - else
184 - CHECKREQS_DISK_BUILD="6400M"
185 - fi
186 -
187 - check-reqs_pkg_pretend
188 -}
189 -
190 -pkg_setup() {
191 - if [[ ${MERGE_TYPE} != binary ]] ; then
192 - if use test ; then
193 - CHECKREQS_DISK_BUILD="7600M"
194 - else
195 - CHECKREQS_DISK_BUILD="6400M"
196 - fi
197 -
198 - check-reqs_pkg_setup
199 -
200 - llvm_pkg_setup
201 -
202 - if use clang && use lto ; then
203 - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
204 - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
205 - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
206 -
207 - # temp fix for https://bugs.gentoo.org/768543
208 - # we can assume that rust 1.{49,50}.0 always uses llvm 11
209 - local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'release:' | awk '{ print $2 }')
210 - [[ -n ${version_rust} ]] && version_rust=$(ver_cut 1-2 "${version_rust}")
211 - [[ -z ${version_rust} ]] && die "Failed to read version from rustc!"
212 -
213 - if ver_test "${version_rust}" -ge "1.49" && ver_test "${version_rust}" -le "1.50" ; then
214 - local version_llvm_rust="11"
215 - else
216 - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
217 - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
218 - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
219 - fi
220 -
221 - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
222 - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
223 - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
224 - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
225 - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
226 - eerror " - Build ${CATEGORY}/${PN} without USE=lto"
227 - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
228 - fi
229 - fi
230 -
231 - python-any-r1_pkg_setup
232 -
233 - # Build system is using /proc/self/oom_score_adj, bug #604394
234 - addpredict /proc/self/oom_score_adj
235 -
236 - if ! mountpoint -q /dev/shm ; then
237 - # If /dev/shm is not available, configure is known to fail with
238 - # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py
239 - ewarn "/dev/shm is not mounted -- expect build failures!"
240 - fi
241 -
242 - # Ensure we use C locale when building, bug #746215
243 - export LC_ALL=C
244 - fi
245 -}
246 -
247 -src_prepare() {
248 - pushd ../.. &>/dev/null || die
249 -
250 - use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
251 -
252 - eapply "${WORKDIR}"/firefox-patches
253 - eapply "${WORKDIR}"/spidermonkey-patches
254 -
255 - default
256 -
257 - # sed-in toolchain prefix
258 - sed -i \
259 - -e "s/objdump/${CHOST}-objdump/" \
260 - python/mozbuild/mozbuild/configure/check_debug_ranges.py \
261 - || die "sed failed to set toolchain prefix"
262 -
263 - # use prefix shell in wrapper linker scripts, bug #789660
264 - hprefixify "${S}"/../../build/cargo-{,host-}linker
265 -
266 - einfo "Removing pre-built binaries ..."
267 - find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
268 -
269 - MOZJS_BUILDDIR="${WORKDIR}/build"
270 - mkdir "${MOZJS_BUILDDIR}" || die
271 -
272 - popd &>/dev/null || die
273 - eautoconf
274 -}
275 -
276 -src_configure() {
277 - # Show flags set at the beginning
278 - einfo "Current CFLAGS: ${CFLAGS}"
279 - einfo "Current CXXFLAGS: ${CXXFLAGS}"
280 - einfo "Current LDFLAGS: ${LDFLAGS}"
281 - einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
282 -
283 - local have_switched_compiler=
284 - if use clang && ! tc-is-clang ; then
285 - # Force clang
286 - einfo "Enforcing the use of clang due to USE=clang ..."
287 - have_switched_compiler=yes
288 - AR=llvm-ar
289 - CC=${CHOST}-clang
290 - CXX=${CHOST}-clang++
291 - NM=llvm-nm
292 - RANLIB=llvm-ranlib
293 - elif ! use clang && ! tc-is-gcc ; then
294 - # Force gcc
295 - have_switched_compiler=yes
296 - einfo "Enforcing the use of gcc due to USE=-clang ..."
297 - AR=gcc-ar
298 - CC=${CHOST}-gcc
299 - CXX=${CHOST}-g++
300 - NM=gcc-nm
301 - RANLIB=gcc-ranlib
302 - fi
303 -
304 - if [[ -n "${have_switched_compiler}" ]] ; then
305 - # Because we switched active compiler we have to ensure
306 - # that no unsupported flags are set
307 - strip-unsupported-flags
308 - fi
309 -
310 - # Ensure we use correct toolchain
311 - export HOST_CC="$(tc-getBUILD_CC)"
312 - export HOST_CXX="$(tc-getBUILD_CXX)"
313 - tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
314 -
315 - cd "${MOZJS_BUILDDIR}" || die
316 -
317 - # ../python/mach/mach/mixin/process.py fails to detect SHELL
318 - export SHELL="${EPREFIX}/bin/bash"
319 -
320 - local -a myeconfargs=(
321 - --host="${CBUILD:-${CHOST}}"
322 - --target="${CHOST}"
323 - --disable-ctype
324 - --disable-jemalloc
325 - --disable-optimize
326 - --disable-smoosh
327 - --disable-strip
328 - --enable-readline
329 - --enable-release
330 - --enable-shared-js
331 - --with-intl-api
332 - --with-system-icu
333 - --with-system-nspr
334 - --with-system-zlib
335 - --with-toolchain-prefix="${CHOST}-"
336 - $(use_enable debug)
337 - $(use_enable jit)
338 - $(use_enable test tests)
339 - )
340 -
341 - if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
342 - myeconfargs+=( --enable-rust-simd )
343 - fi
344 -
345 - # Modifications to better support ARM, bug 717344
346 - if use cpu_flags_arm_neon ; then
347 - myeconfargs+=( --with-fpu=neon )
348 -
349 - if ! tc-is-clang ; then
350 - # thumb options aren't supported when using clang, bug 666966
351 - myeconfargs+=( --with-thumb=yes )
352 - myeconfargs+=( --with-thumb-interwork=no )
353 - fi
354 - fi
355 -
356 - # Tell build system that we want to use LTO
357 - if use lto ; then
358 - if use clang ; then
359 - myeconfargs+=( --enable-linker=lld )
360 - myeconfargs+=( --enable-lto=cross )
361 - else
362 - myeconfargs+=( --enable-linker=bfd )
363 - myeconfargs+=( --enable-lto )
364 - fi
365 - fi
366 -
367 - # LTO flag was handled via configure
368 - filter-flags '-flto*'
369 -
370 - if tc-is-gcc ; then
371 - if ver_test $(gcc-fullversion) -ge 10 ; then
372 - einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..."
373 - append-cxxflags -fno-tree-loop-vectorize
374 - fi
375 - fi
376 -
377 - export MACH_USE_SYSTEM_PYTHON=1
378 - export PIP_NO_CACHE_DIR=off
379 -
380 - # Show flags we will use
381 - einfo "Build CFLAGS: ${CFLAGS}"
382 - einfo "Build CXXFLAGS: ${CXXFLAGS}"
383 - einfo "Build LDFLAGS: ${LDFLAGS}"
384 - einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
385 -
386 - # Forcing system-icu allows us to skip patching bundled ICU for PPC
387 - # and other minor arches
388 - ECONF_SOURCE="${S}" \
389 - econf \
390 - ${myeconfargs[@]} \
391 - XARGS="${EPREFIX}/usr/bin/xargs"
392 -}
393 -
394 -src_compile() {
395 - cd "${MOZJS_BUILDDIR}" || die
396 - default
397 -}
398 -
399 -src_test() {
400 - if "${MOZJS_BUILDDIR}/js/src/js" -e 'print("Hello world!")'; then
401 - einfo "Smoke-test successful, continuing with full test suite"
402 - else
403 - die "Smoke-test failed: did interpreter initialization fail?"
404 - fi
405 -
406 - cp "${FILESDIR}"/spidermonkey-91-known-test-failures.txt "${T}"/known_failures.list || die
407 -
408 - if use x86 ; then
409 - echo "non262/Date/timeclip.js" >> "${T}"/known_failures.list
410 - echo "test262/built-ins/Number/prototype/toPrecision/return-values.js" >> "${T}"/known_failures.list
411 - echo "test262/language/types/number/S8.5_A2.1.js" >> "${T}"/known_failures.list
412 - echo "test262/language/types/number/S8.5_A2.2.js" >> "${T}"/known_failures.list
413 - fi
414 -
415 - if [[ $(tc-endian) == "big" ]] ; then
416 - echo "non262/extensions/clone-errors.js" >> "${T}"/known_failures.list
417 - echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
418 - echo "test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js" >> "${T}"/known_failures.list
419 - fi
420 -
421 - ${EPYTHON} \
422 - "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
423 - --exclude-file="${T}"/known_failures.list \
424 - "${MOZJS_BUILDDIR}"/js/src/js \
425 - || die
426 -
427 - if use jit ; then
428 - ${EPYTHON} \
429 - "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
430 - --exclude-file="${T}"/known_failures.list \
431 - "${MOZJS_BUILDDIR}"/js/src/js basic \
432 - || die
433 - fi
434 -}
435 -
436 -src_install() {
437 - cd "${MOZJS_BUILDDIR}" || die
438 - default
439 -
440 - # fix soname links
441 - pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
442 - mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die
443 - ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die
444 - ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die
445 - popd &>/dev/null || die
446 -
447 - # remove unneeded files
448 - rm \
449 - "${ED}"/usr/bin/js${MY_MAJOR}-config \
450 - "${ED}"/usr/$(get_libdir)/libjs_static.ajs \
451 - || die
452 -
453 - # fix permissions
454 - chmod -x \
455 - "${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \
456 - "${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h \
457 - || die
458 -}