treewide: pkg-config has targetPrefix

This commit is contained in:
John Ericson 2020-04-27 23:56:25 -04:00
parent c71ab32a67
commit ee8cfe4bf3
12 changed files with 12 additions and 13 deletions

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
makeFlags = [ "PKG_CONFIG=${buildPackages.pkgconfig}/bin/pkg-config" ];
makeFlags = [ "PKG_CONFIG=${buildPackages.pkgconfig}/bin/${buildPackages.pkgconfig.targetPrefix}pkg-config" ];
installPhase = ''
install -m 555 -Dt $out/bin mg

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation {
moveToOutput "lib/ImageMagick-*/config-Q16HDRI" "$dev" # includes configure params
for file in "$dev"/bin/*-config; do
substituteInPlace "$file" --replace pkg-config \
"PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/pkg-config'"
"PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config'"
done
'' + lib.optionalString (ghostscript != null) ''
for la in $out/lib/*.la; do

View File

@ -85,9 +85,9 @@ stdenv.mkDerivation {
moveToOutput "lib/ImageMagick-*/config-Q16" "$dev" # includes configure params
for file in "$dev"/bin/*-config; do
substituteInPlace "$file" --replace "${pkgconfig}/bin/pkg-config -config" \
${pkgconfig}/bin/pkg-config
${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config
substituteInPlace "$file" --replace ${pkgconfig}/bin/pkg-config \
"PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/pkg-config'"
"PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config'"
done
'' + lib.optionalString (ghostscript != null) ''
for la in $out/lib/*.la; do

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation {
sha256 = "1f73wvqqvj5pr3fvb7jjc4bi1iwgkkknz24k8n69mdb75jnfjipp";
};
makeFlags = [ "PKGCONFIG=${pkgconfig}/bin/pkg-config" "binary=stupidterm" ];
makeFlags = [ "PKGCONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" "binary=stupidterm" ];
installPhase = ''
install -D stupidterm $out/bin/stupidterm

View File

@ -12,7 +12,7 @@
cp -v "$script" "$target"/"$scriptName"
chmod 755 "$target"/"$scriptName"
patchShebangs "$target"/"$scriptName"
substituteInPlace "$target"/"$scriptName" --replace pkg-config ${pkgconfig}/bin/pkg-config
substituteInPlace "$target"/"$scriptName" --replace pkg-config ${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config
substituteInPlace "$target"/"$scriptName" --replace monodis ${mono}/bin/monodis
done
''

View File

@ -163,7 +163,6 @@ stdenv.mkDerivation rec {
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile"
"--pkg-config=pkg-config" # Override ffmpeg's ./configure assumption that pkg-config is prefixed by the architecture. (e.g. aarch64-unknown-linux-gnu-pkg-config)
] ++ optional stdenv.cc.isClang "--cc=clang");
depsBuildBuild = [ buildPackages.stdenv.cc ];

View File

@ -117,7 +117,7 @@ in stdenv.mkDerivation rec {
makeFlags = [
"prefix=${placeholder "out"}"
"PKG_CONFIG=${pkgconfig}/bin/pkg-config"
"PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"
];
# The .pc files does not declare an `includedir=`, so the multiple

View File

@ -21,7 +21,7 @@ buildPythonPackage rec {
patches = [ ./executable.patch ];
postPatch = ''
substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkgconfig}/bin/pkg-config"'
substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"'
'';
meta = with lib; {

View File

@ -12,7 +12,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.py \
--replace "/usr/bin/pkg-config" "${pkgconfig}/bin/pkg-config"
--replace "/usr/bin/pkg-config" "${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"
'';
nativeBuildInputs = [ pkgconfig ];

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gpsd libcap libnl ];
preBuild = ''
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/pkg-config"
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"
'';
meta = {

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libnl ];
preBuild = ''
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/pkg-config"
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"
'';
meta = {

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation {
};
preConfigure = ''
export PKG_CONFIG=${pkgconfig}/bin/pkg-config
export PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config
export LIBXML2_CFLAGS="-I ${libxml2.dev}/include/libxml2"
export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2"
'';