2006-04-28 23:02:52 +04:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, sslSupport ? true
|
|
|
|
, graphicsSupport ? false
|
2012-09-05 04:59:01 +04:00
|
|
|
, mouseSupport ? false
|
2009-10-28 18:06:18 +03:00
|
|
|
, ncurses, openssl ? null, boehmgc, gettext, zlib
|
2012-09-05 04:55:35 +04:00
|
|
|
, imlib2 ? null, x11 ? null, fbcon ? null
|
2012-09-05 04:59:01 +04:00
|
|
|
, gpm ? null
|
2005-09-14 20:23:02 +04:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert sslSupport -> openssl != null;
|
2012-09-05 04:55:35 +04:00
|
|
|
assert graphicsSupport -> imlib2 != null && (x11 != null || fbcon != null);
|
2012-09-05 04:59:01 +04:00
|
|
|
assert mouseSupport -> gpm != null;
|
2005-09-14 20:23:02 +04:00
|
|
|
|
2011-04-30 13:20:59 +04:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "w3m-0.5.3";
|
2008-11-14 14:16:54 +03:00
|
|
|
|
2005-09-14 20:23:02 +04:00
|
|
|
src = fetchurl {
|
2011-04-30 13:20:59 +04:00
|
|
|
url = "mirror://sourceforge/w3m/${name}.tar.gz";
|
|
|
|
sha256 = "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579";
|
2005-09-14 20:23:02 +04:00
|
|
|
};
|
2008-11-14 14:16:54 +03:00
|
|
|
|
2012-10-16 22:33:08 +04:00
|
|
|
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 ];
|
2010-08-21 21:07:03 +04:00
|
|
|
|
2008-11-14 14:16:54 +03:00
|
|
|
buildInputs = [ncurses boehmgc gettext zlib]
|
|
|
|
++ stdenv.lib.optional sslSupport openssl
|
2012-09-05 04:59:01 +04:00
|
|
|
++ stdenv.lib.optional mouseSupport gpm
|
2012-09-05 04:55:35 +04:00
|
|
|
++ stdenv.lib.optionals graphicsSupport [imlib2 x11 fbcon];
|
2008-11-14 14:16:54 +03:00
|
|
|
|
2012-09-05 04:55:35 +04:00
|
|
|
configureFlags = "--with-ssl=${openssl} --with-gc=${boehmgc}"
|
|
|
|
+ stdenv.lib.optionalString graphicsSupport " --enable-image=x11,fb";
|
2008-11-14 14:16:54 +03:00
|
|
|
|
|
|
|
preConfigure = ''
|
2012-08-01 01:34:52 +04:00
|
|
|
substituteInPlace ./configure --replace "/lib /usr/lib /usr/local/lib /usr/ucblib /usr/ccslib /usr/ccs/lib /lib64 /usr/lib64" /no-such-path
|
2008-11-14 14:16:54 +03:00
|
|
|
substituteInPlace ./configure --replace /usr /no-such-path
|
|
|
|
'';
|
2008-01-30 22:49:42 +03:00
|
|
|
|
2013-01-17 17:34:58 +04:00
|
|
|
enableParallelBuilding = false;
|
2012-10-16 22:33:08 +04:00
|
|
|
|
2014-01-28 20:24:00 +04:00
|
|
|
meta = with stdenv.lib; {
|
2008-11-14 14:16:54 +03:00
|
|
|
homepage = http://w3m.sourceforge.net/;
|
|
|
|
description = "A text-mode web browser";
|
2014-01-28 20:24:00 +04:00
|
|
|
maintainers = maintainers.mornfall;
|
2008-01-30 22:49:42 +03:00
|
|
|
};
|
2005-09-14 20:23:02 +04:00
|
|
|
}
|