gnu: icecat: Remove duplicated line.
[jackhill/guix/guix.git] / gnu / packages / gnuzilla.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages gnuzilla)
21 #:use-module (gnu packages)
22 #:use-module ((guix licenses)
23 #:renamer (symbol-prefix-proc 'license:))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages glib)
28 #:use-module (gnu packages gstreamer)
29 #:use-module (gnu packages gtk)
30 #:use-module (gnu packages linux)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages libevent)
35 #:use-module (gnu packages libjpeg)
36 #:use-module (gnu packages libpng)
37 #:use-module (gnu packages libffi)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages xorg)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages yasm)
42 #:use-module (gnu packages zip))
43
44 (define-public icecat
45 (package
46 (name "icecat")
47 (version "24.0")
48 (source
49 (origin
50 (method url-fetch)
51 (uri (string-append "mirror://gnu/gnuzilla/"
52 (substring version 0 (string-index version #\.))
53 "/icecat-" version ".tar.gz"))
54 (sha256
55 (base32
56 "1vxzjwmhad6yxx4sk9zvapjgv5salcv10id061q0991ii3dycy9a"))))
57 (build-system gnu-build-system)
58 (inputs
59 `(("alsa-lib" ,alsa-lib)
60 ("bzip2" ,bzip2)
61 ("dbus" ,dbus)
62 ("dbus-glib" ,dbus-glib)
63 ("glib" ,glib)
64 ("gstreamer" ,gstreamer-0.10)
65 ("gst-plugins-base" ,gst-plugins-base-0.10)
66 ("gtk+" ,gtk+-2)
67 ("libevent" ,libevent)
68 ("libxt" ,libxt)
69 ("libffi" ,libffi)
70 ("mesa" ,mesa)
71 ("unzip" ,unzip)
72 ("yasm" ,yasm)
73 ("zip" ,zip)
74 ("zlib" ,zlib)))
75 (native-inputs
76 `(("perl" ,perl)
77 ("python" ,python-2) ; Python 3 not supported
78 ("python2-pysqlite" ,python2-pysqlite)
79 ("pkg-config" ,pkg-config)))
80 (arguments
81 `(#:tests? #f ; no check target
82
83 #:configure-flags '(;; Building with debugging symbols takes ~5GiB, so
84 ;; disable it.
85 "--disable-debug"
86 "--disable-debug-symbols"
87
88 "--disable-webrtc" ; webrtc fails to build
89
90 "--with-system-zlib"
91 "--with-system-bz2" ; FIXME: not used
92 "--with-system-libevent"
93
94 ;; Fails with "--with-system-png won't work because
95 ;; the system's libpng doesn't have APNG support".
96 ;; According to
97 ;; http://sourceforge.net/projects/libpng-apng/ ,
98 ;; "the Animated Portable Network Graphics (APNG)
99 ;; is an unofficial extension of the Portable
100 ;; Network Graphics (PNG) format";
101 ;; we probably do not wish to support it.
102 ;; "--with-system-png"
103
104 ;; Fails with "libjpeg-turbo JCS_EXTENSIONS
105 ;; required".
106 ;; According to
107 ;; http://sourceforge.net/projects/libjpeg-turbo/ ,
108 ;; "libjpeg-turbo is a derivative of libjpeg that
109 ;; uses MMX, SSE, SSE2, and NEON SIMD instructions
110 ;; to accelerate baseline JPEG compression/
111 ;; decompression", so we had better not use it
112 ;; "--with-system-jpeg"
113
114 "--enable-system-ffi")
115
116 #:phases
117 (alist-cons-before
118 'patch-source-shebangs 'sanitise
119 (lambda _
120 ;; delete dangling symlinks
121 (delete-file "browser/base/content/.#aboutDialog.xul")
122 (delete-file "browser/base/content/abouthome/.#aboutHome.xhtml")
123 (delete-file "browser/branding/unofficial/content/.#aboutHome.xhtml")
124 (delete-file "toolkit/crashreporter/google-breakpad/autotools/compile"))
125 (alist-replace
126 'configure
127 ;; configure does not work followed by both "SHELL=..." and
128 ;; "CONFIG_SHELL=..."; set environment variables instead
129 (lambda* (#:key outputs configure-flags #:allow-other-keys)
130 (let ((out (assoc-ref outputs "out")))
131 (setenv "SHELL" (which "bash"))
132 (setenv "CONFIG_SHELL" (which "bash"))
133 (zero? (apply system* "./configure"
134 (string-append "--prefix=" out)
135 configure-flags))))
136 %standard-phases))))
137 (home-page "http://www.gnu.org/software/gnuzilla/")
138 (synopsis "Entirely free browser derived from Mozilla Firefox")
139 (description
140 "IceCat is the GNU version of the Firefox browser. It is entirely free
141 software, which does not recommend non-free plugins and addons. It also
142 features built-in privacy-protecting features.")
143 (license license:mpl2.0))) ; and others, see toolkit/content/license.html