From c534ed02c3202dd7417bd354c206ff9e480723bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Mon, 20 Feb 2017 22:14:28 +0100 Subject: [PATCH] qt-webkit: rebuild for fixed moc-qt4 Fixed moc-qt4 allows building qt-webkit again. Set the correct include paths for cross builds. Also use the same -std=gnu++98 which is used for qt itself. --- .../files/fix-saturated_arithmetic.patch | 20 +++++++++++++++++++ srcpkgs/qt-webkit/template | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/qt-webkit/files/fix-saturated_arithmetic.patch diff --git a/srcpkgs/qt-webkit/files/fix-saturated_arithmetic.patch b/srcpkgs/qt-webkit/files/fix-saturated_arithmetic.patch new file mode 100644 index 00000000000..f9a18220a99 --- /dev/null +++ b/srcpkgs/qt-webkit/files/fix-saturated_arithmetic.patch @@ -0,0 +1,20 @@ +--- qtwebkit-2.3.4/Source/WTF/wtf/SaturatedArithmetic.h 2014-09-24 13:42:05.000000000 +0200 ++++ qtwebkit-2.3.4/Source/WTF/wtf/SaturatedArithmetic.h 2017-02-19 16:27:58.343676787 +0100 +@@ -43,7 +43,7 @@ + + // Can only overflow if the signed bit of the two values match. If the signed + // bit of the result and one of the values differ it did overflow. +- if (!((ua ^ ub) >> 31) & (result ^ ua) >> 31) ++ if (~((ua ^ ub) >> 31) & ((result ^ ua) >> 31)) + result = std::numeric_limits::max() + (ua >> 31); + + return result; +@@ -57,7 +57,7 @@ + + // Can only overflow if the signed bit of the two values do not match. If the + // signed bit of the result and the first value differ it did overflow. +- if ((ua ^ ub) >> 31 & (result ^ ua) >> 31) ++ if (((ua ^ ub) >> 31) & ((result ^ ua) >> 31)) + result = std::numeric_limits::max() + (ua >> 31); + + return result; diff --git a/srcpkgs/qt-webkit/template b/srcpkgs/qt-webkit/template index 3fc2302ab4e..d6743b982ba 100644 --- a/srcpkgs/qt-webkit/template +++ b/srcpkgs/qt-webkit/template @@ -1,7 +1,7 @@ # Template file for 'qt-webkit' pkgname=qt-webkit version=2.3.4 -revision=4 +revision=6 _qtver=4.8.7 wrksrc="qtwebkit-${version}" create_wrksrc=yes @@ -24,6 +24,9 @@ if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" qt-devel qt-designer-devel" fi +# Use the same value for -std= as in qt +CXXFLAGS="-std=gnu++98" + post_extract() { patch -p1 < ${FILESDIR}/fix-gcc6.patch patch -p1 < ${FILESDIR}/fix-execinfo.patch @@ -63,6 +66,8 @@ do_build() { opts+=" --qmakearg=\"QMAKE_CXXFLAGS_RELEASE='$CXXFLAGS'\"" opts+=" --qmakearg=\"QMAKE_LFLAGS='$LDFLAGS'\"" opts+=" --qmakearg=\"QMAKE_LFLAGS_RELEASE='$LDFLAGS'\"" + opts+=" --qmakearg=\"QMAKE_INCDIR=${XBPS_CROSS_BASE}/usr/include\"" + opts+=" --qmakearg=\"QMAKE_INCDIR_QT=${XBPS_CROSS_BASE}/usr/include\"" fi export QTDIR=/usr export PATH="/usr/lib/qt/bin:$PATH"