mesa: don't fail if $dev/lib/pkgconfig/dri.pc doesn't exist

It may not, if we're not building DRI
This commit is contained in:
K900
2024-02-03 12:32:38 +03:00
parent 959fc00555
commit f3fab8ac98

View File

@@ -316,8 +316,9 @@ self = stdenv.mkDerivation {
postFixup = lib.optionalString stdenv.isLinux ''
# set the default search path for DRI drivers; used e.g. by X server
substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}"
[ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}"
for pc in lib/pkgconfig/{dri,d3d}.pc; do
[ -f "$dev/$pc" ] && substituteInPlace "$dev/$pc" --replace "$drivers" "${libglvnd.driverLink}"
done
# remove pkgconfig files for GL/EGL; they are provided by libGL.
rm -f $dev/lib/pkgconfig/{gl,egl}.pc