More deps for firefox.

Julien LepillerThu Feb 15 23:14:14+0100 2018

4a5e862

More deps for firefox.

more/packages/gnuzilla.scm

2424
2525
(define-module (more packages gnuzilla)
2626
  #:use-module ((srfi srfi-1) #:hide (zip))
27+
  #:use-module ((srfi srfi-26))
2728
  #:use-module (gnu packages)
2829
  #:use-module ((guix licenses) #:prefix license:)
2930
  #:use-module (guix utils)

6465
  #:use-module (gnu packages version-control)
6566
  #:use-module (gnu packages video)
6667
  #:use-module (gnu packages xdisorg)
67-
  #:use-module (gnu packages xorg))
68+
  #:use-module (gnu packages xorg)
69+
  #:use-module (ice-9 match))
6870
6971
(define-public icecat-skia
7072
  (package

7779
                 ((#:configure-flags flags)
7880
                  `(cons* "--enable-skia" ,flags))))))
7981
82+
(define-public icu4c-for-firefox
83+
  (package
84+
   (inherit icu4c)
85+
   (name "icu4c")
86+
   (version "59.1")
87+
   (source (origin
88+
            (method url-fetch)
89+
            (uri (string-append
90+
                  "http://download.icu-project.org/files/icu4c/"
91+
                  version
92+
                  "/icu4c-"
93+
                  (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
94+
                  "-src.tgz"))
95+
            (sha256
96+
             (base32 "1zkmbg2932ggvpgjp8pys0cj6z8bw087y8858009shkrjfpzscki"))))))
97+
98+
(define nss-for-firefox
99+
  (package
100+
    (inherit nss)
101+
    (name "nss")
102+
    (version "3.34.1")
103+
    (source (origin
104+
              (method url-fetch)
105+
              (uri (let ((version-with-underscores
106+
                          (string-join (string-split version #\.) "_")))
107+
                     (string-append
108+
                      "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
109+
                      "releases/NSS_" version-with-underscores "_RTM/src/"
110+
                      "nss-" version ".tar.gz")))
111+
              (sha256
112+
               (base32
113+
                "186x33wsk4mzjz7dzbn8p0py9a0nzkgzpfkdv4rlyy5gghv5vhd3"))
114+
              ;; Create nss.pc and nss-config.
115+
              (patches (search-patches "nss-pkgconfig.patch"
116+
                                       "nss-increase-test-timeout.patch"))))))
117+
(define-public libpng-apng-for-firefox
118+
  (package
119+
    (inherit libpng-apng)
120+
    (name "libpng-apng")
121+
    (version "1.6.34")
122+
    (source
123+
     (origin
124+
       (method url-fetch)
125+
       (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
126+
                                 version "/libpng-" version ".tar.xz")
127+
                  (string-append
128+
                   "ftp://ftp.simplesystems.org/pub/libpng/png/src"
129+
                   "/libpng16/libpng-" version ".tar.xz")
130+
                  (string-append
131+
                   "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
132+
                   "/libpng16/libpng-" version ".tar.xz")))
133+
       (sha256
134+
        (base32
135+
         "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig"))))
136+
    (inputs
137+
     `(("apng" ,(origin
138+
                  (method url-fetch)
139+
                  (uri
140+
                   (string-append "mirror://sourceforge/libpng-apng/libpng16/"
141+
                                  version "/libpng-" version "-apng.patch.gz"))
142+
                  (sha256
143+
                   (base32
144+
                    "1ha4npf9mfrzp0srg8a5amks5ww84xzfpjbsj8k3yjjpai798qg6"))))))))
145+
146+
(define-public sqlite-for-firefox
147+
  (package
148+
   (inherit sqlite)
149+
   (name "sqlite")
150+
   (version "3.21.0")
151+
   (source (origin
152+
            (method url-fetch)
153+
            (uri (let ((numeric-version
154+
                        (match (string-split version #\.)
155+
                          ((first-digit other-digits ...)
156+
                           (string-append first-digit
157+
                                          (string-pad-right
158+
                                           (string-concatenate
159+
                                            (map (cut string-pad <> 2 #\0)
160+
                                                 other-digits))
161+
                                           6 #\0))))))
162+
                   (string-append "https://sqlite.org/2017/sqlite-autoconf-"
163+
                                  numeric-version ".tar.gz")))
164+
            (sha256
165+
             (base32
166+
              "1qxvzdjwzw6k0kqjfabj86rnq87xdbwbca7laxxdhnh0fmkm3pfp"))))))
167+
80168
(define-public firefox
81169
  (package
82170
    (name "firefox")

130218
                      "gfx/cairo"
131219
                      "js/src/ctypes/libffi"
132220
                      "db/sqlite3"))
221+
          ;; Delete this file that has incorrect checksums
222+
          (for-each delete-file (find-files "." "\\.cargo-checksum.json"))
133223
          ;; Delete .pyc files, typically present in icecat source tarballs
134224
          (for-each delete-file (find-files "." "\\.pyc$"))
135225
          ;; Delete obj-* directories, sometimes present in icecat tarballs

141231
    (arguments
142232
     `(#:out-of-source? #t
143233
       #:tests? #f
144-
       #:make-flags (list "--disable-necko-wifi"
145-
                          "--disable-stylo"
146-
                          "--disable-crashreporter"
147-
                          "--disable-updater"
148-
                          "--disable-tests"; Remove if we want to test
149-
                          "--disable-stylo"; FIXME
150-
                          "--enable-application=browser"
151-
                          "--enable-optimize=-O2"
152-
                          "--with-pthreads"
153-
                          ;; use system libraries
154-
                          "--enable-system-hunspell"
155-
                          "--enable-startup-notification"
156-
                          "--enable-alsa" "--enable-pulseaudio"
157-
                          "--enable-system-sqlite"
158-
                          "--with-system-libevent"
159-
                          "--with-system-libvpx"
160-
                          "--with-system-nspr"
161-
                          "--with-system-nss"
162-
                          "--with-system-icu"
163-
                          "--with-system-graphite2"
164-
                          "--with-system-harfbuzz"
165-
                          "--enable-system-cairo"
166-
                          "--enable-system-ffi"
167-
                          "--enable-system-pixman"
168-
                          "--with-system-bz2"
169-
                          "--with-system-jpeg"
170-
                          "--with-system-png"
171-
                          "--with-system-zlib")
234+
       #:configure-flags (list "--disable-necko-wifi"
235+
                               "--disable-stylo"
236+
                               "--disable-crashreporter"
237+
                               "--disable-updater"
238+
                               "--disable-tests"; Remove if we want to test
239+
                               "--enable-application=browser"
240+
                               "--enable-optimize=-O2"
241+
                               "--with-pthreads"
242+
                               ;; use system libraries
243+
                               "--enable-system-hunspell"
244+
                               "--enable-startup-notification"
245+
                               "--enable-alsa" "--enable-pulseaudio"
246+
                               "--enable-system-sqlite"
247+
                               "--with-system-libevent"
248+
                               "--with-system-libvpx"
249+
                               "--with-system-nspr"
250+
                               "--with-system-nss"
251+
                               "--with-system-icu"
252+
                               "--enable-system-cairo"
253+
                               "--enable-system-ffi"
254+
                               "--enable-system-pixman"
255+
                               "--with-system-bz2"
256+
                               "--with-system-jpeg"
257+
                               "--with-system-png"
258+
                               "--with-system-zlib")
259+
                               ;; clang is not found because it is assumed to be in
260+
                               ;; the same location as llvm.
261+
                               ;(string-append "--with-clang-path="
262+
                               ;               (assoc-ref %build-inputs "clang-3.9.1")
263+
                               ;               "/bin/clang"))
264+
                               ;(string-append "--with-libclang-path="
265+
                               ;               (assoc-ref %build-inputs "clang-3.9.1")
266+
                               ;               "/lib"))
267+
       ;; Race condition in python?
268+
       ;;   EOFError: EOF read where object expected
269+
       #:parallel-build? #f
172270
       #:phases
173271
       (modify-phases %standard-phases
174272
         (replace

184282
                            ,(string-append "--with-l10n-base="
185283
                                            abs-srcdir "/intl/l10n")
186284
                            ,@configure-flags)))
285+
              ;; We removed the embedded sqlite, so don't reference it.
286+
              (substitute* '("storage/moz.build" "dom/indexedDB/moz.build")
287+
                (("'/db/sqlite3/src',") ""))
187288
              (setenv "SHELL" bash)
188289
              (setenv "CONFIG_SHELL" bash)
189290
              (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13

218319
       ("libxt" ,libxt)
219320
       ("libffi" ,libffi)
220321
       ("ffmpeg" ,ffmpeg)
322+
       ("libpng-apng" ,libpng-apng-for-firefox)
221323
       ("libvpx" ,libvpx)
222-
       ("icu4c" ,icu4c)
324+
       ("icu4c" ,icu4c-for-firefox)
223325
       ("pixman" ,pixman)
224326
       ("pulseaudio" ,pulseaudio)
225327
       ("mesa" ,mesa)
226328
       ("nspr" ,nspr)
227-
       ("nss" ,nss)
228-
       ("sqlite" ,sqlite)
329+
       ("nss" ,nss-for-firefox)
330+
       ("sqlite" ,sqlite-for-firefox)
229331
       ("startup-notification" ,startup-notification)
230332
       ("unzip" ,unzip)
231333
       ("zip" ,zip)