2007-06-28 22:14:25 +00:00
|
|
|
{stdenv, fetchurl, unicode ? true}:
|
2004-03-05 10:13:23 +00:00
|
|
|
|
2004-03-29 17:23:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2006-12-25 23:28:35 +00:00
|
|
|
name = "ncurses-5.6";
|
2008-08-25 15:29:04 +00:00
|
|
|
|
2004-03-05 10:13:23 +00:00
|
|
|
src = fetchurl {
|
2007-08-27 13:42:00 +00:00
|
|
|
url = mirror://gnu/ncurses/ncurses-5.6.tar.gz;
|
2006-12-25 23:28:35 +00:00
|
|
|
md5 = "b6593abe1089d6aab1551c105c9300e3";
|
2004-03-05 10:13:23 +00:00
|
|
|
};
|
2008-08-25 15:29:04 +00:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
"--with-shared --includedir=\${out}/include" +
|
|
|
|
(if unicode then " --enable-widec " else " ") +
|
|
|
|
" --without-debug";
|
|
|
|
|
2008-02-22 03:06:12 +00:00
|
|
|
preBuild = ''sed -e "s@\([[:space:]]\)sh @\1''${SHELL} @" -i */Makefile Makefile'';
|
2008-08-25 15:29:04 +00:00
|
|
|
|
|
|
|
# When building a wide-character (Unicode) build, create backward
|
|
|
|
# compatibility links from the the "normal" libraries to the
|
|
|
|
# wide-character libraries (e.g. libncurses.so to libncursesw.so).
|
|
|
|
postInstall = if unicode then "
|
2007-06-26 11:34:05 +00:00
|
|
|
chmod -v 644 $out/lib/libncurses++w.a
|
|
|
|
for lib in curses ncurses form panel menu; do
|
2008-08-25 15:29:04 +00:00
|
|
|
if test -e $out/lib/lib\${lib}w.a; then
|
|
|
|
rm -vf $out/lib/lib\${lib}.so
|
|
|
|
echo \"INPUT(-l\${lib}w)\" > $out/lib/lib\${lib}.so
|
|
|
|
ln -svf lib\${lib}w.a $out/lib/lib\${lib}.a
|
|
|
|
ln -svf lib\${lib}w.so.5 $out/lib/lib\${lib}.so.5
|
|
|
|
fi
|
2007-06-26 11:34:05 +00:00
|
|
|
done;
|
2007-06-28 22:14:25 +00:00
|
|
|
" else "";
|
2004-03-05 10:13:23 +00:00
|
|
|
}
|