Commit | Line | Data |
---|---|---|
bd5ecea6 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
e6352001 | 3 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
bd5ecea6 NK |
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 w3m) | |
21 | #:use-module ((guix licenses) #:select (x11-style)) | |
1dba6407 | 22 | #:use-module (gnu packages gettext) |
bd5ecea6 NK |
23 | #:use-module (gnu packages bdw-gc) |
24 | #:use-module (gnu packages compression) | |
25 | #:use-module (gnu packages ncurses) | |
bd5ecea6 NK |
26 | #:use-module (gnu packages perl) |
27 | #:use-module (gnu packages pkg-config) | |
cc2b77df | 28 | #:use-module (gnu packages tls) |
bd5ecea6 NK |
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") | |
01eafd38 LC |
38 | (source (origin |
39 | (method url-fetch) | |
40 | (uri (string-append "mirror://sourceforge/w3m/w3m-" | |
41 | version ".tar.gz")) | |
42 | (sha256 | |
43 | (base32 | |
44 | "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")) | |
45 | ||
46 | ;; cf. https://bugs.archlinux.org/task/33397 | |
fc1adab1 AK |
47 | (patches (search-patches "w3m-libgc.patch" |
48 | "w3m-force-ssl_verify_server-on.patch" | |
49 | "w3m-disable-sslv2-and-sslv3.patch" | |
50 | "w3m-disable-weak-ciphers.patch")))) | |
bd5ecea6 NK |
51 | (build-system gnu-build-system) |
52 | (arguments `(#:tests? #f ; no check target | |
53 | #:phases (alist-cons-before | |
54 | 'configure 'fix-perl | |
55 | (lambda _ | |
56 | ;; https://launchpad.net/bugs/935540 | |
57 | ;; 'struct file_handle' is used by 'glibc' | |
58 | (substitute* '("istream.c" "istream.h") | |
59 | (("struct[[:blank:]]+file_handle") | |
60 | "struct w3m_file_handle")) | |
61 | (substitute* '("scripts/w3mmail.cgi.in" | |
62 | "scripts/dirlist.cgi.in") | |
63 | (("@PERL@") (which "perl")))) | |
01eafd38 | 64 | %standard-phases))) |
bd5ecea6 | 65 | (inputs |
c4c4cc05 | 66 | `(("libgc" ,libgc) |
bd5ecea6 NK |
67 | ("ncurses" ,ncurses) |
68 | ("openssl" ,openssl) | |
01eafd38 | 69 | ("zlib" ,zlib))) |
c4c4cc05 JD |
70 | (native-inputs |
71 | `(("gettext" ,gnu-gettext) | |
72 | ("perl" ,perl) | |
73 | ("pkg-config" ,pkg-config))) | |
bd5ecea6 | 74 | (home-page "http://w3m.sourceforge.net/") |
35b9e423 | 75 | (synopsis "Text-mode web browser") |
bd5ecea6 NK |
76 | (description |
77 | "w3m is a text-based web browser as well as a pager like 'more' or | |
78 | 'less'. With w3m you can browse web pages through a terminal emulator | |
79 | window. Moreover, w3m can be used as a text formatting tool which | |
80 | typesets HTML into plain text.") | |
81 | (license (x11-style "file://doc/README" | |
82 | "See 'doc/README' in the distribution.")))) |