gnu: mozjs: Update to 140.3.0.

* gnu/packages/gnuzilla.scm (mozjs): Update to 140.3.0.
[#:configure-flags]: Add --enable-rust-simd.
[#:phases] {adjust-tests}: Update phase.
[inputs]: Replace icu4c with icu4c-77.
(mozjs-115) [#:configure-flags]: Delete --enable-rust-simd.

Change-Id: I077a67e0562125ada847e59e07902a864740ece7
This commit is contained in:
Maxim Cournoyer 2025-08-26 17:09:40 +09:00
parent 6e583023ab
commit ebe032d51d
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -17,7 +17,7 @@
;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021-2023, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr> ;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr>
;;; Copyright © 2022 SeerLite <seerlite@disroot.org> ;;; Copyright © 2022 SeerLite <seerlite@disroot.org>
;;; Copyright © 2024 Aleksandr Vityazev <avityazew@gmail.com> ;;; Copyright © 2024 Aleksandr Vityazev <avityazew@gmail.com>
@ -105,7 +105,7 @@
(define-public mozjs (define-public mozjs
(package (package
(name "mozjs") (name "mozjs")
(version "128.3.1") (version "140.3.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
;; TODO: Switch to IceCat source once available on ftp.gnu.org. ;; TODO: Switch to IceCat source once available on ftp.gnu.org.
@ -114,7 +114,7 @@
version "esr.source.tar.xz")) version "esr.source.tar.xz"))
(sha256 (sha256
(base32 (base32
"1a3h7p7126pxzpidb1lqckvhfh1had805mai4l96mnc878phbx61")))) "05i3czn3v2qnhir8apcphbqy7rmy1dn7kcwx5yyi2qvmjcyfpipg"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(list (list
@ -136,6 +136,7 @@
"--enable-optimize" "--enable-optimize"
"--enable-release" "--enable-release"
"--enable-readline" "--enable-readline"
"--enable-rust-simd"
"--enable-shared-js" "--enable-shared-js"
"--with-system-icu" "--with-system-icu"
"--with-system-nspr" "--with-system-nspr"
@ -187,55 +188,76 @@
((".*killed process should not have exitStatus.*") ((".*killed process should not have exitStatus.*")
"")) ""))
;; This was fixed sometime between 102.15.1 and 115.11.0. ;; Most of the timezone related failures are probably
;; These tests are supposed to be skipped on all 64-bit systems. ;; attributable to our use of a system-provided icu4c library
#$@(if (target-riscv64?) ;; instead of the bundled one.
#~((substitute* '("non262/Array/regress-157652.js" (for-each
"non262/regress/regress-422348.js") delete-file
(("mips64") "mips64|riscv64"))) '( ;; FIXME: An one-hour difference is produced after DST
#~()) ;; starting in the timezone the test suite uses.
"non262/Date/15.9.5.7.js"
;; FIXME: An one-hour difference is produced after DST ;; The test suite expects a lightly patched ICU. Disable tests
;; starting in the timezone the test suite uses. ;; that do not work with the system version. See
(delete-file "non262/Date/15.9.5.7.js") ;; "intl/icu-patches" for clues.
;; The test suite expects a lightly patched ICU. Disable tests ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
;; that do not work with the system version. See ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
;; "intl/icu-patches" for clues. ;; related patch for why this is failing.
"non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js"
;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
"non262/Intl/DateTimeFormat/day-period-hour-cycle.js"
;; FIXME: got "en-US-posix", expected "en-US-POSIX".
"non262/Intl/available-locales-supported.js"
;; FIXME: got "en-US", expected "en-US-POSIX"
"non262/Intl/available-locales-resolved.js"
;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and ;;; Since 115:
;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and ;; Mismatching array lengths
;; related patch for why this is failing. "non262/Intl/supportedValuesOf-timeZones-canonical.js"
(delete-file "non262/Intl/DateTimeFormat/\ ;; TODO: tzdata 2024a expected find a way to regenerate
fractional-second-digits-append-item.js") ;; these generated tests
;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)" "non262/Intl/DateTimeFormat/timeZone_version.js"
(delete-file "non262/Intl/DateTimeFormat/day-period-hour-cycle.js")
;; FIXME: got "en-US-posix", expected "en-US-POSIX".
(delete-file "non262/Intl/available-locales-supported.js")
;; FIXME: got "en-US", expected "en-US-POSIX"
(delete-file "non262/Intl/available-locales-resolved.js")
;;; Since 115: ;; FIXME: got "\uD840\uDDF2", expected "\u5047"
;; Mismatching array lengths "non262/Intl/Collator/implicithan.js"
(delete-file "non262/Intl/supportedValuesOf-timeZones-canonical.js") ;; FIXME: got "\uD840\uDDF2", expected "\u3467"
;; FIXME: got "America/Santa_Isabel", expected "America/Tijuana": "non262/Intl/Collator/big5han-gb2312han.js"
;; America/Santa_Isabel -> America/Tijuana
(delete-file "non262/Intl/DateTimeFormat/timeZone_backward_links.js")
;; TODO: tzdata 2024a expected find a way to regenerate
;; these generated tests
(delete-file "non262/Intl/DateTimeFormat/timeZone_version.js")
;; FIXME: got "\uD840\uDDF2", expected "\u5047" ;; Since 128:
(delete-file "non262/Intl/Collator/implicithan.js") ;; FIXME: got (void 0), expected "GMT"
;; FIXME: got "\uD840\uDDF2", expected "\u3467" "non262/Intl/DateTimeFormat/formatRange-timeZoneName-matches-format.js"
(delete-file "non262/Intl/Collator/big5han-gb2312han.js") ;; FIXME: got 7, expected 9: parts count mismatch
"non262/Intl/DateTimeFormat/formatRange-timeZone-offset.js"
"non262/Intl/DateTimeFormat/formatRange-timeZoneName.js"
;; Since 128: ;; Since 140:
;; FIXME: got (void 0), expected "GMT" ;; RangeError: invalid time zone: America/Coyhaique
(delete-file "non262/Intl/DateTimeFormat/formatRange-timeZoneName-matches-format.js") "non262/Temporal/ZonedDateTime/zones-and-links.js"
;; FIXME: got 7, expected 9: parts count mismatch ;; got 2042, expected 2043
(delete-file "non262/Intl/DateTimeFormat/formatRange-timeZone-offset.js") "non262/Temporal/Intl/consistent-dates.js"
(delete-file "non262/Intl/DateTimeFormat/formatRange-timeZoneName.js")))) ;; got "Pacific/Auckland", expected "Antarctica/McMurdo"
"non262/Intl/DateTimeFormat/timeZone_links.js"
"test262/staging/sm/Temporal/ZonedDateTime/zones-and-links.js"
;; Test262Error: Expected true but got false
"test262/staging/Intl402/Temporal/old/zoneddatetime-dst-corner-cases.js"
;; Test262Error: getTimeZoneTransition(next) does not return its input
"test262/intl402/Temporal/ZonedDateTime/prototype/\
getTimeZoneTransition/result-type.js"
;; Expected SameValue («1912-01-01T00:16:08+00:00[Africa/Abidjan]», «null»
"test262/intl402/Temporal/ZonedDateTime/prototype/\
getTimeZoneTransition/transition-at-instant-boundaries.js"
;; Expected SameValue(«1762063200000000000n», «1572760800000000000n»
"test262/intl402/Temporal/ZonedDateTime/prototype/\
getTimeZoneTransition/specific-tzdb-values.js"
;; Expected SameValue(«"2025-03-30T03:00:00+02:00[Europe/Berlin]"»,
;; «"2020-10-25T02:00:00+01:00[Europe/Berlin]"»
"test262/intl402/Temporal/ZonedDateTime/prototype/\
getTimeZoneTransition/nanoseconds-subtracted-or-added-at-dst-transition.js"
;; TypeError: can't access property "epochNanoseconds",
;; before.getTimeZoneTransition(...) is null
"test262/intl402/Temporal/ZonedDateTime/prototype/\
getTimeZoneTransition/transitions-close-together.js")))))
(add-before 'check 'pre-check (add-before 'check 'pre-check
(lambda _ (lambda _
(setenv "JSTESTS_EXTRA_ARGS" (setenv "JSTESTS_EXTRA_ARGS"
@ -259,7 +281,7 @@ fractional-second-digits-append-item.js")
`(,rust "cargo") `(,rust "cargo")
rust-cbindgen)) rust-cbindgen))
(inputs (inputs
(list icu4c readline zlib)) (list icu4c-77 readline zlib))
(propagated-inputs (propagated-inputs
(list nspr)) ; in the Requires.private field of mozjs-*.pc (list nspr)) ; in the Requires.private field of mozjs-*.pc
(home-page (home-page
@ -283,6 +305,8 @@ in C/C++.")
"0xvwk3vkbxnybpi3gwk48nxffg44lbv58mbk2xq6cz50ffq0k5k2")))) "0xvwk3vkbxnybpi3gwk48nxffg44lbv58mbk2xq6cz50ffq0k5k2"))))
(arguments (arguments
(substitute-keyword-arguments (package-arguments mozjs) (substitute-keyword-arguments (package-arguments mozjs)
((#:configure-flags flags)
#~(delete "--enable-rust-simd" #$flags))
((#:phases phases) ((#:phases phases)
#~(modify-phases #$phases #~(modify-phases #$phases
(replace 'adjust-tests (replace 'adjust-tests