summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2014-07-03 23:20:26 +0000
committerDavide Pesavento <pesa@gentoo.org>2014-07-03 23:20:26 +0000
commitd9aba43f4463d8e28873402f2cbde108aa872dbb (patch)
tree3961f559417b0040501e3b590a005817e6463fa1 /dev-qt
parentBumped EAPI to 5, converted deps to gx86-multilib, dropped bundled glibc/libs... (diff)
downloadgentoo-2-d9aba43f4463d8e28873402f2cbde108aa872dbb.tar.gz
gentoo-2-d9aba43f4463d8e28873402f2cbde108aa872dbb.tar.bz2
gentoo-2-d9aba43f4463d8e28873402f2cbde108aa872dbb.zip
Apply various patches wrt bugs #491226, #503880, #507124, and #514968.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xDADED6B2671CB57D!)
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtgui/ChangeLog10
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch38
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch22
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch33
-rw-r--r--dev-qt/qtgui/qtgui-4.8.5-r3.ebuild214
5 files changed, 316 insertions, 1 deletions
diff --git a/dev-qt/qtgui/ChangeLog b/dev-qt/qtgui/ChangeLog
index eac664345ebc..750d9044308e 100644
--- a/dev-qt/qtgui/ChangeLog
+++ b/dev-qt/qtgui/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-qt/qtgui
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtgui/ChangeLog,v 1.33 2014/06/08 13:29:42 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtgui/ChangeLog,v 1.34 2014/07/03 23:20:26 pesa Exp $
+
+*qtgui-4.8.5-r3 (03 Jul 2014)
+
+ 03 Jul 2014; Davide Pesavento <pesa@gentoo.org>
+ +files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch,
+ +files/qtgui-4.8.5-disable-gtk-theme-check.patch,
+ +files/qtgui-4.8.5-qclipboard-delay.patch, +qtgui-4.8.5-r3.ebuild:
+ Apply various patches wrt bugs #491226, #503880, #507124, and #514968.
08 Jun 2014; Davide Pesavento <pesa@gentoo.org> -qtgui-4.8.5-r1.ebuild:
Remove vulnerable version wrt bug #508984
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch b/dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch
new file mode 100644
index 000000000000..a54efef0d78b
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch
@@ -0,0 +1,38 @@
+From 0db65e148dcb4d5e5b98475f207d41a287c401a1 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Wed, 28 May 2014 00:22:55 -0400
+Subject: [PATCH] Cleanlooks style: Fix floating point exception
+
+In QCleanlooksStyle::drawControl, if indeterminate == true and
+rect.width() == 4, we will end up with slideWidth of zero, and
+take a mod by zero when calculating the value of step.
+
+This causes a crash in Quassel 0.10; see
+https://bugs.gentoo.org/show_bug.cgi?id=507124
+
+Instead, calculate slideWidth based on max(width, minWidth) where
+minWidth was already set as 4, ensuring that slideWidth >= 2.
+
+Change-Id: I6678789105e359fa26c99409f449cad0ba3bd0ae
+(cherry picked from qtstyleplugins/8ff2ac6035fb1d01f5c0054ba14afb949410e3a7)
+Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+---
+ src/gui/styles/qcleanlooksstyle.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
+index 504734a..3f665ca 100644
+--- a/src/gui/styles/qcleanlooksstyle.cpp
++++ b/src/gui/styles/qcleanlooksstyle.cpp
+@@ -1773,7 +1773,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
+ }
+ } else {
+ Q_D(const QCleanlooksStyle);
+- int slideWidth = ((rect.width() - 4) * 2) / 3;
++ int slideWidth = (qMax(rect.width() - 4, minWidth) * 2) / 3;
+ int step = ((d->animateStep * slideWidth) / d->animationFps) % slideWidth;
+ if ((((d->animateStep * slideWidth) / d->animationFps) % (2 * slideWidth)) >= slideWidth)
+ step = slideWidth - step;
+--
+2.0.0
+
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch b/dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch
new file mode 100644
index 000000000000..9a9f773537e4
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch
@@ -0,0 +1,22 @@
+diff -up qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp.qgtkstyle_disable_gtk_theme_check qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp
+--- qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp.qgtkstyle_disable_gtk_theme_check 2013-06-09 16:28:22.938840346 -0500
++++ qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp 2013-06-09 17:03:01.781125479 -0500
+@@ -503,18 +503,6 @@ void QGtkStylePrivate::initGtkWidgets()
+ return;
+ }
+
+- static QString themeName;
+- if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) {
+- themeName = getThemeName();
+-
+- if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
+- // Due to namespace conflicts with Qt3 and obvious recursion with Qt4,
+- // we cannot support the GTK_Qt Gtk engine
+- qWarning("QGtkStyle cannot be used together with the GTK_Qt engine.");
+- return;
+- }
+- }
+-
+ if (QGtkStylePrivate::gtk_init) {
+ // Gtk will set the Qt error handler so we have to reset it afterwards
+ x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch b/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch
new file mode 100644
index 000000000000..d46f8c541872
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch
@@ -0,0 +1,33 @@
+From a83ddc5212736f89a0b94667c495494fe6861d63 Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Mon, 16 Jun 2014 23:52:24 +1000
+Subject: Fix delay with QClipboard and useEventLoop.
+
+This manifests when using LibreOffice with KDE integration. When KFileDialog is
+open, the clipboard is repeatedly polled causing a visible delay since using
+QClipboard in "useEventLoop" mode adds 50ms delay to every single clipboard
+fetch.
+
+Change-Id: Id30cda7b983ae7c949fa270d04f772fa44fc21cd
+Task-number: QTBUG-38585
+---
+ src/gui/kernel/qclipboard_x11.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp
+index 14bf088..5f442b9 100644
+--- a/src/gui/kernel/qclipboard_x11.cpp
++++ b/src/gui/kernel/qclipboard_x11.cpp
+@@ -548,7 +548,8 @@ bool QX11Data::clipboardWaitForEvent(Window win, int type, XEvent *event, int ti
+ return false;
+
+ XSync(X11->display, false);
+- usleep(50000);
++ if (!XPending(X11->display))
++ usleep(5000);
+
+ now.start();
+
+--
+2.0.0
+
diff --git a/dev-qt/qtgui/qtgui-4.8.5-r3.ebuild b/dev-qt/qtgui/qtgui-4.8.5-r3.ebuild
new file mode 100644
index 000000000000..052923c3c690
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-4.8.5-r3.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtgui/qtgui-4.8.5-r3.ebuild,v 1.1 2014/07/03 23:20:26 pesa Exp $
+
+EAPI=5
+
+inherit eutils qt4-build
+
+DESCRIPTION="The GUI module for the Qt toolkit"
+SRC_URI+=" http://dev.gentoo.org/~pesa/patches/${PN}-systemtrayicon-plugin-system.patch"
+
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility cups egl +glib gtkstyle mng nas nis qt3support tiff trace xinerama +xv"
+
+REQUIRED_USE="
+ gtkstyle? ( glib )
+"
+
+# cairo[-qt4] is needed because of bug 454066
+RDEPEND="
+ app-admin/eselect-qtgraphicssystem
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,glib=,qt3support=]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=]
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/libpng:0=
+ sys-libs/zlib
+ virtual/jpeg:0
+ !aqua? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ cups? ( net-print/cups )
+ egl? ( media-libs/mesa[egl] )
+ glib? ( dev-libs/glib:2 )
+ gtkstyle? (
+ x11-libs/cairo[-qt4]
+ x11-libs/gtk+:2[aqua=]
+ )
+ mng? ( >=media-libs/libmng-1.0.9:= )
+ nas? ( >=media-libs/nas-1.5 )
+ tiff? ( media-libs/tiff:0 )
+ !<dev-qt/qthelp-4.8.5:4
+"
+DEPEND="${RDEPEND}
+ !aqua? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ xinerama? ( x11-proto/xineramaproto )
+ xv? ( x11-proto/videoproto )
+ )
+"
+PDEPEND="qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=] )"
+
+PATCHES=(
+ "${DISTDIR}/${PN}-systemtrayicon-plugin-system.patch" # bug 503880
+ "${FILESDIR}/${PN}-4.7.3-cups.patch" # bug 323257
+ "${FILESDIR}/${PN}-4.8.5-cleanlooks-floating-point-exception.patch" # bug 507124
+ "${FILESDIR}/${PN}-4.8.5-disable-gtk-theme-check.patch" # bug 491226
+ "${FILESDIR}/${PN}-4.8.5-dont-crash-on-broken-GIF-images.patch" # bug 508984
+ "${FILESDIR}/${PN}-4.8.5-keyboard-shortcuts.patch" # bug 477796
+ "${FILESDIR}/${PN}-4.8.5-qclipboard-delay.patch" # bug 514968
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/gui
+ src/scripttools
+ src/plugins/imageformats/gif
+ src/plugins/imageformats/ico
+ src/plugins/imageformats/jpeg
+ src/plugins/imageformats/tga
+ src/plugins/inputmethods"
+
+ QT4_EXTRACT_DIRECTORIES="
+ examples/desktop/systray
+ include
+ src"
+
+ use accessibility && QT4_TARGET_DIRECTORIES+=" src/plugins/accessible/widgets"
+ use mng && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/mng"
+ use tiff && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/tiff"
+ use trace && QT4_TARGET_DIRECTORIES+=" src/plugins/graphicssystems/trace tools/qttracereplay"
+
+ # mac version does not contain qtconfig?
+ [[ ${CHOST} != *-darwin* ]] && QT4_TARGET_DIRECTORIES+=" tools/qtconfig"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES} ${QT4_EXTRACT_DIRECTORIES}"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ qt4-build_src_prepare
+
+ # Add -xvideo to the list of accepted configure options
+ sed -i -e 's:|-xinerama|:&-xvideo|:' configure || die
+}
+
+src_configure() {
+ myconf="$(qt_use accessibility)
+ $(qt_use cups)
+ $(qt_use glib)
+ $(qt_use mng libmng system)
+ $(qt_use nas nas-sound system)
+ $(qt_use nis)
+ $(qt_use tiff libtiff system)
+ $(qt_use egl)
+ $(qt_use qt3support)
+ $(qt_use gtkstyle)
+ $(qt_use xinerama)
+ $(qt_use xv xvideo)"
+
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl"
+
+ # bug 367045
+ [[ ${CHOST} == *86*-apple-darwin* ]] && myconf+=" -no-ssse3"
+
+ qt4-build_src_configure
+
+ if use gtkstyle; then
+ sed -i -e 's:-I/usr/include/qt4 ::' src/gui/Makefile || die "sed failed"
+ fi
+
+ sed -i -e 's:-I/usr/include/qt4/QtGui ::' src/gui/Makefile || die "sed failed"
+}
+
+src_install() {
+ QCONFIG_ADD="
+ mitshm tablet x11sm xcursor xfixes xinput xkb xrandr xrender xshape xsync
+ fontconfig system-freetype gif png system-png jpeg system-jpeg
+ $(usev accessibility)
+ $(usev cups)
+ $(use mng && echo system-mng)
+ $(usev nas)
+ $(usev nis)
+ $(use tiff && echo system-tiff)
+ $(usev xinerama)
+ $(use xv && echo xvideo)"
+ QCONFIG_REMOVE="no-freetype no-gif no-jpeg no-png no-gui"
+ QCONFIG_DEFINE="$(use accessibility && echo QT_ACCESSIBILITY)
+ $(use cups && echo QT_CUPS)
+ $(use egl && echo QT_EGL)
+ QT_FONTCONFIG QT_FREETYPE
+ $(use gtkstyle && echo QT_STYLE_GTK)
+ QT_IMAGEFORMAT_JPEG QT_IMAGEFORMAT_PNG
+ $(use mng && echo QT_IMAGEFORMAT_MNG)
+ $(use nas && echo QT_NAS)
+ $(use nis && echo QT_NIS)
+ $(use tiff && echo QT_IMAGEFORMAT_TIFF)
+ QT_SESSIONMANAGER QT_SHAPE QT_TABLET QT_XCURSOR QT_XFIXES
+ $(use xinerama && echo QT_XINERAMA)
+ QT_XINPUT QT_XKB QT_XRANDR QT_XRENDER QT_XSYNC
+ $(use xv && echo QT_XVIDEO)"
+
+ qt4-build_src_install
+
+ # install private headers
+ if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+ insinto "${QTLIBDIR#${EPREFIX}}"/QtGui.framework/Headers/private/
+ else
+ insinto "${QTHEADERDIR#${EPREFIX}}"/QtGui/private
+ fi
+ find "${S}"/src/gui -type f -name '*_p.h' -exec doins {} +
+
+ if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+ # rerun to get links to headers right
+ fix_includes
+ fi
+
+ # touch the available graphics systems
+ dodir /usr/share/qt4/graphicssystems
+ echo "default" > "${ED}"/usr/share/qt4/graphicssystems/raster || die
+ echo "" > "${ED}"/usr/share/qt4/graphicssystems/native || die
+
+ newicon tools/qtconfig/images/appicon.png qtconfig.png
+ make_desktop_entry qtconfig 'Qt Configuration Tool' qtconfig 'Qt;Settings;DesktopSettings'
+
+ # bug 388551
+ if use gtkstyle; then
+ local tempfile=${T}/${PN}${SLOT}.sh
+ cat <<-EOF > "${tempfile}"
+ export GTK2_RC_FILES=\${HOME}/.gtkrc-2.0
+ EOF
+ insinto /etc/profile.d
+ doins "${tempfile}"
+ fi
+}
+
+pkg_postinst() {
+ qt4-build_pkg_postinst
+
+ # raster is the default graphicssystem, set it on first install
+ eselect qtgraphicssystem set raster --use-old
+}