treewide: pkg-config has targetPrefix
This commit is contained in:
parent
c71ab32a67
commit
ee8cfe4bf3
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
makeFlags = [ "PKG_CONFIG=${buildPackages.pkgconfig}/bin/pkg-config" ];
|
makeFlags = [ "PKG_CONFIG=${buildPackages.pkgconfig}/bin/${buildPackages.pkgconfig.targetPrefix}pkg-config" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -m 555 -Dt $out/bin mg
|
install -m 555 -Dt $out/bin mg
|
||||||
|
@ -71,7 +71,7 @@ stdenv.mkDerivation {
|
|||||||
moveToOutput "lib/ImageMagick-*/config-Q16HDRI" "$dev" # includes configure params
|
moveToOutput "lib/ImageMagick-*/config-Q16HDRI" "$dev" # includes configure params
|
||||||
for file in "$dev"/bin/*-config; do
|
for file in "$dev"/bin/*-config; do
|
||||||
substituteInPlace "$file" --replace pkg-config \
|
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
|
done
|
||||||
'' + lib.optionalString (ghostscript != null) ''
|
'' + lib.optionalString (ghostscript != null) ''
|
||||||
for la in $out/lib/*.la; do
|
for la in $out/lib/*.la; do
|
||||||
|
@ -85,9 +85,9 @@ stdenv.mkDerivation {
|
|||||||
moveToOutput "lib/ImageMagick-*/config-Q16" "$dev" # includes configure params
|
moveToOutput "lib/ImageMagick-*/config-Q16" "$dev" # includes configure params
|
||||||
for file in "$dev"/bin/*-config; do
|
for file in "$dev"/bin/*-config; do
|
||||||
substituteInPlace "$file" --replace "${pkgconfig}/bin/pkg-config -config" \
|
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 \
|
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
|
done
|
||||||
'' + lib.optionalString (ghostscript != null) ''
|
'' + lib.optionalString (ghostscript != null) ''
|
||||||
for la in $out/lib/*.la; do
|
for la in $out/lib/*.la; do
|
||||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "1f73wvqqvj5pr3fvb7jjc4bi1iwgkkknz24k8n69mdb75jnfjipp";
|
sha256 = "1f73wvqqvj5pr3fvb7jjc4bi1iwgkkknz24k8n69mdb75jnfjipp";
|
||||||
};
|
};
|
||||||
|
|
||||||
makeFlags = [ "PKGCONFIG=${pkgconfig}/bin/pkg-config" "binary=stupidterm" ];
|
makeFlags = [ "PKGCONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" "binary=stupidterm" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -D stupidterm $out/bin/stupidterm
|
install -D stupidterm $out/bin/stupidterm
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
cp -v "$script" "$target"/"$scriptName"
|
cp -v "$script" "$target"/"$scriptName"
|
||||||
chmod 755 "$target"/"$scriptName"
|
chmod 755 "$target"/"$scriptName"
|
||||||
patchShebangs "$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
|
substituteInPlace "$target"/"$scriptName" --replace monodis ${mono}/bin/monodis
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
|
@ -163,7 +163,6 @@ stdenv.mkDerivation rec {
|
|||||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
"--cross-prefix=${stdenv.cc.targetPrefix}"
|
"--cross-prefix=${stdenv.cc.targetPrefix}"
|
||||||
"--enable-cross-compile"
|
"--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");
|
] ++ optional stdenv.cc.isClang "--cc=clang");
|
||||||
|
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
|
@ -117,7 +117,7 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"prefix=${placeholder "out"}"
|
"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
|
# The .pc files does not declare an `includedir=`, so the multiple
|
||||||
|
@ -21,7 +21,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
patches = [ ./executable.patch ];
|
patches = [ ./executable.patch ];
|
||||||
postPatch = ''
|
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; {
|
meta = with lib; {
|
||||||
|
@ -12,7 +12,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.py \
|
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 ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ gpsd libcap libnl ];
|
buildInputs = [ gpsd libcap libnl ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/pkg-config"
|
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ libnl ];
|
buildInputs = [ libnl ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/pkg-config"
|
makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
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_CFLAGS="-I ${libxml2.dev}/include/libxml2"
|
||||||
export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2"
|
export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2"
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user