w3m: use Arch patches
Fix the built-in help (perl.patch) https://bugs.archlinux.org/task/45608 Properly link w3mimgdisplay to x11 https://bbs.archlinux.org/viewtopic.php?id=196093 Fix rendering bug in w3mimgdisplay (w3m_rgba.patch) https://github.com/hut/ranger/issues/86 Don't ignore input tags with invalid types (form_unkown.patch) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615843 Fix a segfault when using https (https.patch) https://bugzilla.redhat.com/show_bug.cgi?id=707994
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{ stdenv, fetchurl
|
||||
{ stdenv, fetchurl, fetchpatch
|
||||
, ncurses, boehmgc, gettext, zlib
|
||||
, sslSupport ? true, openssl ? null
|
||||
, graphicsSupport ? true, imlib2 ? null
|
||||
, x11Support ? graphicsSupport, libX11 ? null
|
||||
, mouseSupport ? !stdenv.isDarwin, gpm-ncurses ? null
|
||||
, perl, man
|
||||
}:
|
||||
|
||||
assert sslSupport -> openssl != null;
|
||||
@@ -21,15 +22,49 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579";
|
||||
};
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lsocket -lnsl";
|
||||
NIX_LDFLAGS = optionalString stdenv.isSunOS "-lsocket -lnsl";
|
||||
|
||||
patches = [ ./glibc214.patch ./RAND_egd.libressl.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.
|
||||
++ optional (boehmgc.name != "boehm-gc-7.1") [ ./newgc.patch ]
|
||||
++ optional stdenv.isCygwin ./cygwin.patch
|
||||
# for frame buffer only version
|
||||
++ optional (graphicsSupport && !x11Support) [ ./no-x11.patch ];
|
||||
# we must set these so that the generated files (e.g. w3mhelp.cgi) contain
|
||||
# the correct paths.
|
||||
PERL = "${perl}/bin/perl";
|
||||
MAN = "${man}/bin/man";
|
||||
|
||||
# the Arch patches were pulled from:
|
||||
# https://aur.archlinux.org/cgit/aur.git/?h=w3m-mouse
|
||||
patches = [
|
||||
./RAND_egd.libressl.patch
|
||||
(fetchpatch {
|
||||
name = "file_handle.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/file_handle.patch?h=w3m-mouse&id=5b5f0fbb59f674575e87dd368fed834641c35f03";
|
||||
sha256 = "0kkqm68ig9d658kf1iwa1dwcf651f6dy2j98gplcks1mn3bdlak4";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "form_unknown.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/form_unknown.patch?h=w3m-mouse&id=5b5f0fbb59f674575e87dd368fed834641c35f03";
|
||||
sha256 = "1mbfclid3bihb1xv7sxcahprn3slzd6ga8rjzlq4rbq80bl053fw";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "gc72.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/gc72.patch?h=w3m-mouse&id=5b5f0fbb59f674575e87dd368fed834641c35f03";
|
||||
sha256 = "1n6anaw17by0s6rn25bwkgj2mck7ffspizpwbijvx1ynk451459a";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "https.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/https.patch?h=w3m-mouse&id=5b5f0fbb59f674575e87dd368fed834641c35f03";
|
||||
sha256 = "08skvaha1hjyapsh8zw5dgfy433mw2hk7qy9yy9avn8rjqj7kjxk";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "perl.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/perl.patch?h=w3m-mouse&id=5b5f0fbb59f674575e87dd368fed834641c35f03";
|
||||
sha256 = "15cq7cwh0d2v64i8by44rgxw48156sgh872921hxrqdakr95p3gy";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "w3m_rgba.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/w3m_rgba.patch?h=w3m-mouse&id=5b5f0fbb59f674575e87dd368fed834641c35f03";
|
||||
sha256 = "1dhp1p6z621ayyl9zip9w35x2cxyhhj72jv5dvf0zp4rk6cjm781";
|
||||
})
|
||||
] ++ optional (graphicsSupport && !x11Support) [ ./no-x11.patch ]
|
||||
++ optional stdenv.isCygwin ./cygwin.patch;
|
||||
|
||||
buildInputs = [ncurses boehmgc gettext zlib]
|
||||
++ optional sslSupport openssl
|
||||
@@ -37,6 +72,10 @@ stdenv.mkDerivation rec {
|
||||
++ optional graphicsSupport imlib2
|
||||
++ optional x11Support libX11;
|
||||
|
||||
postInstall = optionalString graphicsSupport ''
|
||||
ln -s $out/libexec/w3m/w3mimgdisplay $out/bin
|
||||
'';
|
||||
|
||||
configureFlags = "--with-ssl=${openssl} --with-gc=${boehmgc}"
|
||||
+ optionalString graphicsSupport " --enable-image=${optionalString x11Support "x11,"}fb";
|
||||
|
||||
@@ -48,11 +87,12 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = false;
|
||||
|
||||
# for w3mimgdisplay
|
||||
# see: https://bbs.archlinux.org/viewtopic.php?id=196093
|
||||
LIBS = optionalString x11Support "-lX11";
|
||||
|
||||
meta = {
|
||||
homepage = http://w3m.sourceforge.net/;
|
||||
description = "A text-mode web browser";
|
||||
maintainers = [ maintainers.mornfall ];
|
||||
maintainers = [ maintainers.mornfall maintainers.cstrahan ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user