1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

ncurses: split into multiple outputs

Some programs (e.g. tput) might better be moved somewhere else than
$dev/bin, but that can be improved later if need be.
This commit is contained in:
Vladimír Čunát 2015-10-05 20:32:54 +02:00
parent 9a1aa51fed
commit 91407a8bdf
39 changed files with 75 additions and 70 deletions

View file

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
buildPhase = ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc.out}/lib:${qt48}/lib:${stdenv.cc.cc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager
--set-rpath "$out/opt/google/musicmanager:${stdenv.lib.makeLibraryPath [ readline ncurses stdenv.cc.libc.out qt48 stdenv.cc.cc libidn expat flac libvorbis ]}" opt/google/musicmanager/MusicManager
'';
dontPatchELF = true;

View file

@ -33,12 +33,12 @@ stdenv.mkDerivation rec {
# Further, we need to make sure that the -L option occurs before mention
# of the library, so that it finds it within the Nix store.
sed -i 's/tinfo ncurses/tinfo ncursesw/' configure
ncurseslib=$(echo ${ncurses}/lib | sed 's#/#\\/#g')
ncurseslib=$(echo ${ncurses.lib}/lib | sed 's#/#\\/#g')
sed -i "s/OLIBS=\$LIBS/OLIBS=\"-L$ncurseslib \$LIBS\"/" configure
sed -i 's/LIBS="\$LIBS_TERMCAP \$LIBS"/LIBS="\$LIBS \$LIBS_TERMCAP"/' configure
configureFlagsArray=(
LDFLAGS=-L${ncurses}/lib
LDFLAGS=-L${ncurses.lib}/lib
--with-xml2=yes
--with-gnutls=yes
--with-mac
@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
)
makeFlagsArray=(
CFLAGS=-O3
LDFLAGS="-O3 -L${ncurses}/lib"
LDFLAGS="-O3 -L${ncurses.lib}/lib"
);
'';

View file

@ -10,10 +10,11 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace Makefile \
--replace "/usr/local" "$out" \
--replace "CFLAGS = " "CFLAGS = -I${ncurses}/include " \
--replace "LDFLAGS = " "LDFLAGS = -L${ncurses}/lib " \
--replace "CFLAGS = " "CFLAGS = -I${ncurses.dev}/include " \
--replace "LDFLAGS = " "LDFLAGS = -L${ncurses.lib}/lib " \
--replace "-lcurses" "-lncurses"
'';
buildInputs = [ ncurses ];
preBuild = ''
mkdir -p $out/bin
mkdir -p $out/man/man1

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig gtk gettext ];
makeFlags = [ "PREFIX=$(out)" ]
++ optional withBuildColors "TPUT=${ncurses}/bin/tput"
++ optional withBuildColors "TPUT=${ncurses.dev}/bin/tput"
++ optional (!withBuildColors) "TPUT_AVAILABLE=0"
;

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation {
buildInputs = [ autoreconfHook gettext texinfo ncurses readline ];
configureFlags = [ "--with-curses=${ncurses}" "--with-readline=${readline}" ];
configureFlags = [ "--with-curses=${ncurses.dev}" "--with-readline=${readline}" ];
meta = with stdenv.lib; {
description = "A viewer for info files";

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
"PREFIX=$(out)"
"RSTTOMAN=${docutils}/bin/rst2man.py"
"VERBOSE=1"
"TPUT=${ncurses}/bin/tput"
"TPUT=${ncurses.dev}/bin/tput"
];
postInstall = ''

View file

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
mv doc $out/share
# Hack around lack of libtinfo in NixOS
ln -s ${ncurses}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5
ln -s ${ncurses.lib}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5
ln -s ${stdenv.cc.libc}/lib/libpthread.so.0 $out/lib/libpthread.so.0
# Add a clang symlink for easy building with a suitable compiler.

View file

@ -130,7 +130,7 @@ stdenv.mkDerivation {
--replace /usr/bin/pkill ${procps}/bin/pkill
substituteInPlace tools/xenstat/Makefile \
--replace /usr/include/curses.h ${ncurses}/include/curses.h
--replace /usr/include/curses.h ${ncurses.dev}/include/curses.h
substituteInPlace tools/qemu-xen-traditional/xen-hooks.mak \
--replace /usr/include/pci ${pciutils}/include/pci

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postInstall = ''
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses"
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses"
'';
meta = with stdenv.lib; {

View file

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postInstall = ''
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses"
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses"
'';
meta = with stdenv.lib; {

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postInstall = ''
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses"
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses"
'';
meta = with stdenv.lib; {

View file

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postInstall = ''
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses"
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses"
'';
meta = with stdenv.lib; {

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation {
for f in $(find $out); do
if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \
--set-rpath $out/lib:${gcc}/lib:${ncurses}/lib \
--set-rpath $out/lib:${gcc.lib}/lib:${ncurses.lib}/lib \
"$f" || true
fi
done

View file

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
(if stdenv.isLinux then ''
find . -type f -perm -0100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
--set-rpath "${libedit}/lib:${ncurses.lib}/lib:${gmp}/lib" {} \;
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
done

View file

@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
'';
preConfigure = ''

View file

@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
stdenv.lib.optionalString stdenv.isLinux ''
find . -type f -perm -0100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
--set-rpath "${ncurses.lib}/lib:${gmp}/lib" {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
for prog in ld ar gcc strip ranlib; do

View file

@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"

View file

@ -7,8 +7,8 @@ let
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"

View file

@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"

View file

@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
stdenv.lib.optionalString stdenv.isLinux ''
mkdir -p "$out/lib"
ln -sv "${ncurses}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5"
ln -sv "${ncurses.lib}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5"
find . -type f -perm -0100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out/lib:${gmp}/lib" {} \;

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"

View file

@ -24,8 +24,8 @@ in stdenv.mkDerivation rec {
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"

View file

@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
DYNAMIC_BY_DEFAULT = NO
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"

View file

@ -16,8 +16,8 @@ stdenv.mkDerivation (rec {
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
DYNAMIC_BY_DEFAULT = NO
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"

View file

@ -5,8 +5,8 @@ let
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
DYNAMIC_BY_DEFAULT = NO
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"

View file

@ -5,8 +5,8 @@ let
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
DYNAMIC_BY_DEFAULT = NO
SRC_HC_OPTS = -H64m -O -fasm
GhcLibHcOpts = -O -dcore-lint

View file

@ -34,7 +34,7 @@ let
# GDB needs ncurses
case "$file" in
*gdb) patchelf --set-rpath "${ncurses}/lib" "$file";;
*gdb) patchelf --set-rpath "${ncurses.lib}/lib" "$file";;
esac
done

View file

@ -43,9 +43,9 @@ let
# hint pypy to find nix ncurses
substituteInPlace pypy/module/_minimal_curses/fficurses.py \
--replace "/usr/include/ncurses/curses.h" "${ncurses}/include/curses.h" \
--replace "ncurses/curses.h" "${ncurses}/include/curses.h" \
--replace "ncurses/term.h" "${ncurses}/include/term.h" \
--replace "/usr/include/ncurses/curses.h" "${ncurses.dev}/include/curses.h" \
--replace "ncurses/curses.h" "${ncurses.dev}/include/curses.h" \
--replace "ncurses/term.h" "${ncurses.dev}/include/term.h" \
--replace "libraries=['curses']" "libraries=['ncurses']"
# tkinter hints
@ -72,7 +72,7 @@ let
doCheck = true;
checkPhase = ''
export TERMINFO="${ncurses}/share/terminfo/";
export TERMINFO="${ncurses.out}/share/terminfo/";
export TERM="xterm";
export HOME="$TMPDIR";
# disable shutils because it assumes gid 0 exists

View file

@ -54,8 +54,8 @@ in
ncursesw = attrs: {
buildInputs = [ ncurses ];
buildFlags = [
"--with-cflags=-I${ncurses}/include"
"--with-ldflags=-L${ncurses}/lib"
"--with-cflags=-I${ncurses.dev}/include"
"--with-ldflags=-L${ncurses.lib}/lib"
];
};

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
postInstall = ''
find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \
-e 's,-lncurses[a-z]*,-L${ncurses}/lib -lncursesw,g'
-e 's,-lncurses[a-z]*,-L${ncurses.lib}/lib -lncursesw,g'
'';
configureFlags = [ "--enable-widec" ];

View file

@ -16,6 +16,9 @@ stdenv.mkDerivation rec {
patches = [ ./clang.patch ];
outputs = [ "dev" "lib" "out" ];
setOutputFlags = false; # some aren't supported
configureFlags = [
"--with-shared"
"--with-cxx-shared"
@ -24,14 +27,14 @@ stdenv.mkDerivation rec {
"--enable-overwrite" # Needed for proper header installation
"--enable-pc-files"
"--enable-symlinks"
"--libdir=$(lib)/lib" "--includedir=$(dev)/include" "--bindir=$(dev)/bin"
] ++ lib.optional unicode "--enable-widec";
nativeBuildInputs = [ pkgconfig libtool ];
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
preConfigure = ''
configureFlagsArray+=("--includedir=$out/include")
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
mkdir -p "$PKG_CONFIG_LIBDIR"
configureFlagsArray+=("--with-pkg-config-libdir=$PKG_CONFIG_LIBDIR")
'' + lib.optionalString stdenv.isCygwin ''
@ -47,37 +50,37 @@ stdenv.mkDerivation rec {
# 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 = ''
postFixup = ''
# Determine what suffixes our libraries have
suffix="$(awk -F': ' 'f{print $3; f=0} /default library suffix/{f=1}' config.log)"
libs="$(ls $out/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")"
libs="$(ls $dev/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")"
suffixes="$(echo "$suffix" | awk '{for (i=1; i < length($0); i++) {x=substr($0, i+1, length($0)-i); print x}}')"
# Get the path to the config util
cfg=$(basename $out/bin/ncurses*-config)
cfg=$(basename $dev/bin/ncurses*-config)
# symlink the full suffixed include directory
ln -svf . $out/include/ncurses$suffix
ln -svf . $dev/include/ncurses$suffix
for newsuffix in $suffixes ""; do
# Create a non-abi versioned config util links
ln -svf $cfg $out/bin/ncurses$newsuffix-config
ln -svf $cfg $dev/bin/ncurses$newsuffix-config
# Allow for end users who #include <ncurses?w/*.h>
ln -svf . $out/include/ncurses$newsuffix
ln -svf . $dev/include/ncurses$newsuffix
for lib in $libs; do
for library in $libs; do
for dylibtype in so dll dylib; do
if [ -e "$out/lib/lib''${lib}$suffix.$dylibtype" ]; then
ln -svf lib''${lib}$suffix.$dylibtype $out/lib/lib$lib$newsuffix.$dylibtype
if [ -e "$lib/lib/lib''${library}$suffix.$dylibtype" ]; then
ln -svf lib''${library}$suffix.$dylibtype $lib/lib/lib$library$newsuffix.$dylibtype
fi
done
for statictype in a dll.a la; do
if [ -e "$out/lib/lib''${lib}$suffix.$statictype" ]; then
ln -svf lib''${lib}$suffix.$statictype $out/lib/lib$lib$newsuffix.$statictype
if [ -e "$lib/lib/lib''${library}$suffix.$statictype" ]; then
ln -svf lib''${library}$suffix.$statictype $lib/lib/lib$library$newsuffix.$statictype
fi
done
ln -svf ''${lib}$suffix.pc $out/lib/pkgconfig/$lib$newsuffix.pc
ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc
done
done
'';

View file

@ -9,9 +9,10 @@ stdenv.mkDerivation rec {
# Fix some wrong hardcoded paths
preConfigure = ''
sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" configure
sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" src/sltermin.c
sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure
sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" src/sltermin.c
sed -i -e "s|/bin/ln|ln|" src/Makefile.in
sed -i -e "s|-ltermcap|-lncurses|" ./configure
'';
configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}";
buildInputs = [ncurses pcre libpng zlib readline];

View file

@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
\( -type f -a -name "*.so*" \) -o \
\( -type f -a -perm -0100 \) \
\) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \
--set-rpath ${zlib}/lib:${ncurses}/lib {} \;
--set-rpath ${stdenv.lib.makeLibraryPath [ zlib ncurses ]} {} \;
# fix ineffective PROGDIR / MYNDKDIR determination
for i in ndk-build ndk-gdb ndk-gdb-py
do

View file

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out"
cp -r . "$out/src"
mkdir "$out/bin"
wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses}/bin"
wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses.dev}/bin"
ln -s "$out/src/drush" "$out/bin/drush"
'';
}

View file

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-ltdl-include=${libtool}/include"
"--with-ltdl-lib=${libtool}/lib"
"--with-ltdl-lib=${libtool.lib}/lib"
"--with-ncurses=${ncurses}"
"--with-sqlite3=${sqlite}"
"--with-exuberant-ctags=${ctags}/bin/ctags"

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace Makefile.bsd --replace /bin/echo echo
substituteInPlace entr.c --replace /bin/cat ${coreutils}/bin/cat
substituteInPlace entr.c --replace /usr/bin/clear ${ncurses}/bin/clear
substituteInPlace entr.c --replace /usr/bin/clear ${ncurses.dev}/bin/clear
substituteInPlace entr.1 --replace /bin/cat cat
substituteInPlace entr.1 --replace /usr/bin/clear clear
'';

View file

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses /* for `talk' */ ];
configureFlags = "--with-ncurses-include-dir=${ncurses}/include";
configureFlags = "--with-ncurses-include-dir=${ncurses.dev}/include";
# Test fails with "UNIX socket name too long", probably because our
# $TMPDIR is too long.

View file

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
for i in $(cd $out/bin && ls); do
wrapProgram $out/bin/$i \
--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pythonPackages.curses}):$out/libexec:$PYTHONPATH" \
--set TERMINFO "${ncurses}/share/terminfo" \
--set TERMINFO "${ncurses.out}/share/terminfo" \
--set TERM "xterm"
done
'';

View file

@ -10448,7 +10448,7 @@ let self = _self // overrides; _self = with self; {
preConfigure =
''
substituteInPlace Makefile.PL --replace '$Config{libpth}' \
"'${pkgs.ncurses}/lib'"
"'${pkgs.ncurses.lib}/lib'"
'';
# Tests don't work because they require /dev/tty.