diff options
Diffstat (limited to 'gnu/packages/gnuzilla.scm')
-rw-r--r-- | gnu/packages/gnuzilla.scm | 279 |
1 files changed, 141 insertions, 138 deletions
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 04e283111e..d8a729c395 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -14,7 +14,7 @@ ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda@monarch-pass.net> ;;; Copyright © 2020, 2021, 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de> -;;; Copyright © 2020 Marius Bakke <marius@gnu.org> +;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> @@ -98,16 +98,16 @@ (define-public mozjs (package (name "mozjs") - (version "78.15.0") + (version "102.2.0") (source (origin (method url-fetch) ;; TODO: Switch to IceCat source once available on ftp.gnu.org. - (uri (string-append "https://archive.mozilla.org/pub/firefox" + (uri (string-append "https://ftp.mozilla.org/pub/firefox" "/releases/" version "esr/source/firefox-" version "esr.source.tar.xz")) (sha256 (base32 - "0l91cxdc5v9fps79ckb1kid4gw6v5qng1jd9zvaacwaiv628shx4")))) + "1zwpgis7py1bf8p88pz3mpai6a02qrdb8ww2fa9kxxdl9b8r2k81")))) (build-system gnu-build-system) (arguments (list @@ -128,10 +128,6 @@ "--enable-hardening" "--enable-optimize" "--enable-release" - ;; FIXME: rust-simd is disabled otherwise the build fails with - ;; "error: `[u32; 64]` is forbidden as the type of a const generic - ;; parameter". - "--disable-rust-simd" "--enable-readline" "--enable-shared-js" "--with-system-icu" @@ -153,7 +149,7 @@ (for-each generate-all-checksums '("js" "third_party/rust"))))) (replace 'configure - (lambda* (#:key inputs configure-flags #:allow-other-keys) + (lambda* (#:key configure-flags #:allow-other-keys) ;; The configure script does not accept environment variables as ;; arguments. It also must be run from a different directory, ;; but not the root directory either. @@ -162,43 +158,11 @@ (setenv "SHELL" (which "sh")) (setenv "CONFIG_SHELL" (which "sh")) (setenv "AUTOCONF" (which "autoconf")) - (apply invoke "../js/src/configure" - (cons (string-append "--prefix=" #$output) - configure-flags)))) - (add-after 'unpack 'adjust-for-icu-68 - (lambda _ - (with-directory-excursion "js/src/tests" - ;; The test suite expects a lightly patched ICU 67. Since - ;; Guix is about to switch to ICU 68, massage the tests to - ;; work with that instead of patching ICU. Try removing this - ;; phase for newer versions of mozjs. - - ;; These tests look up locale names and expects to get - ;; "GB" instead of "UK". - (substitute* "non262/Intl/DisplayNames/language.js" - (("Traditionell, GB") - "Traditionell, UK")) - (substitute* "non262/Intl/DisplayNames/region.js" - (("\"GB\": \"GB\"") - "\"GB\": \"UK\"")) - - ;; XXX: Some localized time formats have changed, and - ;; substitution fails for accented characters, even though - ;; it works in the REPL(?). Just delete these for now. - (delete-file "non262/Intl/Date/toLocaleString_timeZone.js") - (delete-file "non262/Intl/Date/toLocaleDateString_timeZone.js") - - ;; Similarly, these get an unexpected "A" suffix when looking - ;; up a time in the "ar-MA-u-ca-islamicc" locale, which is - ;; tricky to substitute. - (delete-file "non262/Intl/DateTimeFormat/format_timeZone.js") - (delete-file "non262/Intl/DateTimeFormat/format.js") - - ;; This file compares a generated list of ICU locale names - ;; with actual lookups. Some have changed slightly, i.e. - ;; daf-Latn-ZZ -> daf-Latn-CI, so drop it for simplicity. - (delete-file "non262/Intl/Locale/likely-subtags-generated.js")))) - (add-before 'check 'pre-check + (apply invoke "python" "../configure.py" + "--enable-project=js" + (string-append "--prefix=" #$output) + configure-flags))) + (add-before 'check 'adjust-tests (lambda _ (with-directory-excursion "../js/src/tests" (substitute* "shell/os.js" @@ -206,35 +170,44 @@ ((".*killed process should not have exitStatus.*") "")) - ;; XXX: Delete all tests that test time zone functionality, - ;; because the test suite uses /etc/localtime to figure out - ;; the offset from the hardware clock, which does not work - ;; in the build container. See <tests/non262/Date/shell.js>. - (delete-file-recursively "non262/Date") - (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js") - - (setenv "JSTESTS_EXTRA_ARGS" - (string-join - (list - ;; Do not run tests marked as "random". - "--exclude-random" - ;; Exclude web platform tests. - "--wpt=disabled" - ;; Respect the daemons configured number of jobs. - (string-append "--worker-count=" - (number->string (parallel-job-count)))))))))))) + ;; The test suite expects a lightly patched ICU. Disable tests + ;; that do not work with the system version. See + ;; "intl/icu-patches" for clues. + + ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and + ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and + ;; related patch for why this is failing. + (delete-file "non262/Intl/DateTimeFormat/\ +fractional-second-digits-append-item.js") + ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)" + (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")))) + (add-before 'check 'pre-check + (lambda _ + (setenv "JSTESTS_EXTRA_ARGS" + (string-join + (list + ;; Do not run tests marked as "random". + "--exclude-random" + ;; Exclude web platform tests. + "--wpt=disabled" + ;; Respect the daemons configured number of jobs. + (string-append "--worker-count=" + (number->string (parallel-job-count))))))))))) (native-inputs - (list autoconf-2.13 - automake - ;; TODO(staging): Use the default LLVM in the next rebuild cycle. - llvm-9 ;for llvm-objdump + (list autoconf + llvm ;for llvm-objdump + m4 perl pkg-config - python-3 + python-wrapper rust `(,rust "cargo"))) (inputs - (list icu4c readline zlib)) + (list icu4c-71 readline zlib)) (propagated-inputs (list nspr)) ; in the Requires.private field of mozjs-*.pc (home-page @@ -260,7 +233,39 @@ in C/C++.") (substitute-keyword-arguments (package-arguments mozjs) ((#:phases phases) #~(modify-phases #$phases - (delete 'adjust-for-icu-68) + (add-before 'check 'disable-timezone-tests + (lambda _ + (with-directory-excursion "../js/src/tests" + ;; FIXME: Assertion failed: got "2021a", expected "2021a3"? + (delete-file "non262/Intl/DateTimeFormat/timeZone_version.js") + ;; XXX: Delete all tests that test time zone functionality, + ;; because the test suite uses /etc/localtime to figure out + ;; the offset from the hardware clock, which does not work + ;; in the build container. See <tests/non262/Date/shell.js>. + (delete-file-recursively "non262/Date") + (delete-file + "non262/Intl/DateTimeFormat/tz-environment-variable.js")))))))) + (inputs (modify-inputs (package-inputs mozjs) + (replace "icu4c" icu4c))))) + +(define-public mozjs-78 + (package + (inherit mozjs) + (name "mozjs") + (version "78.15.0") + (source (origin + (method url-fetch) + (uri (string-append "https://archive.mozilla.org/pub/firefox" + "/releases/" version "esr/source/firefox-" + version "esr.source.tar.xz")) + (sha256 + (base32 + "0l91cxdc5v9fps79ckb1kid4gw6v5qng1jd9zvaacwaiv628shx4")))) + (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments mozjs) + ((#:phases phases) + #~(modify-phases #$phases (replace 'configure (lambda* (#:key configure-flags #:allow-other-keys) ;; The configure script does not accept environment variables as @@ -271,11 +276,43 @@ in C/C++.") (setenv "SHELL" (which "sh")) (setenv "CONFIG_SHELL" (which "sh")) (setenv "AUTOCONF" (which "autoconf")) - (apply invoke "python" "../configure.py" - "--enable-project=js" - (string-append "--prefix=" #$output) - configure-flags))) - (add-before 'check 'adjust-tests + (apply invoke "../js/src/configure" + (cons (string-append "--prefix=" #$output) + configure-flags)))) + (replace 'adjust-tests + (lambda _ + (with-directory-excursion "../js/src/tests" + ;; The test suite expects a lightly patched ICU 67. Since + ;; Guix is about to switch to ICU 68, massage the tests to + ;; work with that instead of patching ICU. Try removing this + ;; phase for newer versions of mozjs. + + ;; These tests look up locale names and expects to get + ;; "GB" instead of "UK". + (substitute* "non262/Intl/DisplayNames/language.js" + (("Traditionell, GB") + "Traditionell, UK")) + (substitute* "non262/Intl/DisplayNames/region.js" + (("\"GB\": \"GB\"") + "\"GB\": \"UK\"")) + + ;; XXX: Some localized time formats have changed, and + ;; substitution fails for accented characters, even though + ;; it works in the REPL(?). Just delete these for now. + (delete-file "non262/Intl/Date/toLocaleString_timeZone.js") + (delete-file "non262/Intl/Date/toLocaleDateString_timeZone.js") + + ;; Similarly, these get an unexpected "A" suffix when looking + ;; up a time in the "ar-MA-u-ca-islamicc" locale, which is + ;; tricky to substitute. + (delete-file "non262/Intl/DateTimeFormat/format_timeZone.js") + (delete-file "non262/Intl/DateTimeFormat/format.js") + + ;; This file compares a generated list of ICU locale names + ;; with actual lookups. Some have changed slightly, i.e. + ;; daf-Latn-ZZ -> daf-Latn-CI, so drop it for simplicity. + (delete-file "non262/Intl/Locale/likely-subtags-generated.js")))) + (replace 'pre-check (lambda _ (with-directory-excursion "../js/src/tests" (substitute* "shell/os.js" @@ -283,69 +320,35 @@ in C/C++.") ((".*killed process should not have exitStatus.*") "")) - ;; The test suite expects a lightly patched ICU. Disable tests - ;; that do not work with the system version. See - ;; "intl/icu-patches" for clues. - - ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and - ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and - ;; related patch for why this is failing. - (delete-file "non262/Intl/DateTimeFormat/\ -fractional-second-digits-append-item.js") - ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)" - (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") - - ;; FIXME: Assertion failed: got "2021a", expected "2021a3"? - (delete-file "non262/Intl/DateTimeFormat/timeZone_version.js") ;; XXX: Delete all tests that test time zone functionality, ;; because the test suite uses /etc/localtime to figure out ;; the offset from the hardware clock, which does not work ;; in the build container. See <tests/non262/Date/shell.js>. (delete-file-recursively "non262/Date") - (delete-file - "non262/Intl/DateTimeFormat/tz-environment-variable.js")))) - (replace 'pre-check - (lambda _ - (setenv "JSTESTS_EXTRA_ARGS" - (string-join - (list - ;; Do not run tests marked as "random". - "--exclude-random" - ;; Exclude web platform tests. - "--wpt=disabled" - ;; Respect the daemons configured number of jobs. - (string-append "--worker-count=" - (number->string (parallel-job-count)))))))))))) - (native-inputs (modify-inputs (package-native-inputs mozjs) - (replace "autoconf" autoconf) - (replace "llvm" llvm) - (replace "python" python-wrapper) - (append m4))))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Temporary packaging of rust-1.59, pending inclusion in (gnu packages rust) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define rust-1.58-promise - (delay - (let ((rust-bootstrapped-package - (@@ (gnu packages rust) - rust-bootstrapped-package))) - (rust-bootstrapped-package - rust "1.58.1" "1iq7kj16qfpkx8gvw50d8rf7glbm6s0pj2y1qkrz7mi56vfsyfd8")))) - -(define rust-1.59-promise - (delay - (let ((rust-bootstrapped-package - (@@ (gnu packages rust) - rust-bootstrapped-package))) - (rust-bootstrapped-package - (force rust-1.58-promise) - "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57")))) + (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js") + + (setenv "JSTESTS_EXTRA_ARGS" + (string-join + (list + ;; Do not run tests marked as "random". + "--exclude-random" + ;; Exclude web platform tests. + "--wpt=disabled" + ;; Respect the daemons configured number of jobs. + (string-append "--worker-count=" + (number->string + (parallel-job-count))))))))))))) + (native-inputs + (list autoconf-2.13 + automake + llvm ;for llvm-objdump + perl + pkg-config + python-3 + rust + `(,rust "cargo"))) + (inputs + (list icu4c readline zlib)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Temporary packaging of rust-cbindgen-0.23 and its dependencies @@ -863,8 +866,8 @@ fractional-second-digits-append-item.js") ;; ("icecat-use-system-media-libs.patch" ;; ,(search-patch "icecat-use-system-media-libs.patch")) ;; TODO: Change the following lines to use 'rust' when it's >= 1.59. - (force rust-1.59-promise) - `(,(force rust-1.59-promise) "cargo") + rust + `(,rust "cargo") (force rust-cbindgen-0.23-promise) llvm clang @@ -1539,8 +1542,8 @@ ca495991b7852b855")) (file-name (string-append "thunderbird-" version "-checkout")) (sha256 (base32 - "16wlpcv1n64crcgk4gcl92r37dlpw26izvam82pbp5f8c25amlnk"))))) - ("cargo" ,(force rust-1.59-promise) "cargo") + "078jrxpzqj45l84i39a9fq023j71ngca5gs2ngpjsbily51bzx09"))))) + ("cargo" ,rust "cargo") ("clang" ,clang) ("llvm" ,llvm) ("m4" ,m4) @@ -1549,7 +1552,7 @@ ca495991b7852b855")) ("perl" ,perl) ("pkg-config" ,pkg-config) ("python" ,python-wrapper) - ("rust" ,(force rust-1.59-promise)) + ("rust" ,rust) ("rust-cbindgen" ,(force rust-cbindgen-0.23-promise)) ("which" ,which) ("yasm" ,yasm))) |