diff options
-rw-r--r-- | deps/PyQt5/.url | 2 | ||||
-rwxr-xr-x | deps/PyQt5/PyQt5.SlackBuild | 10 | ||||
-rwxr-xr-x | deps/grantlee/grantlee.SlackBuild | 2 | ||||
-rwxr-xr-x | deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild | 2 | ||||
-rwxr-xr-x | deps/phonon/phonon.SlackBuild | 2 | ||||
-rwxr-xr-x | deps/polkit-qt5-1/polkit-qt5-1.SlackBuild | 2 | ||||
-rw-r--r-- | deps/poppler/.url | 2 | ||||
-rw-r--r-- | deps/poppler/patches/poppler_cpp11.patch | 18 | ||||
-rwxr-xr-x | deps/poppler/poppler.SlackBuild | 141 | ||||
-rw-r--r-- | deps/poppler/slack-desc | 19 | ||||
-rw-r--r-- | deps/qca-qt5/.url | 2 | ||||
-rwxr-xr-x | deps/qca-qt5/qca-qt5.SlackBuild | 5 | ||||
-rw-r--r-- | deps/qca-qt5/qca_qiodevice.patch | 23 | ||||
-rw-r--r-- | deps/qt-gstreamer/.url | 1 | ||||
-rwxr-xr-x | deps/qt-gstreamer/qt-gstreamer.SlackBuild | 2 | ||||
-rwxr-xr-x | deps/qt5-webkit/qt5-webkit.SlackBuild | 8 | ||||
-rw-r--r-- | deps/qt5/.url | 2 | ||||
-rw-r--r-- | deps/qt5/patches/qt5.qtbug-49452.patch | 58 | ||||
-rw-r--r-- | deps/qt5/patches/qt5.qtbug-53237.patch | 90 | ||||
-rwxr-xr-x | deps/qt5/qt5.SlackBuild | 31 | ||||
-rwxr-xr-x | deps/sni-qt/sni-qt.SlackBuild | 2 |
21 files changed, 360 insertions, 64 deletions
diff --git a/deps/PyQt5/.url b/deps/PyQt5/.url index 2be86e4..a73d338 100644 --- a/deps/PyQt5/.url +++ b/deps/PyQt5/.url @@ -1,2 +1,2 @@ -http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.6/PyQt5_gpl-5.6.tar.gz +https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7/PyQt5_gpl-5.7.tar.gz diff --git a/deps/PyQt5/PyQt5.SlackBuild b/deps/PyQt5/PyQt5.SlackBuild index 7252b86..b0b39b3 100755 --- a/deps/PyQt5/PyQt5.SlackBuild +++ b/deps/PyQt5/PyQt5.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for PyQt # Copyright 2008 Aleksandar Samardzic <asamardzic@gmail.com> -# Copyright 2008, 2009, 2010, 2011, 2015 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -27,7 +27,7 @@ # Modified by Eric Hameleers <alien@slackware.com> PKGNAM=PyQt5 -VERSION=${VERSION:-5.6} +VERSION=${VERSION:-5.7} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:--j7} @@ -67,9 +67,9 @@ rm -rf ${PKGNAM}_gpl-$VERSION tar xvf $CWD/${PKGNAM}_gpl-$VERSION.tar.?z* || exit 1 cd ${PKGNAM}_gpl-$VERSION || exit 1 -# The additional include path was removed due to this line, -# resulting in "fatal error: dbus/dbus-arch-deps.h: No such file or directory" -sed -i '/target_config.dbus_inc_dirs = \[\]/d' configure.py +## The additional include path was removed due to this line, +## resulting in "fatal error: dbus/dbus-arch-deps.h: No such file or directory" +#sed -i '/target_config.dbus_inc_dirs = \[\]/d' configure.py chown -R root:root . find . \ diff --git a/deps/grantlee/grantlee.SlackBuild b/deps/grantlee/grantlee.SlackBuild index 27f1e41..b9445c8 100755 --- a/deps/grantlee/grantlee.SlackBuild +++ b/deps/grantlee/grantlee.SlackBuild @@ -26,7 +26,7 @@ PKGNAM=grantlee SRCNAM=grantlee VERSION=${VERSION:-5.1.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:--j7} diff --git a/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild b/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild index 68d613d..efec6bd 100755 --- a/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild +++ b/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild @@ -31,7 +31,7 @@ PKGNAM=libdbusmenu-qt5 VERSION=${VERSION:-r267_20140619} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} NUMJOBS=${NUMJOBS:--j7} diff --git a/deps/phonon/phonon.SlackBuild b/deps/phonon/phonon.SlackBuild index b3eecd9..a3850ea 100755 --- a/deps/phonon/phonon.SlackBuild +++ b/deps/phonon/phonon.SlackBuild @@ -26,7 +26,7 @@ PKGNAM=phonon VERSION=${VERSION:-4.9.0} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} NUMJOBS=${NUMJOBS:--j7} diff --git a/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild b/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild index 99f92a3..a9b7303 100755 --- a/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild +++ b/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild @@ -25,7 +25,7 @@ PKGNAM=polkit-qt5-1 VERSION=${VERSION:-50624e0_20160719git} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:--j7} diff --git a/deps/poppler/.url b/deps/poppler/.url new file mode 100644 index 0000000..ac32d25 --- /dev/null +++ b/deps/poppler/.url @@ -0,0 +1,2 @@ +https://poppler.freedesktop.org/poppler-0.46.0.tar.xz + diff --git a/deps/poppler/patches/poppler_cpp11.patch b/deps/poppler/patches/poppler_cpp11.patch new file mode 100644 index 0000000..2eeedd1 --- /dev/null +++ b/deps/poppler/patches/poppler_cpp11.patch @@ -0,0 +1,18 @@ +diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc +index 13d090c..9803d38 100644 +--- a/poppler/SplashOutputDev.cc ++++ b/poppler/SplashOutputDev.cc +@@ -94,6 +94,13 @@ extern "C" int unlink(char *filename); + #endif + #endif + ++#if __cplusplus > 199711L ++#include <cmath> ++#ifndef isfinite ++#define isfinite(x) std::isfinite(x) ++#endif ++#endif ++ + static inline void convertGfxColor(SplashColorPtr dest, + SplashColorMode colorMode, + GfxColorSpace *colorSpace, diff --git a/deps/poppler/poppler.SlackBuild b/deps/poppler/poppler.SlackBuild new file mode 100755 index 0000000..93891ea --- /dev/null +++ b/deps/poppler/poppler.SlackBuild @@ -0,0 +1,141 @@ +#!/bin/sh + +# Copyright 2006, 2007, 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +# Modified 2016 by Eric Hameleers <alien@slackware.com> + +PKGNAM=poppler +VERSION=${VERSION:-0.45.0} +BUILD=${BUILD:-2} +NUMJOBS=${NUMJOBS:-" -j7 "} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-${PKGNAM} +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP || exit 1 +rm -rf ${PKGNAM}-${VERSION} +tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1 +cd ${PKGNAM}-$VERSION || exit 1 + +# This is needed for compilation with c++11 compiler: +cat $CWD/patches/poppler_cpp11.patch | patch -p1 --verbose || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Adding " -std=c++11" to CXXFLAGS is needed for compiling against Qt 5.7: +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -std=c++11" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --enable-xpdf-headers \ + --enable-poppler-qt4 \ + --enable-poppler-qt5 \ + --enable-cairo-output \ + --mandir=/usr/man \ + --disable-static \ + --enable-zlib \ + --build=$TARGET + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +# Remove files that overlap with the xpdf package: +rm -f $PKG/usr/bin/pdfdetach $PKG/usr/man/man1/pdfdetach.1 + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Compress and link manpages, if any: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION +cp -a AUTHORS COPYING* INSTALL NEWS README README-XPDF TODO \ + $PKG/usr/doc/${PKGNAM}-$VERSION +( cd $PKG/usr/doc/${PKGNAM}-$VERSION + ln -s /usr/share/gtk-doc/html/poppler html ) + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz + diff --git a/deps/poppler/slack-desc b/deps/poppler/slack-desc new file mode 100644 index 0000000..c325956 --- /dev/null +++ b/deps/poppler/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +poppler: poppler (a library for rendering PDF documents) +poppler: +poppler: Poppler is a library based on the xpdf PDF viewer developed by Derek +poppler: Noonburg of Glyph and Cog, LLC. Since xpdf does not provide a shared +poppler: library, whenever a flaw was found potentially dozens of applications +poppler: incorporating code from xpdf would have to be patched. By providing +poppler: a centralized PDF library this duplicated effort will be eliminated. +poppler: +poppler: Homepage: http://poppler.freedesktop.org +poppler: +poppler: diff --git a/deps/qca-qt5/.url b/deps/qca-qt5/.url new file mode 100644 index 0000000..e63affd --- /dev/null +++ b/deps/qca-qt5/.url @@ -0,0 +1,2 @@ +http://download.kde.org/stable/qca/2.1.1/src/qca-2.1.1.tar.xz + diff --git a/deps/qca-qt5/qca-qt5.SlackBuild b/deps/qca-qt5/qca-qt5.SlackBuild index 2b73fcf..26e8990 100755 --- a/deps/qca-qt5/qca-qt5.SlackBuild +++ b/deps/qca-qt5/qca-qt5.SlackBuild @@ -24,7 +24,7 @@ PKGNAM=qca-qt5 SRCNAM=qca VERSION=${VERSION:-2.1.1} -BUILD=${BUILD:-4} +BUILD=${BUILD:-5} NUMJOBS=${NUMJOBS:--j6} # Automatically determine the architecture we're building on: @@ -60,9 +60,6 @@ rm -rf $SRCNAM-$VERSION tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1 cd $SRCNAM-$VERSION || exit 1 -## Add a missing include. Fixes build against Qt 5.5: -#cat $CWD/qca_qiodevice.patch | patch -p1 --verbose || exit 1 - chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ diff --git a/deps/qca-qt5/qca_qiodevice.patch b/deps/qca-qt5/qca_qiodevice.patch deleted file mode 100644 index e6b18a2..0000000 --- a/deps/qca-qt5/qca_qiodevice.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Hrvoje Senjan <hrvoje.senjan@gmail.com> -Date: Sat, 17 Jan 2015 19:12:18 +0000 -Subject: Add missing QIODevice include -X-Git-Url: http://quickgit.kde.org/?p=qca.git&a=commitdiff&h=7207e6285e932044cd66d49d0dc484666cfb0092 ---- -Add missing QIODevice include - -Fixes build with Qt 5.5 ---- - - ---- a/include/QtCrypto/qca_basic.h -+++ b/include/QtCrypto/qca_basic.h -@@ -35,6 +35,8 @@ - - #include "qca_core.h" - -+#include <QIODevice> -+ - // Qt5 comes with QStringLiteral for wrapping string literals, which Qt4 does - // not have. It is needed if the headers are built with QT_NO_CAST_FROM_ASCII. - // Defining it here as QString::fromUtf8 for convenience. - diff --git a/deps/qt-gstreamer/.url b/deps/qt-gstreamer/.url new file mode 100644 index 0000000..a31a2c5 --- /dev/null +++ b/deps/qt-gstreamer/.url @@ -0,0 +1 @@ +http://gstreamer.freedesktop.org/src/qt-gstreamer/qt-gstreamer-1.2.0.tar.xz diff --git a/deps/qt-gstreamer/qt-gstreamer.SlackBuild b/deps/qt-gstreamer/qt-gstreamer.SlackBuild index 62e17f7..2470b81 100755 --- a/deps/qt-gstreamer/qt-gstreamer.SlackBuild +++ b/deps/qt-gstreamer/qt-gstreamer.SlackBuild @@ -24,7 +24,7 @@ PKGNAM=qt-gstreamer VERSION=${VERSION:-1.2.0} -BUILD=${BUILD:-4} +BUILD=${BUILD:-5} NUMJOBS=${NUMJOBS:--j7} diff --git a/deps/qt5-webkit/qt5-webkit.SlackBuild b/deps/qt5-webkit/qt5-webkit.SlackBuild index df11112..59e9b9b 100755 --- a/deps/qt5-webkit/qt5-webkit.SlackBuild +++ b/deps/qt5-webkit/qt5-webkit.SlackBuild @@ -22,10 +22,10 @@ # Derived from the qt5.SlackBuild -# Modifications for qt5-webkit 5.6.0, 5.6.1 2016 by Eric Hameleers, Eindhoven, NL +# Modifications for qt5-webkit 5.6.0, 5.6.1, 5.7.0 2016 by Eric Hameleers, Eindhoven, NL PKGNAM=qt5-webkit -VERSION=${VERSION:-5.6.1} +VERSION=${VERSION:-5.7.0} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:--j7} @@ -84,8 +84,8 @@ echo "Extracting qtwebkit-opensource-src-$VERSION.tar.xz" tar xf $CWD/qtwebkit-opensource-src-$VERSION.tar.xz || exit 1 cd qtwebkit-opensource-src-$VERSION || exit 1 -# Fix linking to pthread: -cat $CWD/patches/qt5-webkit.pthread.patch | patch -p1 --verbose || exit 1 +## Fix linking to pthread: +#cat $CWD/patches/qt5-webkit.pthread.patch | patch -p1 --verbose || exit 1 chown -R root:root . find . \ diff --git a/deps/qt5/.url b/deps/qt5/.url index c819030..34da870 100644 --- a/deps/qt5/.url +++ b/deps/qt5/.url @@ -1 +1 @@ -http://download.qt.io/official_releases/qt/5.6/5.6.1-1/single/qt-everywhere-opensource-src-5.6.1-1.tar.xz +http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz diff --git a/deps/qt5/patches/qt5.qtbug-49452.patch b/deps/qt5/patches/qt5.qtbug-49452.patch new file mode 100644 index 0000000..4549ff1 --- /dev/null +++ b/deps/qt5/patches/qt5.qtbug-49452.patch @@ -0,0 +1,58 @@ +From 6f423555eba55ccdf7287071e10576bc1b687fd2 Mon Sep 17 00:00:00 2001 +From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> +Date: Mon, 1 Aug 2016 13:39:53 +0200 +Subject: [PATCH] REG: Fix unwanted cache flush in Freetype engine + +The Freetype cache was almost completely disabled by +134c6db8587a8ce156d4fa31ffa62605821851b2 because after that +change, the lockedAlphaMapForGlyph() function would no longer +cut off early for empty glyphs like spaces, but rather go +through all alpha map functions before it realized that there +was nothing to render. This would in turn invalidate the cache +for every empty glyph, causing all glyphs to be rerendered for +every isolated word. + +This change adds back a cut off. This is only needed in the +lockedAlphaMapForGlyph() function, since the superclass implementation +of the other alpha map functions already contains a cut off for +width/height == 0. + +[ChangeLog][Qt Gui][Text] Fixed a performance regression in Freetype +engine that was introduced in Qt 5.5. + +Change-Id: I381285939909e99cc5fb5f3497fecf9fa871f29a +Task-number: QTBUG-49452 +Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> +--- + src/gui/text/qfontengine_ft.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp +index 4de41df..7c878da 100644 +--- a/src/gui/text/qfontengine_ft.cpp ++++ b/src/gui/text/qfontengine_ft.cpp +@@ -1716,7 +1716,7 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe + + static inline QImage alphaMapFromGlyphData(QFontEngineFT::Glyph *glyph, QFontEngine::GlyphFormat glyphFormat) + { +- if (glyph == Q_NULLPTR) ++ if (glyph == Q_NULLPTR || glyph->height == 0 || glyph->width == 0) + return QImage(); + + QImage::Format format = QImage::Format_Invalid; +@@ -1764,11 +1764,15 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe + + currentlyLockedAlphaMap = alphaMapFromGlyphData(glyph, neededFormat); + ++ const bool glyphHasGeometry = glyph != Q_NULLPTR && glyph->height != 0 && glyph->width != 0; + if (!cacheEnabled && glyph != &emptyGlyph) { + currentlyLockedAlphaMap = currentlyLockedAlphaMap.copy(); + delete glyph; + } + ++ if (!glyphHasGeometry) ++ return Q_NULLPTR; ++ + if (currentlyLockedAlphaMap.isNull()) + return QFontEngine::lockedAlphaMapForGlyph(glyphIndex, subPixelPosition, neededFormat, t, offset); + diff --git a/deps/qt5/patches/qt5.qtbug-53237.patch b/deps/qt5/patches/qt5.qtbug-53237.patch new file mode 100644 index 0000000..c6d5739 --- /dev/null +++ b/deps/qt5/patches/qt5.qtbug-53237.patch @@ -0,0 +1,90 @@ +From 8e889378115c69508b050a511621ac8e30ec4158 Mon Sep 17 00:00:00 2001 +From: Jesus Fernandez <jesus.fernandez@theqtcompany.com> +Date: Mon, 13 Jun 2016 19:09:15 +0200 +Subject: [PATCH] Fix UNSIGNED values in QMYSQL + +The unsigned flag in columns was ignored when creating the list of +bound values in a mysql table. So the result iteration with +QSqlQuery::next stops after the first wrong truncated value. + +[ChangeLog][QtSql] Fixed QSqlQuery::prepare value truncation error when +using UNSIGNED values in a MySQL database. + +Task-number: QTBUG-53969 +Task-number: QTBUG-53237 +Change-Id: I10d977993445f2794f1dd8c88b2e83517ef524f3 +Reviewed-by: Milian Wolff <milian.wolff@kdab.com> +--- + src/sql/drivers/mysql/qsql_mysql.cpp | 1 + + tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 39 +++++++++++++++++++++++ + 2 files changed, 40 insertions(+) + +diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp +index 96bdcc4..55bf499 100644 +--- a/src/sql/drivers/mysql/qsql_mysql.cpp ++++ b/src/sql/drivers/mysql/qsql_mysql.cpp +@@ -387,6 +387,7 @@ bool QMYSQLResultPrivate::bindInValues() + bind->buffer_length = f.bufLength = fieldInfo->length + 1; + bind->is_null = &f.nullIndicator; + bind->length = &f.bufLength; ++ bind->is_unsigned = fieldInfo->flags & UNSIGNED_FLAG ? 1 : 0; + f.outField=field; + + ++i; +diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +index bd553d5..f1c4333 100644 +--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp ++++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +@@ -233,6 +233,9 @@ private slots: + void QTBUG_36211_data() { generic_data("QPSQL"); } + void QTBUG_36211(); + ++ void QTBUG_53969_data() { generic_data("QMYSQL"); } ++ void QTBUG_53969(); ++ + void sqlite_constraint_data() { generic_data("QSQLITE"); } + void sqlite_constraint(); + +@@ -3652,6 +3655,42 @@ void tst_QSqlQuery::QTBUG_36211() + } + } + ++void tst_QSqlQuery::QTBUG_53969() ++{ ++ QFETCH( QString, dbName ); ++ QVector<int> values = QVector<int>() << 10 << 20 << 127 << 128 << 1, tableValues; ++ QSqlDatabase db = QSqlDatabase::database( dbName ); ++ CHECK_DATABASE( db ); ++ tableValues.reserve(values.size()); ++ if (tst_Databases::getDatabaseType(db) == QSqlDriver::MySqlServer) { ++ const QString tableName(qTableName("bug53969", __FILE__, db)); ++ tst_Databases::safeDropTable( db, tableName ); ++ ++ QSqlQuery q(db); ++ QVERIFY_SQL(q, exec(QString("CREATE TABLE %1 (id INT AUTO_INCREMENT PRIMARY KEY, " ++ "test_number TINYINT(3) UNSIGNED)") ++ .arg(tableName))); ++ ++ QVERIFY_SQL(q, prepare("INSERT INTO " + tableName + " (test_number) VALUES (:value)")); ++ ++ QVector<int>::iterator begin = values.begin(), end = values.end(), it; ++ for (it = begin; it != end; ++it) { ++ q.bindValue(":value", *it); ++ QVERIFY_SQL(q, exec()); ++ } ++ ++ QVERIFY_SQL(q, prepare("SELECT test_number FROM " + tableName)); ++ QVERIFY_SQL(q, exec()); ++ ++ while (q.next()) { ++ bool ok; ++ tableValues.push_back(q.value(0).toUInt(&ok)); ++ QVERIFY(ok); ++ } ++ QCOMPARE(values, tableValues); ++ } ++} ++ + void tst_QSqlQuery::oraOCINumber() + { + QFETCH( QString, dbName ); diff --git a/deps/qt5/qt5.SlackBuild b/deps/qt5/qt5.SlackBuild index e7df254..9b57607 100755 --- a/deps/qt5/qt5.SlackBuild +++ b/deps/qt5/qt5.SlackBuild @@ -47,9 +47,10 @@ # Modifications for qt 5.5.1 2015,2016 by Eric Hameleers, Eindhoven, NL # Modifications for qt 5.6.0 2016 by Eric Hameleers, Eindhoven, NL # Modifications for qt 5.6.1 2016 by Eric Hameleers, Eindhoven, NL +# Modifications for qt 5.7.0 2016 by Eric Hameleers, Eindhoven, NL PKGNAM=qt5 -VERSION=${VERSION:-5.6.1-1} +VERSION=${VERSION:-5.7.0} PKGSRC=$(echo $VERSION |cut -d- -f1) PKGVER=$(echo $VERSION |tr - _) BUILD=${BUILD:-1} @@ -134,25 +135,15 @@ fi # Fix path to mysql header: cat $CWD/patches/qt5.mysql.h.diff | patch -p1 --verbose || exit 1 -## Properly detect ALSA version 1.1.0 as being newer than 1.0.10: -#cat $CWD/patches/qt5.alsa.patch | patch -p1 --verbose || exit 1 -# -## Build with explicitlib, preventing linker errors: -#cd qtbase -# cat $CWD/patches/qt5.qtbug-51621.patch | patch -p1 --verbose || exit 1 -#cd - -# -## Backport fixes for QtDBus deadlocks: -#cd qtbase -# cat $CWD/patches/qt5.qtbug-51648.patch | patch -p1 --verbose || exit 1 -# cat $CWD/patches/qt5.qtbug-51649.patch | patch -p1 --verbose || exit 1 -# cat $CWD/patches/qt5.qtbug-51676.patch | patch -p1 --verbose || exit 1 -#cd - -# -## qtwebengine fails to build with system nss 3.23: -#cd qtwebengine -# cat $CWD/patches/qt5.qtbug-51890.patch | patch -p1 --verbose || exit 1 -#cd - +# Fix UNSIGNED values in QMYSQL: +cd qtbase + cat $CWD/patches/qt5.qtbug-53237.patch | patch -p1 --verbose || exit 1 +cd - + +# Fix freetype engine performance: +cd qtbase + cat $CWD/patches/qt5.qtbug-49452.patch | patch -p1 --verbose || exit 1 +cd - if ! pkg-config --exists libpulse 2>/dev/null ; then # Forcibly disable pulseaudio in qtwebengine: diff --git a/deps/sni-qt/sni-qt.SlackBuild b/deps/sni-qt/sni-qt.SlackBuild index d1bb6a5..1d090f9 100755 --- a/deps/sni-qt/sni-qt.SlackBuild +++ b/deps/sni-qt/sni-qt.SlackBuild @@ -23,7 +23,7 @@ PKGNAM=sni-qt VERSION=${VERSION:-0.2.6} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} NUMJOBS=${NUMJOBS:--j6} # Automatically determine the architecture we're building on: |