build-helper/qmake.sh: always quote build flags

Co-Authored-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
This commit is contained in:
newbluemoon 2021-10-14 21:05:10 +02:00 committed by Đoàn Trần Công Danh
parent cc384e0260
commit 0b217003e2
1 changed files with 5 additions and 11 deletions

View File

@ -66,14 +66,8 @@ _EOF
# makes sense together with the qmake build-helper
# and not to interfere with e.g. the qmake build-style
#
# XXX: Intentionally quote {C,CXX,LD}FLAGS here but not in native.
# - Cross Build:
# + base flags will be picked up from QMAKE_{C,CXX,LD}FLAGS
# + hardening flags will be picked up from environment variables
# - Native Build:
# + hardening flags will be picked up first (Makefile, qt.conf?)
# + base flags will be picked up from QMAKE_{C,CXX,LD}FLAGS
# Maybe there're better workaround, I don't know.
cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
#!/bin/sh
exec /usr/lib/qt5/bin/qmake "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt.conf" \\
@ -89,11 +83,11 @@ exec /usr/lib/qt5/bin/qmake \
PREFIX=/usr \
QT_INSTALL_PREFIX=/usr \
LIB=/usr/lib \
QMAKE_CC=$CC QMAKE_CXX=$CXX \
QMAKE_LINK=$CXX QMAKE_LINK_C=$CC \
QMAKE_CFLAGS+="${CFLAGS}" \
QMAKE_CXXFLAGS+="${CXXFLAGS}" \
QMAKE_LFLAGS+="${LDFLAGS}" \
QMAKE_CC="$CC" QMAKE_CXX="$CXX" \
QMAKE_LINK="$CXX" QMAKE_LINK_C="$CC" \
QMAKE_CFLAGS+="\${CFLAGS}" \
QMAKE_CXXFLAGS+="\${CXXFLAGS}" \
QMAKE_LFLAGS+="\${LDFLAGS}" \
CONFIG+=no_qt_rpath
_EOF
fi