ncurses: Revert to normal style

Also re-enable building shared libraries on Mac OS X as these worked
fine in the past.
wip/yesman
Eelco Dolstra 9 years ago
parent 3aee39bb83
commit 779ab6bfc7
  1. 65
      pkgs/development/libraries/ncurses/default.nix

@ -1,19 +1,14 @@
{ stdenv, fetchurl
{ lib, stdenv, fetchurl
# Optional Dependencies
, gpm ? null
, mouseSupport ? false
, unicode ? true
, gpm
# Extra Options
, abiVersion ? "5"
, unicode ? true
}:
with stdenv.lib;
let
buildShared = !stdenv.isDarwin;
optGpm = stdenv.shouldUsePkg gpm;
in
stdenv.mkDerivation rec {
name = "ncurses-5.9";
@ -24,41 +19,11 @@ stdenv.mkDerivation rec {
patches = [ ./clang.patch ];
buildInputs = [ optGpm ];
configureFlags = [
(mkWith true "abi-version" abiVersion)
(mkWith true "cxx" null)
(mkWith true "cxx-binding" null)
(mkWith false "ada" null)
(mkWith true "manpages" null)
(mkWith true "progs" null)
(mkWith doCheck "tests" null)
(mkWith true "curses-h" null)
(mkEnable true "pc-files" null)
(mkWith buildShared "shared" null)
(mkWith true "normal" null)
(mkWith false "debug" null)
(mkWith false "termlib" null)
(mkWith false "ticlib" null)
(mkWith optGpm "gpm" null)
(mkEnable true "overwrite" null)
(mkEnable true "database" null)
(mkWith true "xterm-new" null)
(mkEnable true "symlinks" null)
(mkEnable unicode "widec" null)
(mkEnable true "ext-colors" null)
(mkEnable true "ext-mouse" null)
] ++ stdenv.lib.optionals stdenv.isCygwin [
"--enable-sp-funcs"
"--enable-term-driver"
"--enable-const"
"--enable-ext-colors"
"--enable-ext-mouse"
"--enable-reentrant"
"--enable-colorfgbg"
"--enable-tcap-names"
];
configureFlags =
[ "--with-shared" "--without-debug" "--enable-pc-files" "--enable-symlinks" ]
++ lib.optional unicode "--enable-widec";
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
# PKG_CONFIG_LIBDIR is where the *.pc files will be installed. If this
# directory doesn't exist, the configure script will disable installation of
@ -69,7 +34,7 @@ stdenv.mkDerivation rec {
preConfigure = ''
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
mkdir -p "$PKG_CONFIG_LIBDIR"
'' + stdenv.lib.optionalString stdenv.isCygwin ''
'' + lib.optionalString stdenv.isCygwin ''
sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
'';
@ -106,7 +71,7 @@ stdenv.mkDerivation rec {
# Create curses compatability
ln -svf libncursesw.so $out/lib/libcursesw.so
ln -svf libncursesw.so $out/lib/libcurses.so
'' + stdenv.lib.optionalString stdenv.isCygwin ''
'' + lib.optionalString stdenv.isCygwin ''
for lib in $libs; do
if test -e $out/lib/lib''${lib}w.dll.a; then
ln -svf lib''${lib}w.dll.a $out/lib/lib$lib.dll.a
@ -143,9 +108,9 @@ stdenv.mkDerivation rec {
homepage = http://www.gnu.org/software/ncurses/;
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ wkennington ];
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.wkennington ];
};
passthru.ldflags = if unicode then "-lncursesw" else "-lncurses";

Loading…
Cancel
Save