diff options
author | Nikita Karetnikov <nikita@karetnikov.org> | 2013-03-04 01:34:13 +0000 |
---|---|---|
committer | Nikita Karetnikov <nikita@karetnikov.org> | 2013-03-06 20:52:04 +0000 |
commit | bd5ecea63754b2dbc0c142ae11d9d11716fd703a (patch) | |
tree | 6120d4233b34c26fab8565a9beb5e0854879ff74 /gnu/packages | |
parent | bbd60260dd3f40398a1da7d3beabc29ac02976fb (diff) | |
download | guix-bd5ecea63754b2dbc0c142ae11d9d11716fd703a.tar guix-bd5ecea63754b2dbc0c142ae11d9d11716fd703a.tar.gz |
gnu: Add w3m.
* gnu/packages/w3m.scm,
gnu/packages/patches/w3m-fix-compile.patch: New files.
* Makefile.am (MODULES): Add 'w3m.scm'.
(dist_patch_DATA): Add 'w3m-fix-compile.patch'.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/patches/w3m-fix-compile.patch | 15 | ||||
-rw-r--r-- | gnu/packages/w3m.scm | 81 |
2 files changed, 96 insertions, 0 deletions
diff --git a/gnu/packages/patches/w3m-fix-compile.patch b/gnu/packages/patches/w3m-fix-compile.patch new file mode 100644 index 0000000000..5604052f67 --- /dev/null +++ b/gnu/packages/patches/w3m-fix-compile.patch @@ -0,0 +1,15 @@ +https://bugs.archlinux.org/task/33397 + +diff -aur old/main.c new/main.c +--- main.c 2013-01-14 18:16:14.216210053 -0600 ++++ main.c 2013-01-14 18:17:28.816220559 -0600 +@@ -833,7 +833,8 @@ + mySignal(SIGPIPE, SigPipe); + #endif + +- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); ++ orig_GC_warn_proc = GC_get_warn_proc(); ++ GC_set_warn_proc(wrap_GC_warn_proc); + err_msg = Strnew(); + if (load_argc == 0) { + /* no URL specified */ diff --git a/gnu/packages/w3m.scm b/gnu/packages/w3m.scm new file mode 100644 index 0000000000..9199cbd488 --- /dev/null +++ b/gnu/packages/w3m.scm @@ -0,0 +1,81 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages w3m) + #:use-module ((guix licenses) #:select (x11-style)) + #:use-module ((gnu packages gettext) + #:renamer (symbol-prefix-proc 'guix:)) + #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages compression) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages openssl) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public w3m + (package + (name "w3m") + (version "0.5.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/w3m/w3m-" + version ".tar.gz")) + (sha256 + (base32 + "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")))) + (build-system gnu-build-system) + (arguments `(#:tests? #f ; no check target + #:phases (alist-cons-before + 'configure 'fix-perl + (lambda _ + ;; https://launchpad.net/bugs/935540 + ;; 'struct file_handle' is used by 'glibc' + (substitute* '("istream.c" "istream.h") + (("struct[[:blank:]]+file_handle") + "struct w3m_file_handle")) + (substitute* '("scripts/w3mmail.cgi.in" + "scripts/dirlist.cgi.in") + (("@PERL@") (which "perl")))) + %standard-phases) + ;; cf. https://bugs.archlinux.org/task/33397 + #:patches (list (assoc-ref %build-inputs + "patch/fix-compile")) + #:patch-flags '("-p0"))) + (inputs + `(("gettext" ,guix:gettext) + ("libgc" ,libgc) + ("ncurses" ,ncurses) + ("openssl" ,openssl) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("zlib" ,zlib) + ("patch/fix-compile" ,(search-patch "w3m-fix-compile.patch")))) + (home-page "http://w3m.sourceforge.net/") + (synopsis "w3m, a text-mode web browser") + (description + "w3m is a text-based web browser as well as a pager like 'more' or +'less'. With w3m you can browse web pages through a terminal emulator +window. Moreover, w3m can be used as a text formatting tool which +typesets HTML into plain text.") + (license (x11-style "file://doc/README" + "See 'doc/README' in the distribution.")))) |