mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
ncurses: Build with standard gcc
This commit is contained in:
parent
9226fbf56a
commit
777617f987
2 changed files with 13 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
||||||
{stdenv, fetchurl, unicode ? true}:
|
{ lib, stdenv, fetchurl, unicode ? true }:
|
||||||
|
|
||||||
let
|
let
|
||||||
/* C++ bindings fail to build on `i386-pc-solaris2.11' with GCC 3.4.3:
|
/* C++ bindings fail to build on `i386-pc-solaris2.11' with GCC 3.4.3:
|
||||||
|
@ -10,7 +10,7 @@ let
|
||||||
So disable them for now. */
|
So disable them for now. */
|
||||||
cxx = !stdenv.isSunOS;
|
cxx = !stdenv.isSunOS;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ncurses-5.9";
|
name = "ncurses-5.9";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -18,13 +18,7 @@ stdenv.mkDerivation (rec {
|
||||||
sha256 = "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh";
|
sha256 = "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh";
|
||||||
};
|
};
|
||||||
|
|
||||||
clangPatch = fetchurl {
|
patches = [ ./patch-ac ];
|
||||||
# Patch referenced from https://github.com/Homebrew/homebrew-dupes/issues/43
|
|
||||||
url = "http://lists.gnu.org/archive/html/bug-ncurses/2011-04/txtkWQqiQvcZe.txt";
|
|
||||||
sha256 = "03lrwqvb0r2qgi8hz7ayd3g26d6xilr3c92j8li3b77kdc0w0rlv";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [ ./patch-ac ] ++ stdenv.lib.optional stdenv.isDarwin clangPatch;
|
|
||||||
|
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
--with-shared --without-debug --enable-pc-files --enable-symlinks
|
--with-shared --without-debug --enable-pc-files --enable-symlinks
|
||||||
|
@ -41,6 +35,8 @@ stdenv.mkDerivation (rec {
|
||||||
export configureFlags="$configureFlags --includedir=$out/include"
|
export configureFlags="$configureFlags --includedir=$out/include"
|
||||||
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
|
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
|
||||||
mkdir -p "$PKG_CONFIG_LIBDIR"
|
mkdir -p "$PKG_CONFIG_LIBDIR"
|
||||||
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace configure --replace -no-cpp-precomp ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
selfNativeBuildInput = true;
|
selfNativeBuildInput = true;
|
||||||
|
@ -50,8 +46,8 @@ stdenv.mkDerivation (rec {
|
||||||
preBuild =
|
preBuild =
|
||||||
# On Darwin, we end up using the native `sed' during bootstrap, and it
|
# On Darwin, we end up using the native `sed' during bootstrap, and it
|
||||||
# fails to run this command, which isn't needed anyway.
|
# fails to run this command, which isn't needed anyway.
|
||||||
stdenv.lib.optionalString (!stdenv.isDarwin)
|
lib.optionalString (!stdenv.isDarwin)
|
||||||
''sed -e "s@\([[:space:]]\)sh @\1''${SHELL} @" -i */Makefile Makefile'';
|
''sed -e "s@\([[:space:]]\)sh @\1''${SHELL} @" -i */Makefile Makefile'';
|
||||||
|
|
||||||
# When building a wide-character (Unicode) build, create backward
|
# When building a wide-character (Unicode) build, create backward
|
||||||
# compatibility links from the the "normal" libraries to the
|
# compatibility links from the the "normal" libraries to the
|
||||||
|
@ -71,6 +67,8 @@ stdenv.mkDerivation (rec {
|
||||||
ln -svf ncursesw5-config $out/bin/ncurses5-config
|
ln -svf ncursesw5-config $out/bin/ncurses5-config
|
||||||
'' else "";
|
'' else "";
|
||||||
|
|
||||||
|
postFixup = lib.optionalString stdenv.isDarwin "rm $out/lib/*.so";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "GNU Ncurses, a free software emulation of curses in SVR4 and more";
|
description = "GNU Ncurses, a free software emulation of curses in SVR4 and more";
|
||||||
|
|
||||||
|
@ -90,9 +88,9 @@ stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
homepage = http://www.gnu.org/software/ncurses/;
|
homepage = http://www.gnu.org/software/ncurses/;
|
||||||
|
|
||||||
license = stdenv.lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
|
|
||||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
maintainers = [ lib.maintainers.ludo ];
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
} // ( if stdenv.isDarwin then { postFixup = "rm $out/lib/*.so"; } else { } ) )
|
}
|
||||||
|
|
|
@ -5754,13 +5754,6 @@ let
|
||||||
|
|
||||||
ncurses = callPackage ../development/libraries/ncurses {
|
ncurses = callPackage ../development/libraries/ncurses {
|
||||||
unicode = system != "i686-cygwin";
|
unicode = system != "i686-cygwin";
|
||||||
stdenv =
|
|
||||||
# On Darwin, NCurses uses `-no-cpp-precomp', which is specific to
|
|
||||||
# Apple-GCC. Since NCurses is part of stdenv, always use
|
|
||||||
# `stdenvNative' to build it.
|
|
||||||
if stdenv.isDarwin
|
|
||||||
then allStdenvs.stdenvNative
|
|
||||||
else stdenv;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
neon = callPackage ../development/libraries/neon {
|
neon = callPackage ../development/libraries/neon {
|
||||||
|
|
Loading…
Reference in a new issue