~ruther/guix-local

f89dbfc8a9d5af7ed8952fae617bb13862642bc0 — Marius Bakke 3 years ago 4ce94cb
gnu: mozjs: Add 91.13.0.

* gnu/packages/gnuzilla.scm (mozjs-91): New variable.
1 files changed, 82 insertions(+), 0 deletions(-)

M gnu/packages/gnuzilla.scm
M gnu/packages/gnuzilla.scm => gnu/packages/gnuzilla.scm +82 -0
@@ 242,6 242,88 @@
in C/C++.")
    (license license:mpl2.0))) ; and others for some files

(define-public mozjs-91
  (package
    (inherit mozjs)
    (version "91.13.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://ftp.mozilla.org/pub/firefox"
                                  "/releases/" version "esr/source/firefox-"
                                  version "esr.source.tar.xz"))
              (sha256
               (base32
                "0qh7j960wdp5zcfqhkj8ki47spp9i9ms12xx0v0kxvmmw36jpgjk"))))
    (arguments
     (substitute-keyword-arguments (package-arguments mozjs)
       ((#:phases phases)
        #~(modify-phases #$phases
            (delete 'adjust-for-icu-68)
            (replace 'configure
              (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.
                (mkdir "run-configure-from-here")
                (chdir "run-configure-from-here")
                (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
              (lambda _
                (with-directory-excursion "../js/src/tests"
                  (substitute* "shell/os.js"
                    ;; FIXME: Why does the killed process have an exit status?
                    ((".*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)))))

(define mozilla-compare-locales
  (origin
    (method hg-fetch)