mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
ncurses: install *.pc files (for pkg-config)
To make e.g. "pkg-config --cflags ncursesw" work. The ncurses expression, when built in unicode/wide char mode, provides backward compatibility symlinks from lib<name>.so to lib<name>w.so. Provide similar symlinks for the *.pc files: <name>.pc -> <name>w.pc.
This commit is contained in:
parent
95f443fda4
commit
50253a3e84
@ -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,6 +58,7 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user