Merge pull request #1408 from bjornfor/ncurses-enable-pc-files

ncurses: install *.pc files (pkg-config)
This commit is contained in:
Peter Simons 2013-12-26 11:29:07 -08:00
commit 7d648e3b7f

View file

@ -21,12 +21,20 @@ stdenv.mkDerivation (rec {
patches = [ ./patch-ac ];
configureFlags = ''
--with-shared --without-debug
--with-shared --without-debug --enable-pc-files
${if unicode then "--enable-widec" else ""}${if cxx then "" else "--without-cxx-binding"}
'';
# PKG_CONFIG_LIBDIR is where the *.pc files will be installed. If this
# directory doesn't exist, the configure script will disable installation of
# *.pc files. The configure script usually (on LSB distros) pick $(path of
# pkg-config)/../lib/pkgconfig. On NixOS that path doesn't exist and is not
# the place we want to put *.pc files from other packages anyway. So we must
# tell it explicitly where to install with PKG_CONFIG_LIBDIR.
preConfigure = ''
export configureFlags="$configureFlags --includedir=$out/include"
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
mkdir -p "$PKG_CONFIG_LIBDIR"
'';
selfNativeBuildInput = true;
@ -50,9 +58,11 @@ stdenv.mkDerivation (rec {
echo "INPUT(-l''${lib}w)" > $out/lib/lib$lib.so
ln -svf lib''${lib}w.a $out/lib/lib$lib.a
ln -svf lib''${lib}w.so.5 $out/lib/lib$lib.so.5
ln -svf ''${lib}w.pc $out/lib/pkgconfig/$lib.pc
fi
done;
ln -svf . $out/include/ncursesw
ln -svf ncursesw5-config $out/bin/ncurses5-config
'' else "";
meta = {