| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014 John Darrington <jmd@gnu.org> |
| 3 | ;;; Copyright © 2015, 2016 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.14") |
| 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 "1f24y83wa1vzzjq5kp857gjqdpnmf8pb29yw7fam0m8wxxw0c3gp")))) |
| 43 | (build-system gnu-build-system) |
| 44 | (arguments |
| 45 | `(#:phases |
| 46 | (modify-phases %standard-phases |
| 47 | (replace 'configure |
| 48 | (lambda* (#:key outputs #:allow-other-keys) |
| 49 | ;; The tarball uses a very old version of autconf. It doesn't |
| 50 | ;; understand extra flags like `--enable-fast-install', so |
| 51 | ;; we need to invoke it with just what it understands. |
| 52 | (let ((out (assoc-ref outputs "out"))) |
| 53 | ;; 'configure' doesn't understand '--host'. |
| 54 | ,@(if (%current-target-system) |
| 55 | `((setenv "CHOST" ,(%current-target-system))) |
| 56 | '()) |
| 57 | (setenv "CONFIG_SHELL" (which "bash")) |
| 58 | (zero? |
| 59 | (system* "./configure" |
| 60 | (string-append "--prefix=" out) |
| 61 | "--enable-graphics")))))))) |
| 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+))) |