You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
3.3 KiB

  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. (define-module (gnu packages w3m)
  19. #:use-module ((guix licenses) #:select (x11-style))
  20. #:use-module ((gnu packages gettext)
  21. #:renamer (symbol-prefix-proc 'guix:))
  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. (define-public w3m
  33. (package
  34. (name "w3m")
  35. (version "0.5.3")
  36. (source (origin
  37. (method url-fetch)
  38. (uri (string-append "mirror://sourceforge/w3m/w3m-"
  39. version ".tar.gz"))
  40. (sha256
  41. (base32
  42. "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579"))
  43. ;; cf. https://bugs.archlinux.org/task/33397
  44. (patches (list (search-patch "w3m-fix-compile.patch")))
  45. (patch-flags '("-p0"))))
  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. (inputs
  61. `(("gettext" ,guix:gettext)
  62. ("libgc" ,libgc)
  63. ("ncurses" ,ncurses)
  64. ("openssl" ,openssl)
  65. ("perl" ,perl)
  66. ("pkg-config" ,pkg-config)
  67. ("zlib" ,zlib)))
  68. (home-page "http://w3m.sourceforge.net/")
  69. (synopsis "w3m, a text-mode web browser")
  70. (description
  71. "w3m is a text-based web browser as well as a pager like 'more' or
  72. 'less'. With w3m you can browse web pages through a terminal emulator
  73. window. Moreover, w3m can be used as a text formatting tool which
  74. typesets HTML into plain text.")
  75. (license (x11-style "file://doc/README"
  76. "See 'doc/README' in the distribution."))))