Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / w3m.scm
CommitLineData
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))
1dba6407 21 #:use-module (gnu packages gettext)
bd5ecea6
NK
22 #:use-module (gnu packages bdw-gc)
23 #:use-module (gnu packages compression)
24 #:use-module (gnu packages ncurses)
25 #:use-module (gnu packages openssl)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages pkg-config)
28 #:use-module (gnu packages)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu))
32
33(define-public w3m
34 (package
35 (name "w3m")
36 (version "0.5.3")
01eafd38
LC
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "mirror://sourceforge/w3m/w3m-"
40 version ".tar.gz"))
41 (sha256
42 (base32
43 "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579"))
44
45 ;; cf. https://bugs.archlinux.org/task/33397
46 (patches (list (search-patch "w3m-fix-compile.patch")))
47 (patch-flags '("-p0"))))
bd5ecea6
NK
48 (build-system gnu-build-system)
49 (arguments `(#:tests? #f ; no check target
50 #:phases (alist-cons-before
51 'configure 'fix-perl
52 (lambda _
53 ;; https://launchpad.net/bugs/935540
54 ;; 'struct file_handle' is used by 'glibc'
55 (substitute* '("istream.c" "istream.h")
56 (("struct[[:blank:]]+file_handle")
57 "struct w3m_file_handle"))
58 (substitute* '("scripts/w3mmail.cgi.in"
59 "scripts/dirlist.cgi.in")
60 (("@PERL@") (which "perl"))))
01eafd38 61 %standard-phases)))
bd5ecea6 62 (inputs
c4c4cc05 63 `(("libgc" ,libgc)
bd5ecea6
NK
64 ("ncurses" ,ncurses)
65 ("openssl" ,openssl)
01eafd38 66 ("zlib" ,zlib)))
c4c4cc05
JD
67 (native-inputs
68 `(("gettext" ,gnu-gettext)
69 ("perl" ,perl)
70 ("pkg-config" ,pkg-config)))
bd5ecea6
NK
71 (home-page "http://w3m.sourceforge.net/")
72 (synopsis "w3m, a text-mode web browser")
73 (description
74 "w3m is a text-based web browser as well as a pager like 'more' or
75'less'. With w3m you can browse web pages through a terminal emulator
76window. Moreover, w3m can be used as a text formatting tool which
77typesets HTML into plain text.")
78 (license (x11-style "file://doc/README"
79 "See 'doc/README' in the distribution."))))