From 877838870e02d20633485ca9fbfb1deff23f3b31 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Oct 2012 14:33:08 -0400 Subject: [PATCH] w3m: Fix build http://hydra.nixos.org/build/3081853 --- .../networking/browsers/w3m/default.nix | 9 ++- .../networking/browsers/w3m/glibc214.patch | 60 +++++++++++++++++++ 2 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 pkgs/applications/networking/browsers/w3m/glibc214.patch diff --git a/pkgs/applications/networking/browsers/w3m/default.nix b/pkgs/applications/networking/browsers/w3m/default.nix index 38ef20ec969..3f31cd0a030 100644 --- a/pkgs/applications/networking/browsers/w3m/default.nix +++ b/pkgs/applications/networking/browsers/w3m/default.nix @@ -19,9 +19,10 @@ stdenv.mkDerivation rec { sha256 = "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579"; }; - # Patch for the newer unstable boehm-gc 7.2alpha. Not all platforms use that - # alpha. At the time of writing this, boehm-gc-7.1 is the last stable. - patches = stdenv.lib.optional (boehmgc.name != "boehm-gc-7.1") [ ./newgc.patch ]; + patches = [ ./glibc214.patch ] + # Patch for the newer unstable boehm-gc 7.2alpha. Not all platforms use that + # alpha. At the time of writing this, boehm-gc-7.1 is the last stable. + ++ stdenv.lib.optional (boehmgc.name != "boehm-gc-7.1") [ ./newgc.patch ]; buildInputs = [ncurses boehmgc gettext zlib] ++ stdenv.lib.optional sslSupport openssl @@ -36,6 +37,8 @@ stdenv.mkDerivation rec { substituteInPlace ./configure --replace /usr /no-such-path ''; + enableParallelBuilding = true; + meta = { homepage = http://w3m.sourceforge.net/; description = "A text-mode web browser"; diff --git a/pkgs/applications/networking/browsers/w3m/glibc214.patch b/pkgs/applications/networking/browsers/w3m/glibc214.patch new file mode 100644 index 00000000000..37e466e2106 --- /dev/null +++ b/pkgs/applications/networking/browsers/w3m/glibc214.patch @@ -0,0 +1,60 @@ +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/w3m/files/w3m-0.5.3-glibc214.patch?revision=1.1 + +--- a/istream.c.~1.27.~ 2011-01-04 18:22:22.000000000 +0900 ++++ b/istream.c 2011-06-24 08:15:23.522990618 +0900 +@@ -22,8 +22,8 @@ + static void basic_close(int *handle); + static int basic_read(int *handle, char *buf, int len); + +-static void file_close(struct file_handle *handle); +-static int file_read(struct file_handle *handle, char *buf, int len); ++static void file_close(struct afile_handle *handle); ++static int file_read(struct afile_handle *handle, char *buf, int len); + + static int str_read(Str handle, char *buf, int len); + +@@ -114,7 +114,7 @@ + stream = New(union input_stream); + init_base_stream(&stream->base, STREAM_BUF_SIZE); + stream->file.type = IST_FILE; +- stream->file.handle = New(struct file_handle); ++ stream->file.handle = New(struct afile_handle); + stream->file.handle->f = f; + if (closep) + stream->file.handle->close = closep; +@@ -658,13 +658,13 @@ + } + + static void +-file_close(struct file_handle *handle) ++file_close(struct afile_handle *handle) + { + handle->close(handle->f); + } + + static int +-file_read(struct file_handle *handle, char *buf, int len) ++file_read(struct afile_handle *handle, char *buf, int len) + { + return fread(buf, 1, len, handle->f); + } +--- a/istream.h.~1.12.~ 2003-10-21 01:41:56.000000000 +0900 ++++ b/istream.h 2011-06-24 08:15:54.392991144 +0900 +@@ -20,7 +20,7 @@ + + typedef struct stream_buffer *StreamBuffer; + +-struct file_handle { ++struct afile_handle { + FILE *f; + void (*close) (); + }; +@@ -53,7 +53,7 @@ + + struct file_stream { + struct stream_buffer stream; +- struct file_handle *handle; ++ struct afile_handle *handle; + char type; + char iseos; + int (*read) ();