GNU Ncurses: Attempt to fix Solaris builds.

svn path=/nixpkgs/trunk/; revision=25594
This commit is contained in:
Ludovic Courtès 2011-01-17 09:16:30 +00:00
parent cbabeeb588
commit 11679ebe4b

View File

@ -1,20 +1,30 @@
{stdenv, fetchurl, unicode ? true}: {stdenv, fetchurl, unicode ? true}:
stdenv.mkDerivation ( rec { let
/* C++ bindings fail to build on `i386-pc-solaris2.11' with GCC 3.4.3:
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6395191>.
It seems that it could be worked around by #including <wchar.h> in the
right place, according to
<http://mail.python.org/pipermail/python-bugs-list/2006-September/035362.html>,
but this is left as an exercise to the reader.
So disable them for now. */
cxx = stdenv.system != "i386-sunos";
in
stdenv.mkDerivation (rec {
name = "ncurses-5.7"; name = "ncurses-5.7";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/ncurses/${name}.tar.gz"; url = "mirror://gnu/ncurses/${name}.tar.gz";
sha256 = "1x4q6kma6zgg438llbgiac3kik7j2lln9v97jdffv3fyqyjxx6qa"; sha256 = "1x4q6kma6zgg438llbgiac3kik7j2lln9v97jdffv3fyqyjxx6qa";
}; };
crossAttrs = { crossAttrs = {
patches = [ ./wint_t.patch ]; patches = [ ./wint_t.patch ];
}; };
configureFlags = '' configureFlags = ''
--with-shared --includedir=''${out}/include --without-debug --with-shared --includedir=''${out}/include --without-debug
${if unicode then "--enable-widec" else ""} ${if unicode then "--enable-widec" else ""}${if cxx then "" else "--without-cxx-binding"}
''; '';
selfBuildNativeInput = true; selfBuildNativeInput = true;
@ -58,5 +68,8 @@ stdenv.mkDerivation ( rec {
homepage = http://www.gnu.org/software/ncurses/; homepage = http://www.gnu.org/software/ncurses/;
license = "X11"; license = "X11";
maintainers = [ stdenv.lib.maintainers.ludo ];
platforms = stdenv.lib.platforms.all;
}; };
} // ( if stdenv.isDarwin then { postFixup = "rm $out/lib/*.so"; } else { } ) ) } // ( if stdenv.isDarwin then { postFixup = "rm $out/lib/*.so"; } else { } ) )