3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/build-managers/meson/0.57/setup-hook.sh
AndersonTorres 1a53eeda71 meson: put 0.57 in a subdirectory
Meson is a delicate package. It needs some patches to properly work in Nixpkgs
and many packages have it as a dependency, from many small applications to
systemd (yay, mass rebuilds in sight!). Updating it is not a trivial and
harmless task.

Therefore, I took the paranoid way and encapsulate the current version in a
subdir, instead of the regular write-over procedure. This way, at the best we
can just remove the whole dir in the future, and at the worse we just maintain
duplicated code.
2021-12-14 16:37:25 -03:00

38 lines
1.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mesonConfigurePhase() {
runHook preConfigure
if [ -z "${dontAddPrefix-}" ]; then
mesonFlags="--prefix=$prefix $mesonFlags"
fi
# See multiple-outputs.sh and mesons 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} \
-Dwrap_mode=${mesonWrapMode:-nodownload} \
$mesonFlags"
mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-plain} $mesonFlags"
echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}"
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