mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-16 06:47:09 +03:00
ncurses: Revert to normal style
Also re-enable building shared libraries on Mac OS X as these worked fine in the past.
This commit is contained in:
parent
3aee39bb83
commit
779ab6bfc7
@ -1,19 +1,14 @@
|
|||||||
{ stdenv, fetchurl
|
{ lib, stdenv, fetchurl
|
||||||
|
|
||||||
# Optional Dependencies
|
, mouseSupport ? false
|
||||||
, gpm ? null
|
, unicode ? true
|
||||||
|
|
||||||
|
, gpm
|
||||||
|
|
||||||
# Extra Options
|
# Extra Options
|
||||||
, abiVersion ? "5"
|
, abiVersion ? "5"
|
||||||
, unicode ? true
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
let
|
|
||||||
buildShared = !stdenv.isDarwin;
|
|
||||||
|
|
||||||
optGpm = stdenv.shouldUsePkg gpm;
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ncurses-5.9";
|
name = "ncurses-5.9";
|
||||||
|
|
||||||
@ -24,41 +19,11 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = [ ./clang.patch ];
|
patches = [ ./clang.patch ];
|
||||||
|
|
||||||
buildInputs = [ optGpm ];
|
configureFlags =
|
||||||
|
[ "--with-shared" "--without-debug" "--enable-pc-files" "--enable-symlinks" ]
|
||||||
|
++ lib.optional unicode "--enable-widec";
|
||||||
|
|
||||||
configureFlags = [
|
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
|
||||||
(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"
|
|
||||||
];
|
|
||||||
|
|
||||||
# PKG_CONFIG_LIBDIR is where the *.pc files will be installed. If this
|
# PKG_CONFIG_LIBDIR is where the *.pc files will be installed. If this
|
||||||
# directory doesn't exist, the configure script will disable installation of
|
# directory doesn't exist, the configure script will disable installation of
|
||||||
@ -69,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
|
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
|
||||||
mkdir -p "$PKG_CONFIG_LIBDIR"
|
mkdir -p "$PKG_CONFIG_LIBDIR"
|
||||||
'' + stdenv.lib.optionalString stdenv.isCygwin ''
|
'' + lib.optionalString stdenv.isCygwin ''
|
||||||
sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
|
sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -106,7 +71,7 @@ stdenv.mkDerivation rec {
|
|||||||
# Create curses compatability
|
# Create curses compatability
|
||||||
ln -svf libncursesw.so $out/lib/libcursesw.so
|
ln -svf libncursesw.so $out/lib/libcursesw.so
|
||||||
ln -svf libncursesw.so $out/lib/libcurses.so
|
ln -svf libncursesw.so $out/lib/libcurses.so
|
||||||
'' + stdenv.lib.optionalString stdenv.isCygwin ''
|
'' + lib.optionalString stdenv.isCygwin ''
|
||||||
for lib in $libs; do
|
for lib in $libs; do
|
||||||
if test -e $out/lib/lib''${lib}w.dll.a; then
|
if test -e $out/lib/lib''${lib}w.dll.a; then
|
||||||
ln -svf lib''${lib}w.dll.a $out/lib/lib$lib.dll.a
|
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/;
|
homepage = http://www.gnu.org/software/ncurses/;
|
||||||
|
|
||||||
license = licenses.mit;
|
license = lib.licenses.mit;
|
||||||
platforms = platforms.all;
|
platforms = lib.platforms.all;
|
||||||
maintainers = with maintainers; [ wkennington ];
|
maintainers = [ lib.maintainers.wkennington ];
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru.ldflags = if unicode then "-lncursesw" else "-lncurses";
|
passthru.ldflags = if unicode then "-lncursesw" else "-lncurses";
|
||||||
|
Loading…
Reference in New Issue
Block a user