qt: fix cross build with gcc7
This commit is contained in:
parent
e61cb1bfb6
commit
4f7ca6fa50
1 changed files with 10 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'qt'
|
# Template file for 'qt'
|
||||||
pkgname=qt
|
pkgname=qt
|
||||||
version=4.8.7
|
version=4.8.7
|
||||||
revision=23
|
revision=24
|
||||||
_distname=qt-everywhere-opensource-src
|
_distname=qt-everywhere-opensource-src
|
||||||
patch_args="-Np1"
|
patch_args="-Np1"
|
||||||
wrksrc=${_distname}-${version}
|
wrksrc=${_distname}-${version}
|
||||||
|
@ -21,7 +21,7 @@ makedepends="
|
||||||
depends="qtchooser hicolor-icon-theme icu-libs"
|
depends="qtchooser hicolor-icon-theme icu-libs"
|
||||||
replaces="qt-qtconfig>=0"
|
replaces="qt-qtconfig>=0"
|
||||||
|
|
||||||
CXXFLAGS="-std=gnu++98 -Wno-deprecated"
|
CXXFLAGS="-std=gnu++98 -Wno-deprecated -fno-delete-null-pointer-checks -fno-lifetime-dse"
|
||||||
|
|
||||||
if [ -n "$CROSS_BUILD" ]; then
|
if [ -n "$CROSS_BUILD" ]; then
|
||||||
hostmakedepends+=" qt-qmake qt-host-tools"
|
hostmakedepends+=" qt-qmake qt-host-tools"
|
||||||
|
@ -30,6 +30,9 @@ fi
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
local _opts _spec
|
local _opts _spec
|
||||||
|
echo "QMAKE_CXXFLAGS += -std=gnu++98" >> src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
|
||||||
|
echo "QMAKE_CXXFLAGS += -std=gnu++98" >> src/plugins/accessible/qaccessiblebase.pri
|
||||||
|
echo "QMAKE_LFLAGS += -Wl,-rpath-link,${wrksrc}/lib" >> mkspecs/features/help.prf
|
||||||
|
|
||||||
_opts+=" -confirm-license"
|
_opts+=" -confirm-license"
|
||||||
_opts+=" -opensource"
|
_opts+=" -opensource"
|
||||||
|
@ -152,16 +155,16 @@ _EOF
|
||||||
sed -i configure \
|
sed -i configure \
|
||||||
-e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ CC=gcc CXX=g++ LINK=g++ QMAKE_CFLAGS="$XBPS_CFLAGS" QMAKE_CXXFLAGS="$XBPS_CXXFLAGS" QMAKE_LFLAGS="$XBPS_LDFLAGS" )/' \
|
-e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ CC=gcc CXX=g++ LINK=g++ QMAKE_CFLAGS="$XBPS_CFLAGS" QMAKE_CXXFLAGS="$XBPS_CXXFLAGS" QMAKE_LFLAGS="$XBPS_LDFLAGS" )/' \
|
||||||
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
|
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
|
||||||
-e 's/5\*\|4\*\|3\.4\*)/6*|&/'
|
-e 's/5\*\|4\*\|3\.4\*)/8*|7*|6*|&/'
|
||||||
export PKG_CONFIG_PATH=${XBPS_CROSS_BASE}/usr/lib/pkgconfig:${XBPS_CROSS_BASE}/usr/share/pkgconfig
|
export PKG_CONFIG_PATH=${XBPS_CROSS_BASE}/usr/lib/pkgconfig:${XBPS_CROSS_BASE}/usr/share/pkgconfig
|
||||||
export PKG_CONFIG_LIBDIR=${XBPS_CROSS_BASE}/usr/lib/pkgconfig
|
export PKG_CONFIG_LIBDIR=${XBPS_CROSS_BASE}/usr/lib/pkgconfig
|
||||||
export PKG_CONFIG_SYSROOT_DIR=${XBPS_CROSS_BASE}
|
export PKG_CONFIG_SYSROOT_DIR=${XBPS_CROSS_BASE}
|
||||||
|
|
||||||
else
|
else
|
||||||
# qmake CFLAGS/LDFLAGS
|
# qmake CFLAGS/LDFLAGS
|
||||||
sed -i -e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ QMAKE_CFLAGS="$CFLAGS" QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_LFLAGS="$LDFLAGS" )/' \
|
sed -i configure \
|
||||||
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
|
-e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ QMAKE_CFLAGS="$CFLAGS" QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_LFLAGS="$LDFLAGS" )/' \
|
||||||
configure
|
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_opts+=" -nomake demos"
|
_opts+=" -nomake demos"
|
||||||
|
@ -179,7 +182,7 @@ _EOF
|
||||||
_opts+=" -no-pch"
|
_opts+=" -no-pch"
|
||||||
_opts+=" -no-rpath"
|
_opts+=" -no-rpath"
|
||||||
_opts+=" -optimized-qmake"
|
_opts+=" -optimized-qmake"
|
||||||
_opts+=" -reduce-relocations"
|
_opts+=" -no-reduce-relocations"
|
||||||
_opts+=" -dbus-linked"
|
_opts+=" -dbus-linked"
|
||||||
_opts+=" -v"
|
_opts+=" -v"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue