From: Nikita Karetnikov <nikita@karetnikov.org>
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: bug-guix@gnu.org
Subject: [PATCH] gnu: Add w3m. (was: w3m: 'license'; error: redefinition of 'struct file_handle')
Date: Mon, 04 Mar 2013 09:34:18 +0400 [thread overview]
Message-ID: <87vc97zq1x.fsf_-_@karetnikov.org> (raw)
In-Reply-To: <5133D518.6000902@gmail.com> (Cyril Roelandt's message of "Sun, 03 Mar 2013 23:56:24 +0100")
[-- Attachment #1.1: Type: text/plain, Size: 150 bytes --]
> This is a known issue: https://bugs.archlinux.org/task/33397 . The
> attached files make w3m buildable.
Thanks.
Can I push the attached patches?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-licenses-Add-x11-style.patch --]
[-- Type: text/x-diff, Size: 1385 bytes --]
From a64f68c566760503ad46660e9a5e3de7b3a61c7a Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Mon, 4 Mar 2013 01:08:24 +0000
Subject: [PATCH] licenses: Add 'x11-style'.
* guix/licenses.scm (x11-style): New variable.
---
guix/licenses.scm | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/guix/licenses.scm b/guix/licenses.scm
index 4e4aee2..9c4e177 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -39,7 +39,7 @@
psfl public-domain
qpl
vim
- x11
+ x11 x11-style
zlib
fsf-free))
@@ -236,6 +236,16 @@ which may be a file:// URI pointing the package's tree."
"http://directory.fsf.org/wiki/License:X11"
"https://www.gnu.org/licenses/license-list#X11License"))
+(define* (x11-style uri #:optional (comment ""))
+ "Return an X11-style license, whose full text can be found at URI,
+which may be a file:// URI pointing the package's tree."
+ (license "X11-style"
+ uri
+ (string-append
+ "This is an X11-style, non-copyleft free software license. "
+ "Check the URI for details. "
+ comment)))
+
(define zlib
(license "Zlib"
"http://www.gzip.org/zlib/zlib_license.html"
--
1.7.5.4
[-- Attachment #1.3: 0001-gnu-Add-w3m.patch --]
[-- Type: text/x-diff, Size: 6034 bytes --]
From 35a43e4b84487ec574c111254f8b0dfe61014f32 Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Mon, 4 Mar 2013 01:34:13 +0000
Subject: [PATCH] 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'.
---
Makefile.am | 4 +-
gnu/packages/patches/w3m-fix-compile.patch | 15 +++++
gnu/packages/w3m.scm | 81 ++++++++++++++++++++++++++++
3 files changed, 99 insertions(+), 1 deletions(-)
create mode 100644 gnu/packages/patches/w3m-fix-compile.patch
create mode 100644 gnu/packages/w3m.scm
diff --git a/Makefile.am b/Makefile.am
index b70349a..6b111d2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -159,6 +159,7 @@ MODULES = \
gnu/packages/tor.scm \
gnu/packages/vim.scm \
gnu/packages/vpn.scm \
+ gnu/packages/w3m.scm \
gnu/packages/wdiff.scm \
gnu/packages/wget.scm \
gnu/packages/which.scm \
@@ -217,7 +218,8 @@ dist_patch_DATA = \
gnu/packages/patches/tar-gets-undeclared.patch \
gnu/packages/patches/tcsh-fix-autotest.patch \
gnu/packages/patches/teckit-cstdio.patch \
- gnu/packages/patches/vpnc-script.patch
+ gnu/packages/patches/vpnc-script.patch \
+ gnu/packages/patches/w3m-fix-compile.patch
bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
diff --git a/gnu/packages/patches/w3m-fix-compile.patch b/gnu/packages/patches/w3m-fix-compile.patch
new file mode 100644
index 0000000..650a32b
--- /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 0000000..9199cbd
--- /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."))))
--
1.7.5.4
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2013-03-04 5:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 5:26 w3m: 'license'; error: redefinition of 'struct file_handle' Nikita Karetnikov
2013-02-13 5:50 ` Mark H Weaver
2013-02-13 6:57 ` Nikita Karetnikov
2013-03-03 22:56 ` Cyril Roelandt
2013-03-04 5:34 ` Nikita Karetnikov [this message]
2013-03-04 10:09 ` [PATCH] gnu: Add w3m Ludovic Courtès
2013-02-13 6:28 ` w3m: 'license'; error: redefinition of 'struct file_handle' Mark H Weaver
2013-02-13 10:43 ` Andreas Enge
2013-02-13 21:56 ` Ludovic Courtès
2013-02-14 3:20 ` Mark H Weaver
2013-02-15 6:43 ` Mark H Weaver
2013-02-15 14:38 ` Ludovic Courtès
2013-02-15 19:59 ` Mark H Weaver
2013-02-13 21:53 ` Ludovic Courtès
2013-03-02 15:12 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vc97zq1x.fsf_-_@karetnikov.org \
--to=nikita@karetnikov.org \
--cc=bug-guix@gnu.org \
--cc=tipecaml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.