Commit | Line | Data |
---|---|---|
bd5ecea6 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
7 | ;;; under the terms of the GNU General Public License as published by | |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | (define-module (gnu packages w3m) | |
20 | #:use-module ((guix licenses) #:select (x11-style)) | |
21 | #:use-module ((gnu packages gettext) | |
22 | #:renamer (symbol-prefix-proc 'guix:)) | |
23 | #:use-module (gnu packages bdw-gc) | |
24 | #:use-module (gnu packages compression) | |
25 | #:use-module (gnu packages ncurses) | |
26 | #:use-module (gnu packages openssl) | |
27 | #:use-module (gnu packages perl) | |
28 | #:use-module (gnu packages pkg-config) | |
29 | #:use-module (gnu packages) | |
30 | #:use-module (guix packages) | |
31 | #:use-module (guix download) | |
32 | #:use-module (guix build-system gnu)) | |
33 | ||
34 | (define-public w3m | |
35 | (package | |
36 | (name "w3m") | |
37 | (version "0.5.3") | |
38 | (source | |
39 | (origin | |
40 | (method url-fetch) | |
41 | (uri (string-append "mirror://sourceforge/w3m/w3m-" | |
42 | version ".tar.gz")) | |
43 | (sha256 | |
44 | (base32 | |
45 | "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")))) | |
46 | (build-system gnu-build-system) | |
47 | (arguments `(#:tests? #f ; no check target | |
48 | #:phases (alist-cons-before | |
49 | 'configure 'fix-perl | |
50 | (lambda _ | |
51 | ;; https://launchpad.net/bugs/935540 | |
52 | ;; 'struct file_handle' is used by 'glibc' | |
53 | (substitute* '("istream.c" "istream.h") | |
54 | (("struct[[:blank:]]+file_handle") | |
55 | "struct w3m_file_handle")) | |
56 | (substitute* '("scripts/w3mmail.cgi.in" | |
57 | "scripts/dirlist.cgi.in") | |
58 | (("@PERL@") (which "perl")))) | |
59 | %standard-phases) | |
60 | ;; cf. https://bugs.archlinux.org/task/33397 | |
61 | #:patches (list (assoc-ref %build-inputs | |
62 | "patch/fix-compile")) | |
63 | #:patch-flags '("-p0"))) | |
64 | (inputs | |
65 | `(("gettext" ,guix:gettext) | |
66 | ("libgc" ,libgc) | |
67 | ("ncurses" ,ncurses) | |
68 | ("openssl" ,openssl) | |
69 | ("perl" ,perl) | |
70 | ("pkg-config" ,pkg-config) | |
71 | ("zlib" ,zlib) | |
72 | ("patch/fix-compile" ,(search-patch "w3m-fix-compile.patch")))) | |
73 | (home-page "http://w3m.sourceforge.net/") | |
74 | (synopsis "w3m, a text-mode web browser") | |
75 | (description | |
76 | "w3m is a text-based web browser as well as a pager like 'more' or | |
77 | 'less'. With w3m you can browse web pages through a terminal emulator | |
78 | window. Moreover, w3m can be used as a text formatting tool which | |
79 | typesets HTML into plain text.") | |
80 | (license (x11-style "file://doc/README" | |
81 | "See 'doc/README' in the distribution.")))) |