Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / links.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
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 links)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages pkg-config)
26 #:use-module (gnu packages image)
27 #:use-module (gnu packages libevent)
28 #:use-module (gnu packages tls)
29 #:use-module (gnu packages xorg)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu))
32
33 (define-public links
34 (package
35 (name "links")
36 (version "2.12")
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "http://links.twibright.com/download/"
40 name "-" version ".tar.bz2"))
41 (sha256
42 (base32 "0knq15yrp60s4jh92aacw8yfc2pcv3bqsw7dba7h5s6ivq8ihhcq"))))
43 (build-system gnu-build-system)
44 (arguments
45 `(#:phases (alist-replace
46 'configure
47 (lambda* (#:key outputs #:allow-other-keys)
48 ;; The tarball uses a very old version of autconf. It doesn't
49 ;; understand extra flags like `--enable-fast-install', so
50 ;; we need to invoke it with just what it understands.
51 (let ((out (assoc-ref outputs "out")))
52 ;; 'configure' doesn't understand '--host'.
53 ,@(if (%current-target-system)
54 `((setenv "CHOST" ,(%current-target-system)))
55 '())
56 (setenv "CONFIG_SHELL" (which "bash"))
57 (zero?
58 (system* "./configure"
59 (string-append "--prefix=" out)
60 "--enable-graphics"))))
61 %standard-phases)))
62 (native-inputs `(("pkg-config" ,pkg-config)))
63 (inputs `(("zlib" ,zlib)
64 ("openssl" ,openssl)
65 ("libjpeg" ,libjpeg)
66 ("libtiff" ,libtiff)
67 ("libevent" ,libevent)
68 ("libpng" ,libpng)
69 ("libxt" ,libxt)))
70 (synopsis "Text and graphics mode web browser")
71 (description "Links is a graphics and text mode web browser, with many
72 features including, tables, builtin image display, bookmarks, SSL and more.")
73 (home-page "http://links.twibright.com")
74 ;; The distribution contains a copy of GPLv2
75 ;; However, the copyright notices simply say:
76 ;; "This file is a part of the Links program, released under GPL."
77 ;; Therefore, under the provisions of Section 9, we can choose
78 ;; any version ever published by the FSF.
79 ;; One file (https.c) contains an exception permitting
80 ;; linking of the program with openssl.
81 (license license:gpl1+)))