qt6.qtbase: detect if file exists

This commit is contained in:
Weijia Wang 2023-01-15 03:38:03 +01:00
parent 0d5713c6d1
commit 54452b041d

View File

@ -269,7 +269,7 @@ stdenv.mkDerivation rec {
moveToOutput libexec "$dev"
# fixup .pc file (where to find 'moc' etc.)
if [ -d "$dev/lib/pkgconfig" ]; then
if [ -f "$dev/lib/pkgconfig/Qt6Core.pc" ]; then
sed -i "$dev/lib/pkgconfig/Qt6Core.pc" \
-e "/^bindir=/ c bindir=$dev/bin"
fi
@ -277,7 +277,9 @@ stdenv.mkDerivation rec {
patchShebangs $out $dev
# QTEST_ASSERT and other macros keeps runtime reference to qtbase.dev
substituteInPlace "$dev/include/QtTest/qtestassert.h" --replace "__FILE__" "__BASE_FILE__"
if [ -f "$dev/include/QtTest/qtestassert.h" ]; then
substituteInPlace "$dev/include/QtTest/qtestassert.h" --replace "__FILE__" "__BASE_FILE__"
fi
'';
dontStrip = debugSymbols;