Commit | Line | Data |
---|---|---|
be0f6112 AE |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> | |
1ae6df81 | 3 | ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> |
be0f6112 AE |
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) | |
1ae6df81 LC |
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) | |
be0f6112 AE |
38 | #:use-module (gnu packages python) |
39 | #:use-module (gnu packages xorg) | |
40 | #:use-module (gnu packages yasm) | |
41 | #:use-module (gnu packages zip)) | |
42 | ||
43 | (define-public icecat | |
44 | (package | |
45 | (name "icecat") | |
46 | (version "24.0") | |
47 | (source | |
48 | (origin | |
49 | (method url-fetch) | |
50 | (uri (string-append "mirror://gnu/gnuzilla/" | |
51 | (substring version 0 (string-index version #\.)) | |
52 | "/icecat-" version ".tar.gz")) | |
53 | (sha256 | |
54 | (base32 | |
55 | "1vxzjwmhad6yxx4sk9zvapjgv5salcv10id061q0991ii3dycy9a")))) | |
56 | (build-system gnu-build-system) | |
1ae6df81 LC |
57 | (native-inputs |
58 | `(("pkg-config" ,pkg-config))) | |
be0f6112 AE |
59 | (inputs |
60 | `(("alsa-lib" ,alsa-lib) | |
1ae6df81 | 61 | ("bzip2" ,bzip2) |
be0f6112 AE |
62 | ("dbus" ,dbus) |
63 | ("dbus-glib" ,dbus-glib) | |
64 | ("glib" ,glib) | |
65 | ("gstreamer" ,gstreamer-0.10) | |
66 | ("gst-plugins-base" ,gst-plugins-base-0.10) | |
67 | ("gtk+" ,gtk+-2) | |
1ae6df81 | 68 | ("libevent" ,libevent) |
be0f6112 | 69 | ("libxt" ,libxt) |
1ae6df81 | 70 | ("libffi" ,libffi) |
be0f6112 | 71 | ("mesa" ,mesa) |
be0f6112 AE |
72 | ("unzip" ,unzip) |
73 | ("yasm" ,yasm) | |
1ae6df81 LC |
74 | ("zip" ,zip) |
75 | ("zlib" ,zlib))) | |
c4c4cc05 JD |
76 | (native-inputs |
77 | `(("perl" ,perl) | |
78 | ("python" ,python-2) ; Python 3 not supported | |
79 | ("python2-pysqlite" ,python2-pysqlite) | |
80 | ("pkg-config" ,pkg-config) | |
81 | ("python" ,python-2))) ; Python 3 not supported | |
be0f6112 AE |
82 | (arguments |
83 | `(#:tests? #f ; no check target | |
1ae6df81 LC |
84 | |
85 | #:configure-flags '(;; Building with debugging symbols takes ~5GiB, so | |
86 | ;; disable it. | |
87 | "--disable-debug" | |
88 | "--disable-debug-symbols" | |
89 | ||
90 | "--disable-webrtc" ; webrtc fails to build | |
91 | ||
92 | "--with-system-zlib" | |
93 | "--with-system-bz2" ; FIXME: not used | |
94 | "--with-system-libevent" | |
95 | ||
98a046cd AE |
96 | ;; Fails with "--with-system-png won't work because |
97 | ;; the system's libpng doesn't have APNG support". | |
98 | ;; According to | |
99 | ;; http://sourceforge.net/projects/libpng-apng/ , | |
100 | ;; "the Animated Portable Network Graphics (APNG) | |
101 | ;; is an unofficial extension of the Portable | |
102 | ;; Network Graphics (PNG) format"; | |
103 | ;; we probably do not wish to support it. | |
1ae6df81 LC |
104 | ;; "--with-system-png" |
105 | ||
98a046cd AE |
106 | ;; Fails with "libjpeg-turbo JCS_EXTENSIONS |
107 | ;; required". | |
108 | ;; According to | |
109 | ;; http://sourceforge.net/projects/libjpeg-turbo/ , | |
110 | ;; "libjpeg-turbo is a derivative of libjpeg that | |
111 | ;; uses MMX, SSE, SSE2, and NEON SIMD instructions | |
112 | ;; to accelerate baseline JPEG compression/ | |
113 | ;; decompression", so we had better not use it | |
1ae6df81 LC |
114 | ;; "--with-system-jpeg" |
115 | ||
116 | "--enable-system-ffi") | |
117 | ||
be0f6112 AE |
118 | #:phases |
119 | (alist-cons-before | |
120 | 'patch-source-shebangs 'sanitise | |
121 | (lambda _ | |
122 | ;; delete dangling symlinks | |
123 | (delete-file "browser/base/content/.#aboutDialog.xul") | |
124 | (delete-file "browser/base/content/abouthome/.#aboutHome.xhtml") | |
125 | (delete-file "browser/branding/unofficial/content/.#aboutHome.xhtml") | |
126 | (delete-file "toolkit/crashreporter/google-breakpad/autotools/compile")) | |
127 | (alist-replace | |
128 | 'configure | |
129 | ;; configure does not work followed by both "SHELL=..." and | |
130 | ;; "CONFIG_SHELL=..."; set environment variables instead | |
131 | (lambda* (#:key outputs configure-flags #:allow-other-keys) | |
132 | (let ((out (assoc-ref outputs "out"))) | |
133 | (setenv "SHELL" (which "bash")) | |
134 | (setenv "CONFIG_SHELL" (which "bash")) | |
1ae6df81 LC |
135 | (zero? (apply system* "./configure" |
136 | (string-append "--prefix=" out) | |
137 | configure-flags)))) | |
be0f6112 AE |
138 | %standard-phases)))) |
139 | (home-page "http://www.gnu.org/software/gnuzilla/") | |
140 | (synopsis "Entirely free browser derived from Mozilla Firefox") | |
141 | (description | |
142 | "IceCat is the GNU version of the Firefox browser. It is entirely free | |
143 | software, which does not recommend non-free plugins and addons. It also | |
79c311b8 | 144 | features built-in privacy-protecting features.") |
be0f6112 | 145 | (license license:mpl2.0))) ; and others, see toolkit/content/license.html |