gnu: icecat: Use system harfbuzz and graphite2 libraries.
[jackhill/guix/guix.git] / gnu / packages / gnuzilla.scm
CommitLineData
be0f6112 1;;; GNU Guix --- Functional package management for GNU
5deea4fc 2;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
1b321229 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
c1c2e1d7 4;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
1aaaff1a 5;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
1461dd24 6;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
88a8ce87 7;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
8db94716 8;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
c1463145 9;;; Copyright © 2017 ng0 <ng0@infotropique.org>
e26e55c8 10;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
be0f6112
AE
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages gnuzilla)
07d4d9b7 28 #:use-module ((srfi srfi-1) #:hide (zip))
1461dd24 29 #:use-module (ice-9 match)
be0f6112 30 #:use-module (gnu packages)
b5b73a82 31 #:use-module ((guix licenses) #:prefix license:)
be0f6112
AE
32 #:use-module (guix packages)
33 #:use-module (guix download)
aaac423c 34 #:use-module (guix utils)
be0f6112 35 #:use-module (guix build-system gnu)
002c3e6d 36 #:use-module (gnu packages autotools)
bfb48f4f 37 #:use-module (gnu packages base)
1aaaff1a 38 #:use-module (gnu packages databases)
be0f6112 39 #:use-module (gnu packages glib)
be0f6112 40 #:use-module (gnu packages gtk)
90e1cdae
MW
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages libcanberra)
43 #:use-module (gnu packages cups)
89e34644 44 #:use-module (gnu packages kerberos)
be0f6112
AE
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pkg-config)
1ae6df81 48 #:use-module (gnu packages compression)
74c7af9f 49 #:use-module (gnu packages fontutils)
1ae6df81 50 #:use-module (gnu packages libevent)
90e1cdae 51 #:use-module (gnu packages libreoffice) ;for hunspell
e55354b8 52 #:use-module (gnu packages image)
1ae6df81 53 #:use-module (gnu packages libffi)
74c7af9f 54 #:use-module (gnu packages pulseaudio)
be0f6112
AE
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages xorg)
200726ed 57 #:use-module (gnu packages gl)
01497dfe 58 #:use-module (gnu packages assembly)
13b284d9
MW
59 #:use-module (gnu packages icu4c)
60 #:use-module (gnu packages video)
61 #:use-module (gnu packages xdisorg)
29f381ba 62 #:use-module (gnu packages readline))
be0f6112 63
4923e06f
SB
64(define-public mozjs
65 (package
66 (name "mozjs")
67 (version "17.0.0")
68 (source (origin
69 (method url-fetch)
70 (uri (string-append
71 "https://ftp.mozilla.org/pub/mozilla.org/js/"
72 name version ".tar.gz"))
73 (sha256
74 (base32
68716289 75 "1fig2wf4f10v43mqx67y68z6h77sy900d1w0pz9qarrqx57rc7ij"))
a64b7da5 76 (patches (search-patches "mozjs17-aarch64-support.patch"))
68716289
SB
77 (modules '((guix build utils)))
78 (snippet
79 ;; Fix incompatibility with Perl 5.22+.
80 '(substitute* '("js/src/config/milestone.pl")
81 (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")))))
4923e06f
SB
82 (build-system gnu-build-system)
83 (native-inputs
f403c676
EF
84 `(("perl" ,perl)
85 ("pkg-config" ,pkg-config)
86 ("python" ,python-2)))
87 (propagated-inputs
88 `(("nspr" ,nspr))) ; in the Requires.private field of mozjs-17.0.pc
89 (inputs
90 `(("zlib" ,zlib)))
4923e06f 91 (arguments
56486b3a
EF
92 `(;; XXX: parallel build fails, lacking:
93 ;; mkdir -p "system_wrapper_js/"
94 #:parallel-build? #f
95 #:phases
96 (modify-phases %standard-phases
97 (add-after 'unpack 'delete-timedout-test
a64b7da5 98 ;; This test times out on slower hardware.
56486b3a
EF
99 (lambda _ (delete-file "js/src/jit-test/tests/basic/bug698584.js")))
100 (add-before 'configure 'chdir
4923e06f 101 (lambda _
56486b3a
EF
102 (chdir "js/src")
103 #t))
104 (replace 'configure
105 ;; configure fails if it is followed by SHELL and CONFIG_SHELL
106 (lambda* (#:key outputs #:allow-other-keys)
107 (let ((out (assoc-ref outputs "out")))
108 (setenv "SHELL" (which "sh"))
109 (setenv "CONFIG_SHELL" (which "sh"))
110 (zero? (system*
111 "./configure" (string-append "--prefix=" out)
112 ,@(if (string=? "aarch64-linux"
113 (%current-system))
114 '("--host=aarch64-unknown-linux-gnu")
115 '())))))))))
4923e06f
SB
116 (home-page
117 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey")
118 (synopsis "Mozilla javascript engine")
119 (description "SpiderMonkey is Mozilla's JavaScript engine written
120in C/C++.")
87158e85 121 (license license:mpl2.0))) ; and others for some files
4923e06f 122
cefdcb38
SB
123(define-public mozjs-24
124 (package (inherit mozjs)
125 (name "mozjs")
126 (version "24.2.0")
127 (source (origin
128 (method url-fetch)
129 (uri (string-append
130 "https://ftp.mozilla.org/pub/mozilla.org/js/"
131 name "-" version ".tar.bz2"))
132 (sha256
133 (base32
68716289
SB
134 "1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6"))
135 (modules '((guix build utils)))
26f38d31 136 (patches (search-patches "mozjs24-aarch64-support.patch"))
68716289
SB
137 (snippet
138 ;; Fix incompatibility with Perl 5.22+.
139 '(substitute* '("js/src/config/milestone.pl")
140 (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")))))
cefdcb38 141 (arguments
aaac423c
EF
142 (substitute-keyword-arguments (package-arguments mozjs)
143 ((#:phases phases)
144 `(modify-phases ,phases
145 (replace 'configure
146 (lambda* (#:key outputs #:allow-other-keys)
147 (let ((out (assoc-ref outputs "out")))
148 ;; configure fails if it is followed by SHELL and CONFIG_SHELL
149 (setenv "SHELL" (which "sh"))
150 (setenv "CONFIG_SHELL" (which "sh"))
151 (zero? (system* "./configure"
152 (string-append "--prefix=" out)
153 "--with-system-nspr"
154 "--enable-system-ffi"
155 "--enable-threadsafe"
156 ,@(if (string=? "aarch64-linux"
157 (%current-system))
158 '("--host=aarch64-unknown-linux-gnu")
159 '()))))))))))
cefdcb38
SB
160 (inputs
161 `(("libffi" ,libffi)
162 ("zlib" ,zlib)))))
163
29f381ba
CL
164(define-public mozjs-38
165 (package
166 (inherit mozjs)
167 (name "mozjs")
168 (version "38.2.1.rc0")
169 (source (origin
170 (method url-fetch)
171 (uri (string-append
172 "https://people.mozilla.org/~sstangl/"
173 name "-" version ".tar.bz2"))
174 (sha256
175 (base32
176 "0p4bmbpgkfsj54xschcny0a118jdrdgg0q29rwxigg3lh5slr681"))
177 (patches
178 (search-patches
179 ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1269317 for
180 ;; GCC 6 compatibility.
181
182 "mozjs38-version-detection.patch" ; for 0ad
183 "mozjs38-tracelogger.patch"
184
185 ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1339931.
186 "mozjs38-pkg-config-version.patch"
187 "mozjs38-shell-version.patch"))
188 (modules '((guix build utils)))
189 (snippet
190 '(begin
191 ;; Fix incompatibility with sed 4.4.
192 (substitute* "js/src/configure"
193 (("\\^\\[:space:\\]") "^[[:space:]]"))
194
195 ;; The headers are symlinks to files that are in /tmp, so they
196 ;; end up broken. Copy them instead.
197 (substitute*
198 "python/mozbuild/mozbuild/backend/recursivemake.py"
199 (("\\['dist_include'\\].add_symlink")
200 "['dist_include'].add_copy"))
201
202 ;; Remove bundled libraries.
203 (for-each delete-file-recursively
204 '("intl"
205 "js/src/ctypes/libffi"
206 "js/src/ctypes/libffi-patches"
207 "modules/zlib"))
208 #t))))
209 (arguments
210 `(;; XXX: parallel build fails, lacking:
211 ;; mkdir -p "system_wrapper_js/"
212 #:parallel-build? #f
213 ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1008470.
214 #:tests? #f
215 #:phases
216 (modify-phases %standard-phases
217 (replace 'configure
218 (lambda* (#:key outputs #:allow-other-keys)
219 (let ((out (assoc-ref outputs "out")))
220 (chdir "js/src")
221 (setenv "SHELL" (which "sh"))
222 (setenv "CONFIG_SHELL" (which "sh"))
223 (zero? (system* "./configure"
224 (string-append "--prefix=" out)
225 "--enable-ctypes"
226 "--enable-gcgenerational"
227 "--enable-optimize"
228 "--enable-pie"
229 "--enable-readline"
230 "--enable-shared-js"
231 "--enable-system-ffi"
232 "--enable-threadsafe"
233 "--enable-xterm-updates"
234 "--with-system-icu"
235 "--with-system-nspr"
236 "--with-system-zlib"
237
238 ;; Intl API requires bundled ICU.
239 "--without-intl-api"))))))))
240 (native-inputs
241 `(("perl" ,perl)
242 ("pkg-config" ,pkg-config)
243 ("python-2" ,python-2)))
244 (inputs
245 `(("libffi" ,libffi)
246 ("readline" ,readline)
247 ("icu4c" ,icu4c)
248 ("zlib" ,zlib)))))
249
4923e06f
SB
250(define-public nspr
251 (package
252 (name "nspr")
ad7a73a9 253 (version "4.17")
4923e06f
SB
254 (source (origin
255 (method url-fetch)
256 (uri (string-append
257 "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v"
258 version "/src/nspr-" version ".tar.gz"))
259 (sha256
260 (base32
ad7a73a9 261 "158hdn285dsb5rys8wl1wi32dd1axwhqq0r8fwny4aj157m0l2jr"))))
4923e06f
SB
262 (build-system gnu-build-system)
263 (native-inputs
84fb4bd9 264 `(("perl" ,perl)))
4923e06f 265 (arguments
8550894b
LC
266 `(#:tests? #f ; no check target
267 #:configure-flags (list "--enable-64bit"
268 (string-append "LDFLAGS=-Wl,-rpath="
269 (assoc-ref %outputs "out")
270 "/lib"))
04952bd7
EF
271 #:phases (modify-phases %standard-phases
272 (add-before 'configure 'chdir
273 (lambda _ (chdir "nspr") #t)))))
4923e06f
SB
274 (home-page
275 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR")
276 (synopsis "Netscape API for system level and libc-like functions")
277 (description "Netscape Portable Runtime (NSPR) provides a
278platform-neutral API for system level and libc-like functions. It is used
279in the Mozilla clients.")
280 (license license:mpl2.0)))
281
1aaaff1a
SB
282(define-public nss
283 (package
284 (name "nss")
1450bd31 285 (version "3.34.1")
1aaaff1a
SB
286 (source (origin
287 (method url-fetch)
2bb9b5de
MW
288 (uri (let ((version-with-underscores
289 (string-join (string-split version #\.) "_")))
290 (string-append
fe88f636 291 "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
2bb9b5de
MW
292 "releases/NSS_" version-with-underscores "_RTM/src/"
293 "nss-" version ".tar.gz")))
1aaaff1a
SB
294 (sha256
295 (base32
1450bd31 296 "186x33wsk4mzjz7dzbn8p0py9a0nzkgzpfkdv4rlyy5gghv5vhd3"))
1aaaff1a 297 ;; Create nss.pc and nss-config.
d027b001
MB
298 (patches (search-patches "nss-pkgconfig.patch"
299 "nss-increase-test-timeout.patch"))))
1aaaff1a
SB
300 (build-system gnu-build-system)
301 (outputs '("out" "bin"))
302 (arguments
1461dd24 303 `(#:parallel-build? #f ; not supported
1aaaff1a
SB
304 #:make-flags
305 (let* ((out (assoc-ref %outputs "out"))
306 (nspr (string-append (assoc-ref %build-inputs "nspr")))
307 (rpath (string-append "-Wl,-rpath=" out "/lib/nss")))
308 (list "-C" "nss" (string-append "PREFIX=" out)
309 "NSDISTMODE=copy"
310 "NSS_USE_SYSTEM_SQLITE=1"
311 (string-append "NSPR_INCLUDE_DIR=" nspr "/include/nspr")
312 ;; Add $out/lib/nss to RPATH.
313 (string-append "RPATH=" rpath)
314 (string-append "LDFLAGS=" rpath)))
315 #:modules ((guix build gnu-build-system)
316 (guix build utils)
317 (ice-9 ftw)
318 (ice-9 match)
319 (srfi srfi-26))
1aaaff1a 320 #:phases
db3c06d5
MB
321 (modify-phases %standard-phases
322 (replace 'configure
1461dd24 323 (lambda _
db3c06d5
MB
324 (setenv "CC" "gcc")
325 ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
1461dd24
MB
326 ,@(match (%current-system)
327 ((or "x86_64-linux" "aarch64-linux")
328 `((setenv "USE_64" "1")))
329 (_
330 '()))
db3c06d5
MB
331 #t))
332 (replace 'check
333 (lambda _
334 ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
335 ;; The later requires a working DNS or /etc/hosts.
336 (setenv "DOMSUF" "(none)")
337 (setenv "USE_IP" "TRUE")
338 (setenv "IP_ADDRESS" "127.0.0.1")
339 (zero? (system* "./nss/tests/all.sh"))))
340 (replace 'install
341 (lambda* (#:key outputs #:allow-other-keys)
342 (let* ((out (assoc-ref outputs "out"))
343 (bin (string-append (assoc-ref outputs "bin") "/bin"))
344 (inc (string-append out "/include/nss"))
345 (lib (string-append out "/lib/nss"))
346 (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
347 ((obj) (string-append "dist/" obj)))))
348 ;; Install nss-config to $out/bin.
349 (install-file (string-append obj "/bin/nss-config")
350 (string-append out "/bin"))
351 (delete-file (string-append obj "/bin/nss-config"))
352 ;; Install nss.pc to $out/lib/pkgconfig.
353 (install-file (string-append obj "/lib/pkgconfig/nss.pc")
354 (string-append out "/lib/pkgconfig"))
355 (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
356 (rmdir (string-append obj "/lib/pkgconfig"))
357 ;; Install other files.
358 (copy-recursively "dist/public/nss" inc)
359 (copy-recursively (string-append obj "/bin") bin)
360 (copy-recursively (string-append obj "/lib") lib)
3161f6a4 361
db3c06d5
MB
362 ;; FIXME: libgtest1.so is installed in the above step, and it's
363 ;; (unnecessarily) linked with several NSS libraries, but
364 ;; without the needed rpaths, causing the 'validate-runpath'
365 ;; phase to fail. Here we simply delete libgtest1.so, since it
366 ;; seems to be used only during the tests.
367 (delete-file (string-append lib "/libgtest1.so"))
bd512249 368 (delete-file (string-append lib "/libgtestutil.so"))
3161f6a4 369
db3c06d5 370 #t))))))
1aaaff1a
SB
371 (inputs
372 `(("sqlite" ,sqlite)
373 ("zlib" ,zlib)))
374 (propagated-inputs `(("nspr" ,nspr))) ; required by nss.pc.
375 (native-inputs `(("perl" ,perl)))
86e3e370 376
e9b718a0
MW
377 ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
378 ;; another build is happening concurrently on the same machine.
379 (properties '((timeout . 216000))) ; 60 hours
86e3e370 380
1aaaff1a
SB
381 (home-page
382 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS")
383 (synopsis "Network Security Services")
384 (description
e26e55c8
TGR
385 "Network Security Services (@dfn{NSS}) is a set of libraries designed to
386support cross-platform development of security-enabled client and server
387applications. Applications built with NSS can support SSL v2 and v3, TLS,
388PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other
389security standards.")
1aaaff1a
SB
390 (license license:mpl2.0)))
391
bfb48f4f 392(define (mozilla-patch file-name changeset hash)
002c3e6d 393 "Return an origin for CHANGESET from the mozilla-esr52 repository."
bfb48f4f
MW
394 (origin
395 (method url-fetch)
002c3e6d 396 (uri (string-append "https://hg.mozilla.org/releases/mozilla-esr52/raw-rev/"
bfb48f4f
MW
397 changeset))
398 (sha256 (base32 hash))
399 (file-name file-name)))
400
be0f6112
AE
401(define-public icecat
402 (package
403 (name "icecat")
3c7c9161 404 (version "52.3.0-gnu1")
be0f6112
AE
405 (source
406 (origin
407 (method url-fetch)
5bdec7d6
MW
408 (uri (string-append "mirror://gnu/gnuzilla/"
409 (first (string-split version #\-))
410 "/" name "-" version ".tar.bz2"))
be0f6112
AE
411 (sha256
412 (base32
3c7c9161 413 "00jki754d6310fxj1b7dbhqj69y5igck6gqg6rgfya243nsb56k9"))
bfb48f4f 414 (patches
5bdec7d6
MW
415 (list
416 (search-patch "icecat-avoid-bundled-libraries.patch")
110afdde
MW
417 (search-patch "icecat-use-system-harfbuzz.patch")
418 (search-patch "icecat-use-system-graphite2.patch")
3c7c9161
MW
419 (mozilla-patch "icecat-bug-546387.patch" "d13e3fefb76e" "1b760r0bg2ydbl585wlmajljh1nlisrwxvjws5b28a3sgjy01i6k")
420 (mozilla-patch "icecat-bug-1350152.patch" "f822bda79c28" "1wf56169ca874shr6r7qx40s17h2gwj7ngmpyylrpmd1c6hipvsj")
421 (mozilla-patch "icecat-bug-1388166.patch" "fbb0bdb191d5" "1y8wpj38vw1dd6f375s9i0mrk9bd8z8gz5g70p4qynfllpkn072d")
3fd2f86a
MW
422 (mozilla-patch "icecat-CVE-2017-7810-pt1.patch" "fbddb5cdd3c7" "0k5nyl2z1y2rx9fwqyfj64678yv6v3pnmshgk552pbzqmaf8i1hq")
423 (mozilla-patch "icecat-CVE-2017-7810-pt2.patch" "76c25987a275" "095b9vwsiza9ikbnnppfcld16h75x5bxjfxc73913y04n0i42ifh")
424 (mozilla-patch "icecat-CVE-2017-7810-pt3.patch" "32eec29a85a5" "057simakqg56jvas1wkskg5kszn96m74nca26x08d5w7rzmbv1q2")
3c7c9161 425 (mozilla-patch "icecat-bug-1373222.patch" "ecef71fa933f" "0vsymgy5j702lamvh2riahni7rdj9ba3bd6i4a2m22d638rwp1i2")
3fd2f86a 426 (mozilla-patch "icecat-CVE-2017-7814.patch" "68a444daf85b" "1faaadaajidzb9i00710zxdyv370hlrdg1l5rw2ymfmzbjj4jqyd")
3c7c9161
MW
427 (mozilla-patch "icecat-bug-1376825.patch" "eeeec9cafc4e" "188qf6zi9kyxb33330yia6wmrd5mdyqn5hr1cl38zy7m3akv8srh")
428 (mozilla-patch "icecat-bug-1385272.patch" "d68fa12fbffc" "13gh97vz9n2b7303jcvr1072iy8bghy9chvbmxzvw82prvkscavw")
429 (mozilla-patch "icecat-bug-1390002.patch" "c24e6fc9f689" "0aswhy5fz2f6wzd5j5gg3nqvz707ip344089h2z2chcp146vxmf4")
3fd2f86a 430 (mozilla-patch "icecat-CVE-2017-7810-pt4.patch" "ae110cf77596" "0gdrkfq9wy9cfcdgbj14ci86xgh2prkbz69pfy97r9igd8059syw")
464a2889
MW
431 (mozilla-patch "icecat-CVE-2017-7810-pt5.patch" "b8417112486d" "1hya6lccz7vm51v4f6ww072794cwzmfn9xhxmvrnqbiyspxx5fz4")
432 (mozilla-patch "icecat-bug-1386905.patch" "badbf4308211" "0fj1pyjqfdsbrlfykwmkzav2nvdj1f4grwq3cal9f7ay6wjnfs9b")
433 (mozilla-patch "icecat-CVE-2017-7810-pt6.patch" "d78675515c78" "03w5hqy40xkckbaf5bm9kdbdqvp9ffvpk9mlrc9lja6b7qa4pjhg")
434 (mozilla-patch "icecat-bug-1382303.patch" "f01155fe4d54" "0hnz1kvmvspg6453kydsklbvrjgzn8x3djvrym3f2xl2yinaf90d")
435 (mozilla-patch "icecat-bug-1393467.patch" "4eec2a60622c" "1h006mwcsagq7mz7haymwgr7fn4zj14n5lxbjcmhdqrxdvma2hjj")
436 (mozilla-patch "icecat-bug-1384801.patch" "9556e792f905" "0i74r807189s8i78483caiifw68cn7fs543i4cys6k3gn12dhhjy")
437 (mozilla-patch "icecat-CVE-2017-7823.patch" "bd284765b5bc" "1c4hss87kc4qwx30magbqczm9h7zmwirjfc8zimqbrnwv9bbsfh3")
438 (mozilla-patch "icecat-CVE-2017-7805.patch" "113da8d46aa4" "1vy0lw659mwixmb57mgybga152rdwqd5zj1g7nfw1zgp15pfwr75")
439 (mozilla-patch "icecat-bug-1376399.patch" "58a574502ca9" "1zmg91pg0s5nwngc32a4fywidvxyaayvx1h052fsv0i4cfm16l9v")
440 (mozilla-patch "icecat-bug-1396570.patch" "24db61862c54" "0af1jjfma042xvn0xhgims1yvb2b51nhn4m0pcfwg3fn0llmka03")
441 (mozilla-patch "icecat-CVE-2017-7819.patch" "1a02f11c6efe" "18a9qvdvrqw34qw3lljg6gkn358jl23lyimhmbc964023rhs36sz")
442 (mozilla-patch "icecat-CVE-2017-7810-pt7.patch" "002686d9536f" "065g0d759wfiaj69b1sqg7l08p2knc0q9m9hvkgwwsf0r78xcbjj")
443 (mozilla-patch "icecat-CVE-2017-7810-pt8.patch" "eaadb31758d8" "0b3k3la6ykac5mbp9gyqqgjbmj19vx9sl1b0wp387qar0p12nyaz")
444 (mozilla-patch "icecat-bug-1368269.patch" "0cff5e66e0f4" "0jb0wqi7c0ih4441s1908j6gv18v4inh7k2w47h3c9nhz4rgyrw7")
445 (mozilla-patch "icecat-CVE-2017-7793.patch" "6ff3c82962f0" "0bw82034kdmrpznigbavzzsiybzrw8giyf8v0z2cxf6mwl72bf9k")
446 (mozilla-patch "icecat-bug-1400399.patch" "d6f78b1349b7" "0i3gwr2al3xl65yfa3nimvy8dp0jzpx21f6bjw18xwn7zkkh9j54")
bb234ed8 447 (mozilla-patch "icecat-bug-1400721.patch" "285cde398833" "0a1i32zl30wfyw7zkqj595s94n6wdlg5c495m0910pd05pjg3qam")
6a71fa6f
MW
448 (mozilla-patch "icecat-CVE-2017-7826-pt01.patch" "98b3988592a6" "03wy173lj6mvmh5q92brf596h8676h0zasgqfnndpvsmsiaih120")
449 (mozilla-patch "icecat-CVE-2017-7826-pt02.patch" "47590f0c274b" "0zsys6dcyhfb4a8k2dhsls7425jg6r1ijlrsn1lc5smwyf62zx5v")
450 (mozilla-patch "icecat-CVE-2017-7826-pt03.patch" "55b435cbbb55" "1gcasaqrxa13a55v05bkxl3d1md829kpfhqiaws83wn08x28l0my")
451 (mozilla-patch "icecat-CVE-2017-7826-pt04.patch" "8549cf2dab3e" "168gs32ncavaj9xn4gwhh9i01cbpnhgx9yn333apsrc1gwknpvsr")
452 (mozilla-patch "icecat-CVE-2017-7826-pt05.patch" "349acf56ff49" "1vwn87rdryfjsn809pl50xmr82q98gz3vz9h6clkd905vbd9rwz7")
453 (mozilla-patch "icecat-CVE-2017-7826-pt06.patch" "3af5bf8bdea0" "07az28dnpxr36j7i3llxkrlkrmg0bwk4f3sm75x1f0r1v5575p3p")
454 (mozilla-patch "icecat-CVE-2017-7826-pt07.patch" "592df6088926" "1gy27idik4b6wcg4szww08cmpcljssja8wql6w1d807h7ni65lr7")
455 (mozilla-patch "icecat-CVE-2017-7826-pt08.patch" "77a2d4610275" "13ysbwflnysj4rs45ibckd621s0vyg1s8dvannlvanvrz1g72zcz")
456 (mozilla-patch "icecat-CVE-2017-7826-pt09.patch" "2b30335d0b95" "0hs5cwickvfw7r5dn7y148jgr2b21hl613qp83k56634d0y64qwp")
457 (mozilla-patch "icecat-CVE-2017-7826-pt10.patch" "d6f008f95598" "0xclxrbg7pv8pa2j15p0gy9c8sigy2i9j0kvazl5fbyg6jsg3xgd")
458 (mozilla-patch "icecat-CVE-2017-7826-pt11.patch" "ab9b51cd75ac" "08jy3rbkyh934aw261ls0s87947d2mhss7xqk1xfdir9crij2g27")
f7ddf996
MW
459 (mozilla-patch "icecat-bug-1343147-pt1.patch" "971d6345bc3a" "13791cvc51i991i5qyz6gp94vwzwkx479bnr8fsf8dw7z72wrsch")
460 (mozilla-patch "icecat-bug-1343147-pt2.patch" "60df7db06669" "0r372g1zksvkzyz0qpq0mp30frilgsfxxx2xida8xc08wgxp5lh9")
6a71fa6f
MW
461 (mozilla-patch "icecat-CVE-2017-7826-pt12.patch" "df49c25e6e4c" "0j77xbkxpflqf4jlccrv61vq0jgp4lfn8kb0zw1lswp3cyd6ml4i")
462 (mozilla-patch "icecat-CVE-2017-7826-pt13.patch" "3b899f872623" "01zjcpm8yp4s8yf4mj1bzq01aylmi69kd8qv0rrcl9hmj4g3pzr2")
463 (mozilla-patch "icecat-CVE-2017-7826-pt14.patch" "3d6d558ae6a6" "17wynknvs5wi7m9g5vn43rjmivbg1l6pnv8jymz1ccidy27qgdqi")
464 (mozilla-patch "icecat-CVE-2017-7826-pt15.patch" "8426754b7130" "0bbm2294bkvld55rdbpsc8b82ljqdcxpbg6cwdzvwfhqayl2pnqm")
465 (mozilla-patch "icecat-CVE-2017-7828-pt1.patch" "5ddd5d2aa769" "12z5i8h6qwjb1h1fvp2426bgsnsxx539d8k2is9x1q4133356niy")
466 (mozilla-patch "icecat-CVE-2017-7826-pt16.patch" "dd068f4e132a" "17qy9c1vfkz3pj6y8qmqbic73wrangsbdlylk2s54nbzhhp9cj1g")
467 (mozilla-patch "icecat-CVE-2017-7826-pt17.patch" "e6bd533b57e9" "1mmqav9yhxd0j47yffcdykaqjibfwjsk0jn0f44099s87y8qn9zy")
468 (mozilla-patch "icecat-CVE-2017-7826-pt18.patch" "2a87fb6b9c07" "0z0scw4y1vqhqkbw1ag14g8xrif14l95x7fd50q2sw425lli29lc")
f1e32145
MW
469 (mozilla-patch "icecat-bug-1404910.patch" "5007f2472f64" "0ns1l4yipwbb52sps2xzg30qd1rkpwykxq4chjg3wllhmcxbvvpw")
470 (mozilla-patch "icecat-CVE-2017-7830.patch" "04e3b5c1f0b2" "0nmv3jnx94ykxg64xkiwc8kx4df8zw7y5yzjnxz1sll2v88b9hmf")
471 (mozilla-patch "icecat-CVE-2017-7828-pt2.patch" "2f48c03d9b3f" "16qdy3rahmkhsjnzqjcgzg1a4k7czd40m04gs9i75cd88kbripri")
472 (mozilla-patch "icecat-bug-1348660-pt1.patch" "a352bfcbaf55" "1j3kxnhci9fh3lj8rizbcfv8xzn5kikxwpfy8a091d51sdn20873")
473 (mozilla-patch "icecat-bug-1348660-pt2.patch" "57f43e2ab9b5" "1jva4y79zb85npak3mddrx5rsf4mxczb314kcr8yhlkwqv0nx5sp")
474 (mozilla-patch "icecat-bug-1348660-pt3.patch" "917d65bb8896" "0k29y8i96lanqjjm6vybg0s6gjbk1mz5bfnga6aj1g0hnb7c3s8d")
475 (mozilla-patch "icecat-bug-1348660-pt4.patch" "28934912eede" "1mhxw26050l3d09n8w912a86df87afcshvsk9k1k375anfk0927x")
476 (search-patch "icecat-bug-1348660-pt5.patch")
477 (mozilla-patch "icecat-bug-1348660-pt6.patch" "556ff3bfb9fc" "0kckjc8jp885xfaiwx2b9qnk1plqjhi0mwhjjcmfajvh3l3mrl8h")
478 (mozilla-patch "icecat-bug-1350564.patch" "2abf26abb2a2" "0axdzp9g9k74wpkwrsdx263h01sv9bd3rarhhl68xnvc7n6i45lx")
479 (mozilla-patch "icecat-bug-1404787.patch" "8335e1d7b140" "17d7kb8ginzflhdkrbi60vh2b907spbzmvwih7a595gqpihmnqqn")
480 (mozilla-patch "icecat-CVE-2017-7826-pt19.patch" "de336078d36b" "0gyzbap8hr1iywk0x2x0h7z7zp7q89hi56h8c03vvc7771dkvjkf")
481 (mozilla-patch "icecat-bug-1047098-pt1.patch" "088577f0c46e" "0y3sz6kx07ls7jsvhqhhrl6v69a94wqvv3lz7hnplah23y06h17z")
482 (mozilla-patch "icecat-bug-1047098-pt2.patch" "c7e3abf74023" "11dcjzx56v4yb2dvm23j2g86q8yva2hc69lmb7s5w18l6ygwwhzr")
483 (mozilla-patch "icecat-bug-1047098-pt3.patch" "36bd15d14c5a" "0cb3l3hpsgk674f08kfamxhqfga3ah5v904gpxq9ag006vzd2cxz")
484 (mozilla-patch "icecat-bug-1404105.patch" "2909ba991f31" "126vssj57dc800347f075wlnjzcwamnxxmgxl9w78jpb0hj9gf16")
485 (search-patch "icecat-bug-1415133.patch")
145a5310 486 (mozilla-patch "icecat-bug-1355576.patch" "cf34a0574e58" "1z7sa1d12hypgivm5xxn32s58afpjcij97jvnafcgnfvxywrgr1m")
e8e860a5
MW
487 (mozilla-patch "icecat-CVE-2017-7843.patch" "f6216ea8b8fc" "0jnhdkj0ch9mj01mzlvhjgf8zsxlbg6m7yvpq99qr7xmg0pzbgwl")
488 (mozilla-patch "icecat-bug-1413741.patch" "4e00ce2897c4" "0k95vi31glia2i03djidkc0gkwp9qldy34fz1rxcj56a1iphbq7w")
c1c2e1d7
MW
489 (mozilla-patch "icecat-CVE-2018-5089-pt01.patch" "92d450811409" "0xsvggnr0y65nd52nkbjvpcbs5nd84pvbayk5vinbx1mnk2wh2vy")
490 (mozilla-patch "icecat-CVE-2018-5089-pt02.patch" "7eba7d14704a" "1vi17qmjzh3kji14iz370kvs4425asgp93ns2chf5ldlq5b9196g")
491 (mozilla-patch "icecat-CVE-2018-5089-pt03.patch" "457d023c167e" "11g8hg8yp20lsn52dx1ym8r4yjsnsmx0h182d6nbl6ab9wp7d1m9")
492 (mozilla-patch "icecat-CVE-2018-5089-pt04.patch" "5e7b16213198" "14c4x6c3mygf8p77n9bia5rndjpngbvik1r1ylk97k3ggy4fj6zh")
493 (mozilla-patch "icecat-CVE-2018-5102.patch" "0712b6cbbdc8" "0rllsq6ckpms7g9k6qky1gr5rz1gav4widrha6w1s9f88cbrqgk5")
494 (mozilla-patch "icecat-CVE-2018-5089-pt05.patch" "084c427ccf99" "0sjdy2iang09a9g6liavpjgry04dp6smjgj0y7lp5lfqijdr8q2d")
495 (mozilla-patch "icecat-CVE-2018-5089-pt06.patch" "1bfb3d8d4510" "0c2dcxj74ijs6qf9sqcbj8w998hblic66vy41818z7xnw46j5j1j")
e8e860a5 496 (mozilla-patch "icecat-bug-1414425.patch" "5623e01e63a8" "08dn3v96bsb61hy3wfxz43fhn1mk9vlm5ydvdjgi3wiqadvacgzs")
c1c2e1d7 497 (mozilla-patch "icecat-CVE-2018-5089-pt07.patch" "14a389d40329" "0f4gbak5bd2walxrxs3myig28v9lhvplf3a1nws1a4ajx80slzq1")
e8e860a5 498 (mozilla-patch "icecat-bug-1415441.patch" "7339297cddb7" "017lbw0mn5rwzb2abfw6qrk07m3r96vwbj81cmqvdfnmprcjni5j")
c1c2e1d7 499 (mozilla-patch "icecat-CVE-2018-5096.patch" "aa55d4cdaee5" "1l3qwjfx0jsbbw2dg8bsnx7k47zibamgswndq0d1bchnmary62aw")
e8e860a5 500 (mozilla-patch "icecat-bug-1382358.patch" "762f4e53889a" "0n61zrb6rz9bhhdsqs5ziwaiy81pq52c76p9qmi9hrxbn24ism1k")
c1c2e1d7 501 (mozilla-patch "icecat-CVE-2018-5089-pt08.patch" "0152d097672f" "16ybg718calvciv00kil8s97lhh11hj6gx0acf73r44xfkvm8nfg")
e8e860a5 502 (search-patch "icecat-bug-1414945.patch")
c1c2e1d7
MW
503 (mozilla-patch "icecat-CVE-2018-5089-pt09.patch" "079356ed5317" "107c0b93g2k743wvhwz2ps3j6p09qld7d0raljijv5y5n8q4wp92")
504 (mozilla-patch "icecat-CVE-2018-5089-pt10.patch" "93e4994a892c" "00r2qxw3619529vy9d04dl9kcziqy3fv3iawgy9svzygyx1kj5wx")
505 (mozilla-patch "icecat-CVE-2018-5089-pt11.patch" "f8a6e1864832" "1wbxn0v50637yjg8b8675k01x9cyx95jpjxpyqfaa97762qkznba")
506 (mozilla-patch "icecat-CVE-2018-5089-pt12.patch" "0cc1c9068714" "1qmqpi14zs7c95k3c7396gpp6apb622k0mgv553kw4rr81nj1yac")
507 (mozilla-patch "icecat-CVE-2018-5095.patch" "ce6f3fb2bf58" "1b1msb5d5jsgrqa2hkbsrm0n54qdmx1b2bf65v44v17appa03lra")
508 (mozilla-patch "icecat-CVE-2018-5103.patch" "6b4d3c5d5e51" "074p93dhwr1ckhypkjpblnmg9hg44a9030g1glqffi9dyn3iq3k4")
e8e860a5
MW
509 (mozilla-patch "icecat-bug-1411745.patch" "1a510ee578a0" "1imb7glh2m1zwvvpvr4k4iddms5byqzr35j7kv3y5is77aiwl4z5")
510 (mozilla-patch "icecat-bug-1411708.patch" "34c968767eb7" "0l2jy201ikj3m3h66mvlsj4y0ki7cpm7x7nnfygbwnfxg42s1sip")
c1c2e1d7
MW
511 (mozilla-patch "icecat-CVE-2018-5091.patch" "bc166be85bb4" "0w1lrjzfrfflaw4l6sfi3ir81iyi9gyfck5g41dwp0jc1b59jzvg")
512 (mozilla-patch "icecat-CVE-2018-5089-pt13.patch" "66cfc3c4047d" "05j8ic4lv2d2ygr6d62rkdlfyg2rpljalwrkkhllinw2dfi3n15b")
513 (mozilla-patch "icecat-CVE-2018-5098.patch" "3236ffdf0ced" "1kvk4qyslaj1ldgs1wpxnf79zajcihzcd1zvbrg990i3hgyn3gk3")
e8e860a5 514 (mozilla-patch "icecat-bug-1424373-pt1.patch" "320032aaa068" "1ch282qibprz1q0f2imvynh4sg7gads6sf3ayhjcd62zjncpgyz7")
c23243fc 515 (search-patch "icecat-bug-1424373-pt2.patch")
c1c2e1d7
MW
516 (mozilla-patch "icecat-CVE-2018-5089-pt14.patch" "c2945f1249eb" "18p0344w6grpyfiz8dczfw977p0qy37iqv95whgnrjli2ab51kji")
517 (mozilla-patch "icecat-CVE-2018-5117-pt1.patch" "263165eacc54" "0518xnd9f4qkn7l0z73kldm9dr33y6hf054ril4f8r2j8s9fy33i")
518 (mozilla-patch "icecat-CVE-2018-5117-pt2.patch" "58e87d9cc44e" "0j9qwjm25bmhw0sj426yl4fqaa6zknf5cjk0yisdd3895652n5i4")
52009dc3
MW
519 (mozilla-patch "icecat-CVE-2018-5089-pt15.patch" "aa4b11615431" "0whfvwaj3dmk89ah2kbv7zz7a8ckqa0xajf5fl12bgl7q8c8ndnm")
520 (mozilla-patch "icecat-CVE-2018-5104.patch" "66761c5bfbe1" "076128pxc7ik1zq2v0d5m6vd7nls2030jzdc4w0ggy8hd5yyb8g9")
521 (mozilla-patch "icecat-bug-1408631.patch" "6f5c8df1925d" "1hgr18p5dwhlsan6jxlj3ay7cbfyywk40bpbnjc8gqmq6y25cn48")
522 (mozilla-patch "icecat-bug-1422735.patch" "b88ef76f5687" "0rzpxfrhddc0238rq3r1b02j95g0rdplk1fjmk85m51xvggh9086")
523 (mozilla-patch "icecat-bug-1261963.patch" "d0c98f5b6c12" "1z9jn19hnwjand9c0ifc39gq71nz17jjqy2s5fqr2z06y8qys62h")
524 (mozilla-patch "icecat-CVE-2018-5089-pt16.patch" "f7865afb1fe6" "0i7ydmcr1g0ih3myyxaxjq6wfg3rvq5j4893kjqksqihfqrkzs4j")
525 (mozilla-patch "icecat-CVE-2018-5097.patch" "9fb7614319df" "1xirahk06w8pyw4pdh64f4pg3qcb7c8x8frrmad2895fagy14g4k")
526 (mozilla-patch "icecat-mitigate-spectre.patch" "81d6465bd7c2" "1za5l249pb5x7f283vrimy0ankjzvwa99hfql3v4fm5a4grjkj9n")
527 (mozilla-patch "icecat-CVE-2018-5089-pt17.patch" "5f753161df25" "1k2mpwagz08wzxfzwy2b4a0pz0hkhdqby6n11i7pasx3ary670km")
528 (mozilla-patch "icecat-CVE-2018-5099.patch" "b95d654de120" "1cv7nz2gsyjjigw6wv4xagh8q6bcg0971md8b6xjvz5m26aynlaw")
529 (mozilla-patch "icecat-bug-1408631.patch" "3b1faddc0e5f" "0817x5mrdyjj0gc9yi19m6d78d18ypc9nbld64d2axhc8v9bz3xf")
530 (mozilla-patch "icecat-glibc-2.26.patch" "57d4fae4dffe" "1sv7kp7m4i7n31ny8k7cpjsrqpxh5y5jm27sh2cgpj7fhi5kqsj2")
531 (mozilla-patch "icecat-CVE-2018-5089-pt18.patch" "fe271a2b9503" "11wr8mdxw01dlmzkq55hf0qd52cwmx4vk96cff66d4kkl1dbj6qn")
532 (mozilla-patch "icecat-CVE-2018-5089-pt19.patch" "410da936a1e8" "14dvaysz0svlh50kdabjhd2s5avz6p93sbyqhwik5rlvcg5ax5zp")
533 (mozilla-patch "icecat-CVE-2018-5089-pt20.patch" "8368a9a379e3" "0fqq01ms7m4kb9b10n8gy5n9n4x43crz2gn1r6c4ny52wzgm3j6f")
534 (mozilla-patch "icecat-CVE-2018-5089-pt21.patch" "a7c8e85285e2" "1caa2w5r8rqb1qrk4mgf2vw1k592idvqmgs8qfz2dp2744kk6z98")))
90e1cdae
MW
535 (modules '((guix build utils)))
536 (snippet
537 '(begin
bfb48f4f 538 (use-modules (ice-9 ftw))
90e1cdae
MW
539 ;; Remove bundled libraries that we don't use, since they may
540 ;; contain unpatched security flaws, they waste disk space and
541 ;; network bandwidth, and may cause confusion.
542 (for-each delete-file-recursively
543 '(;; FIXME: Removing the bundled icu breaks configure.
544 ;; * The bundled icu headers are used in some places.
545 ;; * The version number is taken from the bundled copy.
546 ;;"intl/icu"
547 ;;
548 ;; FIXME: A script from the bundled nspr is used.
549 ;;"nsprpub"
550 ;;
551 ;; TODO: Use system media libraries. Waiting for:
552 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422>
553 ;; * libogg
554 ;; * libtheora
555 ;; * libvorbis
556 ;; * libtremor (not yet in guix)
557 ;; * libopus
558 ;; * speex
559 ;; * soundtouch (not yet in guix)
560 ;;
90e1cdae
MW
561 "modules/freetype2"
562 "modules/zlib"
563 "modules/libbz2"
564 "ipc/chromium/src/third_party/libevent"
7cba7647 565 "media/libjpeg"
90e1cdae
MW
566 "media/libvpx"
567 "security/nss"
568 "gfx/cairo"
110afdde
MW
569 "gfx/harfbuzz"
570 "gfx/graphite2"
90e1cdae
MW
571 "js/src/ctypes/libffi"
572 "db/sqlite3"))
bfb48f4f
MW
573 ;; Delete .pyc files, typically present in icecat source tarballs
574 (for-each delete-file (find-files "." "\\.pyc$"))
5bdec7d6 575 ;; Delete obj-* directories, sometimes present in icecat tarballs
bfb48f4f
MW
576 (for-each delete-file-recursively
577 (scandir "." (lambda (name)
578 (string-prefix? "obj-" name))))
a5e55dfb 579 #t))))
be0f6112
AE
580 (build-system gnu-build-system)
581 (inputs
582 `(("alsa-lib" ,alsa-lib)
1ae6df81 583 ("bzip2" ,bzip2)
5b17fabc 584 ("cairo" ,cairo)
90e1cdae 585 ("cups" ,cups)
be0f6112 586 ("dbus-glib" ,dbus-glib)
90e1cdae
MW
587 ("gdk-pixbuf" ,gdk-pixbuf)
588 ("glib" ,glib)
002c3e6d
MW
589 ("gtk+" ,gtk+)
590 ("gtk+-2" ,gtk+-2)
110afdde 591 ("graphite2" ,graphite2)
74c7af9f
MW
592 ("pango" ,pango)
593 ("freetype" ,freetype)
110afdde 594 ("harfbuzz" ,harfbuzz)
90e1cdae
MW
595 ("hunspell" ,hunspell)
596 ("libcanberra" ,libcanberra)
597 ("libgnome" ,libgnome)
7cba7647 598 ("libjpeg-turbo" ,libjpeg-turbo)
74c7af9f 599 ("libxft" ,libxft)
e8fc1a0d 600 ("libevent" ,libevent-2.0)
90e1cdae
MW
601 ("libxinerama" ,libxinerama)
602 ("libxscrnsaver" ,libxscrnsaver)
9f7ae77f 603 ("libxcomposite" ,libxcomposite)
be0f6112 604 ("libxt" ,libxt)
1ae6df81 605 ("libffi" ,libffi)
002c3e6d 606 ("ffmpeg" ,ffmpeg)
13b284d9
MW
607 ("libvpx" ,libvpx)
608 ("icu4c" ,icu4c)
609 ("pixman" ,pixman)
74c7af9f 610 ("pulseaudio" ,pulseaudio)
be0f6112 611 ("mesa" ,mesa)
90e1cdae 612 ("mit-krb5" ,mit-krb5)
5b17fabc
MW
613 ("nspr" ,nspr)
614 ("nss" ,nss)
9bc79c11 615 ("sqlite" ,sqlite)
90e1cdae 616 ("startup-notification" ,startup-notification)
be0f6112 617 ("unzip" ,unzip)
1ae6df81
LC
618 ("zip" ,zip)
619 ("zlib" ,zlib)))
c4c4cc05
JD
620 (native-inputs
621 `(("perl" ,perl)
622 ("python" ,python-2) ; Python 3 not supported
623 ("python2-pysqlite" ,python2-pysqlite)
002c3e6d 624 ("yasm" ,yasm)
bfb48f4f 625 ("pkg-config" ,pkg-config)
002c3e6d 626 ("autoconf" ,autoconf-2.13)
bfb48f4f 627 ("which" ,which)))
be0f6112 628 (arguments
74c7af9f
MW
629 `(#:tests? #f ; no check target
630 #:out-of-source? #t ; must be built outside of the source directory
73b1b4eb
LC
631
632 ;; XXX: There are RUNPATH issues such as
633 ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
634 ;; which is not in its RUNPATH, but they appear to be harmless in
635 ;; practice somehow. See <http://hydra.gnu.org/build/378133>.
636 #:validate-runpath? #f
637
002c3e6d 638 #:configure-flags '("--enable-default-toolkit=cairo-gtk3"
90e1cdae 639 "--enable-gio"
90e1cdae
MW
640 "--enable-startup-notification"
641 "--enable-pulseaudio"
90e1cdae 642
90e1cdae
MW
643 "--disable-gconf"
644 "--disable-gnomeui"
645
646 ;; Building with debugging symbols takes ~5GiB, so
1ae6df81
LC
647 ;; disable it.
648 "--disable-debug"
649 "--disable-debug-symbols"
650
5bdec7d6
MW
651 ;; Hack to work around missing
652 ;; "unofficial" branding in icecat.
bfb48f4f
MW
653 "--enable-official-branding"
654
90e1cdae 655 ;; Avoid bundled libraries.
1ae6df81 656 "--with-system-zlib"
90e1cdae 657 "--with-system-bz2"
7cba7647 658 "--with-system-jpeg" ; must be libjpeg-turbo
1ae6df81 659 "--with-system-libevent"
13b284d9 660 "--with-system-libvpx"
483ab08f 661 "--with-system-icu"
5b17fabc
MW
662 "--with-system-nspr"
663 "--with-system-nss"
110afdde
MW
664 "--with-system-harfbuzz"
665 "--with-system-graphite2"
13b284d9 666 "--enable-system-pixman"
5b17fabc
MW
667 "--enable-system-cairo"
668 "--enable-system-ffi"
90e1cdae 669 "--enable-system-hunspell"
9128e323 670 "--enable-system-sqlite"
1ae6df81 671
98a046cd
AE
672 ;; Fails with "--with-system-png won't work because
673 ;; the system's libpng doesn't have APNG support".
674 ;; According to
675 ;; http://sourceforge.net/projects/libpng-apng/ ,
676 ;; "the Animated Portable Network Graphics (APNG)
677 ;; is an unofficial extension of the Portable
678 ;; Network Graphics (PNG) format";
679 ;; we probably do not wish to support it.
1ae6df81 680 ;; "--with-system-png"
5b17fabc 681 )
1ae6df81 682
9f7ae77f 683 #:modules ((ice-9 ftw)
6cde5c34
LC
684 (ice-9 rdelim)
685 (ice-9 match)
9f7ae77f 686 ,@%gnu-build-system-modules)
be0f6112 687 #:phases
90e1cdae 688 (modify-phases %standard-phases
9f7ae77f
MW
689 (add-after
690 'unpack 'ensure-no-mtimes-pre-1980
691 (lambda _
692 ;; Without this, the 'source/test/addons/packed.xpi' and
693 ;; 'source/test/addons/simple-prefs.xpi' targets fail while trying
694 ;; to create zip archives.
695 (let ((early-1980 315619200)) ; 1980-01-02 UTC
696 (ftw "." (lambda (file stat flag)
697 (unless (<= early-1980 (stat:mtime stat))
698 (utime file early-1980 early-1980))
699 #t))
700 #t)))
2abf6371
MW
701 (add-after
702 'unpack 'use-skia-by-default
703 (lambda _
704 ;; Use the bundled Skia library by default, since IceCat appears
705 ;; to be far more stable when using it than when using our system
706 ;; Cairo.
707 (let ((out (open "browser/app/profile/icecat.js"
708 (logior O_WRONLY O_APPEND))))
709 (format out "~%// Use Skia by default~%")
710 (format out "pref(~s, ~s);~%" "gfx.canvas.azure.backends" "skia")
711 (format out "pref(~s, ~s);~%" "gfx.content.azure.backends" "skia")
712 (close-port out))
713 #t))
90e1cdae
MW
714 (add-after
715 'unpack 'arrange-to-link-libxul-with-libraries-it-might-dlopen
716 (lambda _
717 ;; libxul.so dynamically opens libraries, so here we explicitly
718 ;; link them into libxul.so instead.
719 ;;
720 ;; TODO: It might be preferable to patch in absolute file names in
721 ;; calls to dlopen or PR_LoadLibrary, but that didn't seem to
722 ;; work. More investigation is needed.
9f7ae77f 723 (substitute* "toolkit/library/moz.build"
002c3e6d
MW
724 (("^# This library needs to be last" all)
725 (string-append "OS_LIBS += [
9f7ae77f 726 'GL', 'gnome-2', 'canberra', 'Xss', 'cups', 'gssapi_krb5',
002c3e6d
MW
727 'avcodec', 'avutil', 'pulse' ]\n\n"
728 all)))
9f7ae77f 729 #t))
90e1cdae
MW
730 (replace
731 'configure
732 ;; configure does not work followed by both "SHELL=..." and
733 ;; "CONFIG_SHELL=..."; set environment variables instead
734 (lambda* (#:key outputs configure-flags #:allow-other-keys)
735 (let* ((out (assoc-ref outputs "out"))
736 (bash (which "bash"))
737 (abs-srcdir (getcwd))
738 (srcdir (string-append "../" (basename abs-srcdir)))
739 (flags `(,(string-append "--prefix=" out)
740 ,(string-append "--with-l10n-base="
741 abs-srcdir "/l10n")
742 ,@configure-flags)))
743 (setenv "SHELL" bash)
744 (setenv "CONFIG_SHELL" bash)
002c3e6d 745 (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13
90e1cdae
MW
746 (mkdir "../build")
747 (chdir "../build")
748 (format #t "build directory: ~s~%" (getcwd))
749 (format #t "configure flags: ~s~%" flags)
750 (zero? (apply system* bash
751 (string-append srcdir "/configure")
6cde5c34
LC
752 flags)))))
753 (add-before 'configure 'install-desktop-entry
754 (lambda* (#:key outputs #:allow-other-keys)
755 ;; Install the '.desktop' file.
756 (define (swallow-%%-directives input output)
757 ;; Interpret '%%ifdef' directives found in the '.desktop' file.
758 (let loop ((state 'top))
759 (match (read-line input 'concat)
760 ((? eof-object?)
761 #t)
762 ((? string? line)
763 (cond ((string-prefix? "%%ifdef" line)
764 (loop 'ifdef))
765 ((string-prefix? "%%else" line)
766 (loop 'else))
767 ((string-prefix? "%%endif" line)
768 (loop 'top))
769 (else
770 (case state
771 ((top else)
772 (display line output)
773 (loop state))
774 (else
775 (loop state)))))))))
776
777 (let* ((out (assoc-ref outputs "out"))
778 (applications (string-append out "/share/applications")))
779 (call-with-input-file "debian/icecat.desktop.in"
780 (lambda (input)
781 (call-with-output-file "debian/icecat.desktop"
782 (lambda (output)
783 (swallow-%%-directives input output)))))
784
785 (substitute* "debian/icecat.desktop"
786 (("@MOZ_DISPLAY_NAME@")
787 "GNU IceCat")
788 (("^Exec=@MOZ_APP_NAME@")
789 (string-append "Exec=" out "/bin/icecat"))
790 (("@MOZ_APP_NAME@")
791 "icecat"))
792 (install-file "debian/icecat.desktop" applications)
88a8ce87
AG
793 #t)))
794 (add-after 'install-desktop-entry 'install-icons
795 (lambda* (#:key outputs #:allow-other-keys)
796 (let ((out (assoc-ref outputs "out")))
797 (with-directory-excursion "browser/branding/official"
798 (for-each
799 (lambda (file)
800 (let* ((size (string-filter char-numeric? file))
801 (icons (string-append out "/share/icons/hicolor/"
802 size "x" size "/apps")))
803 (mkdir-p icons)
804 (copy-file file (string-append icons "/icecat.png"))))
805 '("default16.png" "default22.png" "default24.png"
806 "default32.png" "default48.png" "content/icon64.png"
6e75740f
CL
807 "mozicon128.png" "default256.png"))))))
808 ;; This fixes the file chooser crash that happens with GTK 3.
809 (add-after 'install 'wrap-program
810 (lambda* (#:key inputs outputs #:allow-other-keys)
811 (let* ((out (assoc-ref outputs "out"))
812 (lib (string-append out "/lib"))
813 (gtk (assoc-ref inputs "gtk+"))
814 (gtk-share (string-append gtk "/share")))
815 (wrap-program (car (find-files lib "^icecat$"))
816 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))))
6fd52309 817 (home-page "https://www.gnu.org/software/gnuzilla/")
be0f6112
AE
818 (synopsis "Entirely free browser derived from Mozilla Firefox")
819 (description
820 "IceCat is the GNU version of the Firefox browser. It is entirely free
c5779c93 821software, which does not recommend non-free plugins and addons. It also
79c311b8 822features built-in privacy-protecting features.")
63e8bb12 823 (license license:mpl2.0) ;and others, see toolkit/content/license.html
99effc8f
LC
824 (properties
825 `((ftp-directory . "/gnu/gnuzilla")
826 (cpe-name . "firefox_esr")
bfb48f4f 827 (cpe-version . ,(first (string-split version #\-)))))))