forked from mirrors/nixpkgs
e529ec3263
We disabled them by default when they were introduced in https://github.com/NixOS/nixpkgs/pull/42994 but enabling them probably makes more sense: https://github.com/NixOS/nixpkgs/pull/54398 https://github.com/NixOS/nixpkgs/pull/63491
42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
mesonConfigurePhase() {
|
||
runHook preConfigure
|
||
|
||
if [ -z "$dontAddPrefix" ]; then
|
||
mesonFlags="--prefix=$prefix $mesonFlags"
|
||
fi
|
||
|
||
# Build release by default.
|
||
if [ -n "@isCross@" ]; then
|
||
crossMesonFlags="--cross-file=@crossFile@/cross-file.conf"
|
||
fi
|
||
|
||
# See multiple-outputs.sh and meson’s coredata.py
|
||
mesonFlags="\
|
||
--libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \
|
||
--bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin \
|
||
--includedir=${!outputInclude}/include \
|
||
--mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \
|
||
--localedir=${!outputLib}/share/locale \
|
||
-Dauto_features=${mesonAutoFeatures:-enabled} \
|
||
$mesonFlags"
|
||
|
||
mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-release} $mesonFlags"
|
||
|
||
echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}"
|
||
|
||
CC=@cc@/bin/cc CXX=@cc@/bin/c++ meson build $mesonFlags "${mesonFlagsArray[@]}"
|
||
cd build
|
||
|
||
if ! [[ -v enableParallelBuilding ]]; then
|
||
enableParallelBuilding=1
|
||
echo "meson: enabled parallel building"
|
||
fi
|
||
|
||
runHook postConfigure
|
||
}
|
||
|
||
if [ -z "$dontUseMesonConfigure" -a -z "$configurePhase" ]; then
|
||
setOutputFlags=
|
||
configurePhase=mesonConfigurePhase
|
||
fi
|