* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2016-02-14 16:29 Michael Palimaka
0 siblings, 0 replies; 14+ messages in thread
From: Michael Palimaka @ 2016-02-14 16:29 UTC (permalink / raw
To: gentoo-commits
commit: 293c6581f8173670b09ad92c903c4866565652a1
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 16:28:18 2016 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sun Feb 14 16:29:15 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=293c6581
dev-qt/qtgui: backport patch from upstream resolving crash
Gentoo-bug: 574636
Package-Manager: portage-2.2.27
dev-qt/qtgui/files/qtgui-5.5.1-crash.patch | 34 ++++++
dev-qt/qtgui/qtgui-5.5.1-r1.ebuild | 171 +++++++++++++++++++++++++++++
2 files changed, 205 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch b/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch
new file mode 100644
index 0000000..a2b8e62
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch
@@ -0,0 +1,34 @@
+From 79447068579ea93d616d840bb8cbbf8adb1ed6ec Mon Sep 17 00:00:00 2001
+From: Nicolas Capens <capn@google.com>
+Date: Tue, 10 Nov 2015 00:03:34 -0500
+Subject: Fix potential division by zero.
+
+In a Chrome Remote Desktop session the htotal and/or vtotal timings
+can be zero and lead to a SIGFPE exception.
+
+Task-number: QTBUG-49322
+Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
+Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com>
+Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
+---
+ src/plugins/platforms/xcb/qxcbscreen.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
+index 2a53b18..0e99d58 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
+@@ -558,7 +558,8 @@ void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mode)
+ for (; modesIter.rem; xcb_randr_mode_info_next(&modesIter)) {
+ xcb_randr_mode_info_t *modeInfo = modesIter.data;
+ if (modeInfo->id == mode) {
+- m_refreshRate = modeInfo->dot_clock / (modeInfo->htotal * modeInfo->vtotal);
++ const uint32_t dotCount = modeInfo->htotal * modeInfo->vtotal;
++ m_refreshRate = (dotCount != 0) ? modeInfo->dot_clock / dotCount : 0;
+ m_mode = mode;
+ break;
+ }
+--
+cgit v0.11.0
+
diff --git a/dev-qt/qtgui/qtgui-5.5.1-r1.ebuild b/dev-qt/qtgui/qtgui-5.5.1-r1.ebuild
new file mode 100644
index 0000000..2bf7dd1
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.5.1-r1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+# TODO: directfb, linuxfb, kms integration in eglfs
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 gtkstyle
+ ibus jpeg libinput +png tslib tuio +udev +xcb"
+REQUIRED_USE="
+ || ( eglfs xcb )
+ accessibility? ( dbus xcb )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}
+ media-libs/fontconfig
+ >=media-libs/freetype-2.5.5:2
+ >=media-libs/harfbuzz-0.9.40:=
+ >=sys-libs/zlib-1.2.5
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ evdev? ( sys-libs/mtdev )
+ gtkstyle? (
+ x11-libs/gtk+:2
+ x11-libs/pango
+ !!x11-libs/cairo[qt4]
+ )
+ gles2? ( media-libs/mesa[gles2] )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( x11-libs/tslib )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ xcb? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXi-1.7.4
+ x11-libs/libXrender
+ >=x11-libs/libxcb-1.10:=[xkb]
+ >=x11-libs/libxkbcommon-0.4.1[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-crash.patch" # bug 574636
+)
+
+QT5_TARGET_SUBDIRS=(
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+ src/plugins/platformthemes
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl
+ eglfs
+ evdev
+ evdev:mtdev:
+ :fontconfig
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2::OPENGL_ES
+ gles2:opengles2:OPENGL_ES_2
+ gtkstyle:gtkstyle:
+ gtkstyle:gtk2:STYLE_GTK
+ !:no-gui:
+ :system-harfbuzz:HARFBUZZ
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon-evdev:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib
+ udev:libudev:
+ xcb:xcb:
+ xcb:xcb-glx:
+ xcb:xcb-plugin:
+ xcb:xcb-render:
+ xcb:xcb-sm:
+ xcb:xcb-xlib:
+ xcb:xinput2:
+ xcb::XKB
+)
+
+src_prepare() {
+ # egl_x11 is activated when both egl and xcb are enabled
+ use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11)
+
+ # avoid automagic dep on qtdbus
+ use dbus || sed -i -e 's/contains(QT_CONFIG, dbus)/false/' \
+ src/platformsupport/platformsupport.pro || die
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ # avoid automagic dep on qtnetwork
+ use tuio || sed -i -e '/SUBDIRS += tuiotouch/d' \
+ src/plugins/generic/generic.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ $(qt_use gtkstyle)
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use libinput xkbcommon-evdev)
+ -opengl $(usex gles2 es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use xcb xcb system)
+ $(qt_use xcb xkbcommon-x11 system)
+ $(use xcb && echo -xcb-xlib -xinput2 -xkb -xrender)
+ )
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2017-06-10 6:01 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2017-06-10 6:01 UTC (permalink / raw
To: gentoo-commits
commit: 7fcf911785efe14cd9d217bfb3c8f1613b2ba6ea
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 9 19:41:32 2017 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 05:59:30 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fcf9117
dev-qt/qtgui: Fix QClipboard behaviour on XCB
This fix is also in 5.6.3 and >=5.8.0.
See also:
https://bugreports.qt.io/browse/QTBUG-56972
https://bugs.kde.org/show_bug.cgi?id=348390
Package-Manager: Portage-2.3.5, Repoman-2.3.1
dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch | 39 ++++++
dev-qt/qtgui/qtgui-5.7.1-r1.ebuild | 176 ++++++++++++++++++++++++
2 files changed, 215 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch b/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch
new file mode 100644
index 00000000000..42ee58b611f
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch
@@ -0,0 +1,39 @@
+From 291eba6f8099a0fec8fbd9cf8a1fb67e5c9f4f8d Mon Sep 17 00:00:00 2001
+From: Palo Kisa <palo.kisa@gmail.com>
+Date: Mon, 7 Nov 2016 18:27:17 +0100
+Subject: QClipboard: Fix emitting changed() in XCB
+
+In XCB environment the QClipboard::changed() was not delivered if the
+QClipboard::clear() was issued by other Qt app/process.
+
+If the QClipboard::clear() is used, then the owner in
+xcb_xfixes_selection_notify_event_t is XCB_NONE, so we need make the
+decission to handle this event by the selection_timestamp and our
+m_timestamp[mode].
+
+Task-number: QTBUG-56972
+Change-Id: If4c486ac02223eac506465cac7ff1a07bd02a187
+Reviewed-by: Lars Knoll <lars.knoll@qt.io>
+---
+ src/plugins/platforms/xcb/qxcbclipboard.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
+index d44ebae..40abef4 100644
+--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
++++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
+@@ -723,8 +723,10 @@ void QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve
+ if (mode > QClipboard::Selection)
+ return;
+
+- // here we care only about the xfixes events that come from non Qt processes
+- if (event->owner != XCB_NONE && event->owner != owner()) {
++ // Note1: Here we care only about the xfixes events that come from other processes.
++ // Note2: If the QClipboard::clear() is issued, event->owner is XCB_NONE,
++ // so we check selection_timestamp to not handle our own QClipboard::clear().
++ if (event->owner != owner() && event->selection_timestamp > m_timestamp[mode]) {
+ if (!m_xClipboard[mode]) {
+ m_xClipboard[mode].reset(new QXcbClipboardMime(mode, this));
+ } else {
+--
+cgit v1.0-4-g1e03
diff --git a/dev-qt/qtgui/qtgui-5.7.1-r1.ebuild b/dev-qt/qtgui/qtgui-5.7.1-r1.ebuild
new file mode 100644
index 00000000000..4f6524102f5
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.7.1-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 gtk
+ ibus jpeg libinput +png tslib tuio +udev +xcb"
+REQUIRED_USE="
+ || ( eglfs xcb )
+ accessibility? ( dbus xcb )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.0.6:=
+ >=sys-libs/zlib-1.2.5
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gtk? (
+ x11-libs/gtk+:3
+ x11-libs/libX11
+ x11-libs/pango
+ !!x11-libs/cairo[qt4]
+ )
+ gles2? ( media-libs/mesa[gles2] )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( x11-libs/tslib )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ xcb? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXi-1.7.4
+ x11-libs/libXrender
+ >=x11-libs/libxcb-1.10:=[xkb]
+ >=x11-libs/libxkbcommon-0.4.1[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+"
+
+PATCHES=( "${FILESDIR}/${P}-qclipboard.patch" ) # QTBUG-56972, KDE bug #348390
+
+QT5_TARGET_SUBDIRS=(
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+ src/plugins/platformthemes
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl
+ eglfs
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev
+ evdev:mtdev:
+ :fontconfig
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2::OPENGL_ES
+ gles2:opengles2:OPENGL_ES_2
+ gtk:gtk3:
+ !:no-gui:
+ :system-harfbuzz:HARFBUZZ
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon-evdev:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib
+ udev:libudev:
+ xcb:xcb:
+ xcb:xcb-glx:
+ xcb:xcb-plugin:
+ xcb:xcb-render:
+ xcb:xcb-sm:
+ xcb:xcb-xlib:
+ xcb:xinput2:
+ xcb::XKB
+ xcb:xrender
+)
+
+src_prepare() {
+ # egl_x11 is activated when both egl and xcb are enabled
+ use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11)
+
+ # avoid automagic dep on qtdbus
+ use dbus || sed -i -e 's/contains(QT_CONFIG, dbus)/false/' \
+ src/platformsupport/platformsupport.pro || die
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ # avoid automagic dep on qtnetwork
+ use tuio || sed -i -e '/SUBDIRS += tuiotouch/d' \
+ src/plugins/generic/generic.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ $(qt_use gtk)
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use libinput xkbcommon-evdev)
+ -opengl $(usex gles2 es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use xcb xcb system)
+ $(qt_use xcb xkbcommon-x11 system)
+ $(usex xcb '-xcb-xlib -xinput2 -xkb -xrender' '')
+ )
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2018-02-08 0:10 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2018-02-08 0:10 UTC (permalink / raw
To: gentoo-commits
commit: fbc5f96d8e4520254f41f380b7f603495231fb1a
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 7 15:56:18 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 8 00:01:13 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbc5f96d
dev-qt/qtgui: Fix libinput wheelevents
Patch taken from 5.9 branch (fixed in 5.9.5).
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=386762
Qt-Bug: https://bugreports.qt.io/browse/QTBUG-59261
See also: https://codereview.qt-project.org/#/c/212398/
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Closes: https://github.com/gentoo/gentoo/pull/7109
.../files/qtgui-5.9.4-libinput-pixeldelta.patch | 68 ++++++++
dev-qt/qtgui/qtgui-5.9.4-r2.ebuild | 174 +++++++++++++++++++++
2 files changed, 242 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.9.4-libinput-pixeldelta.patch b/dev-qt/qtgui/files/qtgui-5.9.4-libinput-pixeldelta.patch
new file mode 100644
index 00000000000..b9adb8b2f62
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.9.4-libinput-pixeldelta.patch
@@ -0,0 +1,68 @@
+From d196036024697a75868c1f1626525710495ca428 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen@qt.io>
+Date: Thu, 23 Nov 2017 14:25:04 +0100
+Subject: [PATCH] Avoid providing bad pixelDeltas on X11
+
+With libinput we now get a hardcoded resolution that is unrelated to
+the hardware. So avoid using that as a real pixel delta and document
+pixel deltas as being driver specific and unreliable on X11.
+
+Task-number: QTBUG-59261
+Change-Id: I9fe86d80e7ccd290ed2e4091d7eafa52cb537d34
+Reviewed-by: David Edmundson <davidedmundson@kde.org>
+Reviewed-by: Marco Martin <mart@kde.org>
+Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
+---
+ src/gui/kernel/qevent.cpp | 1 +
+ src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 14 ++++++++------
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
+index 06d52aa..c68f9af 100644
+--- a/src/gui/kernel/qevent.cpp
++++ b/src/gui/kernel/qevent.cpp
+@@ -971,6 +971,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
+ \li scrolling is about to begin, but the distance did not yet change (Qt::ScrollBegin),
+ \li or scrolling has ended and the distance did not change anymore (Qt::ScrollEnd).
+ \endlist
++ \note On X11 this value is driver specific and unreliable, use angleDelta() instead
+ */
+
+ /*!
+diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+index d1d97af..94f543f 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
++++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+@@ -953,10 +953,12 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
+ double delta = scrollingDevice.lastScrollPosition.y() - value;
+ scrollingDevice.lastScrollPosition.setY(value);
+ angleDelta.setY((delta / scrollingDevice.verticalIncrement) * 120);
+- // We do not set "pixel" delta if it is only measured in ticks.
+- if (scrollingDevice.verticalIncrement > 1)
++ // With most drivers the increment is 1 for wheels.
++ // For libinput it is hardcoded to a useless 15.
++ // For a proper touchpad driver it should be in the same order of magnitude as 120
++ if (scrollingDevice.verticalIncrement > 15)
+ rawDelta.setY(delta);
+- else if (scrollingDevice.verticalIncrement < -1)
++ else if (scrollingDevice.verticalIncrement < -15)
+ rawDelta.setY(-delta);
+ }
+ }
+@@ -965,10 +967,10 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
+ double delta = scrollingDevice.lastScrollPosition.x() - value;
+ scrollingDevice.lastScrollPosition.setX(value);
+ angleDelta.setX((delta / scrollingDevice.horizontalIncrement) * 120);
+- // We do not set "pixel" delta if it is only measured in ticks.
+- if (scrollingDevice.horizontalIncrement > 1)
++ // See comment under vertical
++ if (scrollingDevice.horizontalIncrement > 15)
+ rawDelta.setX(delta);
+- else if (scrollingDevice.horizontalIncrement < -1)
++ else if (scrollingDevice.horizontalIncrement < -15)
+ rawDelta.setX(-delta);
+ }
+ }
+--
+2.7.4
+
diff --git a/dev-qt/qtgui/qtgui-5.9.4-r2.ebuild b/dev-qt/qtgui/qtgui-5.9.4-r2.ebuild
new file mode 100644
index 00000000000..35f85253ada
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.9.4-r2.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus
+ jpeg +libinput +png tslib tuio +udev vnc +xcb"
+REQUIRED_USE="
+ || ( eglfs xcb )
+ accessibility? ( dbus xcb )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.0.6:=
+ >=sys-libs/zlib-1.2.5
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2? ( media-libs/mesa[gles2] )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( x11-libs/tslib )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ xcb? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXi-1.7.5
+ >=x11-libs/libxcb-1.10:=[xkb]
+ >=x11-libs/libxkbcommon-0.4.1[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-qsimpledrag.patch" # QTBUG-66103
+ "${FILESDIR}/${P}-libinput-pixeldelta.patch" # QTBUG-59261
+)
+
+QT5_TARGET_SUBDIRS=(
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl
+ eglfs
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev
+ evdev:mtdev:
+ :fontconfig
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2::OPENGL_ES
+ gles2:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:HARFBUZZ
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon-evdev:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib
+ udev:libudev:
+ xcb:xcb:
+ xcb:xcb-glx:
+ xcb:xcb-plugin:
+ xcb:xcb-render:
+ xcb:xcb-sm:
+ xcb:xcb-xlib:
+ xcb:xinput2:
+ xcb::XKB
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+src_prepare() {
+ # egl_x11 is activated when both egl and xcb are enabled
+ use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio udpsocket src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use libinput xkbcommon-evdev)
+ -opengl $(usex gles2 es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use xcb xcb system)
+ $(qt_use xcb xkbcommon-x11 system)
+ $(usex xcb '-xcb-xlib -xinput2 -xkb' '')
+ )
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2018-02-22 20:09 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2018-02-22 20:09 UTC (permalink / raw
To: gentoo-commits
commit: 037aded72a13031ce659eaaf6a40c43d2e5e3380
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 22 09:37:12 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 22 20:08:42 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=037aded7
dev-qt/qtgui: Bail if cached shader fails to load
Qt-Bug: https://bugreports.qt.io/browse/QTBUG-66420
See also: https://codereview.qt-project.org/#/c/221098
Package-Manager: Portage-2.3.24, Repoman-2.3.6
dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch | 87 ++++++++++++++
dev-qt/qtgui/qtgui-5.9.4-r3.ebuild | 175 ++++++++++++++++++++++++++++
2 files changed, 262 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch b/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch
new file mode 100644
index 00000000000..2a447414c21
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch
@@ -0,0 +1,87 @@
+From b63aeba4a88088c7de61c1664a510c02d38ade84 Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa <alarrosa@suse.com>
+Date: Fri, 16 Feb 2018 13:18:42 +0100
+Subject: [PATCH] opengl: Bail if cached shader fails to load
+
+QOpenGLProgramBinaryCache::setProgramBinary() should check
+GL_LINK_STATUS after glProgramBinary(), but doesn't.
+
+In practice, this means that SDDM is a white screen, and KDE is just
+a gray task bar.
+
+So far, Qt tries to check this using its internal ::link() function.
+But in case the cached binary fails to load, Qt currently attempts to
+link the inexistent program, resulting in a zero-length, fixed
+pipeline shader.
+
+Checking this already in ::setProgramBinary() makes the call to
+::link() superfluous, so we remove that as well.
+
+Done-with: Max Staudt <mstaudt@suse.com>
+Done-with: Michal Srb <msrb@suse.com>
+Done-with: Fabian Vogt <fvogt@suse.de>
+Task-number: QTBUG-66420
+Change-Id: Iabb51d0eb2c0c16bde696efff623e57d15f28d82
+Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
+Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
+(cherry picked from commit fa091640134b3ff99a9eb92df8286d15203122bf)
+---
+ src/gui/opengl/qopenglprogrambinarycache.cpp | 20 ++++++++++++++++++--
+ src/gui/opengl/qopenglshaderprogram.cpp | 8 +-------
+ 2 files changed, 19 insertions(+), 9 deletions(-)
+
+diff --git a/src/gui/opengl/qopenglprogrambinarycache.cpp b/src/gui/opengl/qopenglprogrambinarycache.cpp
+index 06373e1..d16173d 100644
+--- a/src/gui/opengl/qopenglprogrambinarycache.cpp
++++ b/src/gui/opengl/qopenglprogrambinarycache.cpp
+@@ -161,10 +161,26 @@ bool QOpenGLProgramBinaryCache::setProgramBinary(uint programId, uint blobFormat
+ QOpenGLExtraFunctions *funcs = QOpenGLContext::currentContext()->extraFunctions();
+ while (funcs->glGetError() != GL_NO_ERROR) { }
+ funcs->glProgramBinary(programId, blobFormat, p, blobSize);
+- int err = funcs->glGetError();
++
++ GLenum err = funcs->glGetError();
++ if (err != GL_NO_ERROR) {
++ qCDebug(DBG_SHADER_CACHE, "Program binary failed to load for program %u, size %d, "
++ "format 0x%x, err = 0x%x",
++ programId, blobSize, blobFormat, err);
++ return false;
++ }
++ GLint linkStatus = 0;
++ funcs->glGetProgramiv(programId, GL_LINK_STATUS, &linkStatus);
++ if (linkStatus != GL_TRUE) {
++ qCDebug(DBG_SHADER_CACHE, "Program binary failed to load for program %u, size %d, "
++ "format 0x%x, linkStatus = 0x%x, err = 0x%x",
++ programId, blobSize, blobFormat, linkStatus, err);
++ return false;
++ }
++
+ qCDebug(DBG_SHADER_CACHE, "Program binary set for program %u, size %d, format 0x%x, err = 0x%x",
+ programId, blobSize, blobFormat, err);
+- return err == 0;
++ return true;
+ }
+
+ #ifdef Q_OS_UNIX
+diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
+index cc8af16..3b82bac 100644
+--- a/src/gui/opengl/qopenglshaderprogram.cpp
++++ b/src/gui/opengl/qopenglshaderprogram.cpp
+@@ -3824,13 +3824,7 @@ bool QOpenGLShaderProgramPrivate::linkBinary()
+ bool needsCompile = true;
+ if (binCache.load(cacheKey, q->programId())) {
+ qCDebug(DBG_SHADER_CACHE, "Program binary received from cache");
+- linkBinaryRecursion = true;
+- bool ok = q->link();
+- linkBinaryRecursion = false;
+- if (ok)
+- needsCompile = false;
+- else
+- qCDebug(DBG_SHADER_CACHE, "Link failed after glProgramBinary");
++ needsCompile = false;
+ }
+
+ bool needsSave = false;
+--
+2.7.4
+
diff --git a/dev-qt/qtgui/qtgui-5.9.4-r3.ebuild b/dev-qt/qtgui/qtgui-5.9.4-r3.ebuild
new file mode 100644
index 00000000000..91c5ac088c3
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.9.4-r3.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus
+ jpeg +libinput +png tslib tuio +udev vnc +xcb"
+REQUIRED_USE="
+ || ( eglfs xcb )
+ accessibility? ( dbus xcb )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.0.6:=
+ >=sys-libs/zlib-1.2.5
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2? ( media-libs/mesa[gles2] )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( x11-libs/tslib )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ xcb? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXi-1.7.5
+ >=x11-libs/libxcb-1.10:=[xkb]
+ >=x11-libs/libxkbcommon-0.4.1[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-qsimpledrag.patch" # QTBUG-66103
+ "${FILESDIR}/${P}-libinput-pixeldelta.patch" # QTBUG-59261
+ "${FILESDIR}/${P}-opengl.patch" # QTBUG-66420
+)
+
+QT5_TARGET_SUBDIRS=(
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl
+ eglfs
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev
+ evdev:mtdev:
+ :fontconfig
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2::OPENGL_ES
+ gles2:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:HARFBUZZ
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon-evdev:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib
+ udev:libudev:
+ xcb:xcb:
+ xcb:xcb-glx:
+ xcb:xcb-plugin:
+ xcb:xcb-render:
+ xcb:xcb-sm:
+ xcb:xcb-xlib:
+ xcb:xinput2:
+ xcb::XKB
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+src_prepare() {
+ # egl_x11 is activated when both egl and xcb are enabled
+ use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio udpsocket src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use libinput xkbcommon-evdev)
+ -opengl $(usex gles2 es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use xcb xcb system)
+ $(qt_use xcb xkbcommon-x11 system)
+ $(usex xcb '-xcb-xlib -xinput2 -xkb' '')
+ )
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2018-10-30 17:46 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2018-10-30 17:46 UTC (permalink / raw
To: gentoo-commits
commit: c52c0909344d7ca52c08dcfbc8eb12e2f521620f
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 30 15:47:09 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 30 17:46:02 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c52c0909
dev-qt/qtgui: xcb: Don't get initial screen rotation
Qt-Bug: https://bugreports.qt.io/browse/QTBUG-70760
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=399053
Closes: https://bugs.gentoo.org/668994
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../files/qtgui-5.11.2-qapplication-block.patch | 53 +++++++
dev-qt/qtgui/qtgui-5.11.2-r1.ebuild | 172 +++++++++++++++++++++
2 files changed, 225 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.11.2-qapplication-block.patch b/dev-qt/qtgui/files/qtgui-5.11.2-qapplication-block.patch
new file mode 100644
index 00000000000..115b42b8e93
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.11.2-qapplication-block.patch
@@ -0,0 +1,53 @@
+From d4e937a6280f34bc1cce8c8cea3806a741312fbc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@wp.pl>
+Date: Tue, 25 Sep 2018 18:45:10 +0200
+Subject: xcb: Don't get initial screen rotation
+
+"xcb_randr_get_screen_info" can be slow and in some configurations can
+cause short mouse cursor freezes (which will happen on Qt application
+startup).
+
+Initial screen rotation was used only to not handle possible redundant
+screen change event.
+
+Fixes: QTBUG-70760
+Change-Id: I9f01325a045d2c82c4dd2fce91a18a34e54a4bcd
+Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
+---
+ src/plugins/platforms/xcb/qxcbscreen.cpp | 7 -------
+ src/plugins/platforms/xcb/qxcbscreen.h | 2 +-
+ 2 files changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
+index 7f2793b2b7..a696e2a311 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
+@@ -118,13 +118,6 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t
+
+ xcb_depth_next(&depth_iterator);
+ }
+-
+- if (connection->hasXRandr()) {
+- xcb_connection_t *conn = connection->xcb_connection();
+- auto screen_info = Q_XCB_REPLY(xcb_randr_get_screen_info, conn, screen->root);
+- if (screen_info)
+- m_rotation = screen_info->rotation;
+- }
+ }
+
+ QXcbVirtualDesktop::~QXcbVirtualDesktop()
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
+index 6438669e7a..792aca4b06 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.h
++++ b/src/plugins/platforms/xcb/qxcbscreen.h
+@@ -220,7 +220,7 @@ private:
+ xcb_randr_crtc_t m_crtc;
+ xcb_randr_mode_t m_mode = XCB_NONE;
+ bool m_primary = false;
+- uint8_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0;
++ uint8_t m_rotation = 0;
+
+ QString m_outputName;
+ QSizeF m_outputSizeMillimeters;
+--
+cgit v1.2.1
diff --git a/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild b/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild
new file mode 100644
index 00000000000..f3b8dc42d1b
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus
+ jpeg +libinput +png tslib tuio +udev vnc +xcb"
+REQUIRED_USE="
+ || ( eglfs xcb )
+ accessibility? ( dbus xcb )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.6.0:=
+ >=sys-libs/zlib-1.2.5
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2? ( media-libs/mesa[gles2] )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( x11-libs/tslib )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ xcb? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXi-1.7.5
+ >=x11-libs/libxcb-1.10:=[xkb]
+ >=x11-libs/libxkbcommon-0.4.1[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+"
+
+PATCHES=( "${FILESDIR}"/${P}-qapplication-block.patch ) # bug 668994
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl
+ eglfs
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev
+ evdev:mtdev:
+ :fontconfig
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2::OPENGL_ES
+ gles2:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:HARFBUZZ
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon-evdev:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib
+ udev:libudev:
+ xcb:xcb:
+ xcb:xcb-glx:
+ xcb:xcb-plugin:
+ xcb:xcb-render:
+ xcb:xcb-sm:
+ xcb:xcb-xlib:
+ xcb:xinput2:
+ xcb::XKB
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+src_prepare() {
+ # egl_x11 is activated when both egl and xcb are enabled
+ use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use libinput xkbcommon-evdev)
+ -opengl $(usex gles2 es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use xcb xcb system)
+ $(qt_use xcb xkbcommon-x11 system)
+ $(usex xcb '-xcb-xlib -xinput2 -xkb' '')
+ )
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2019-03-02 4:44 Mike Gilbert
0 siblings, 0 replies; 14+ messages in thread
From: Mike Gilbert @ 2019-03-02 4:44 UTC (permalink / raw
To: gentoo-commits
commit: 1488107891b5800d923f2cd45a3ceea693104052
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 2 04:43:36 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Mar 2 04:43:36 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14881078
dev-qt/qtgui: fix build with CXXFLAGS="-march=native"
Bug: https://bugs.gentoo.org/672946
Package-Manager: Portage-2.3.59_p2, Repoman-2.3.12_p67
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch | 29 +++++++++++++++++++++++++++++
dev-qt/qtgui/qtgui-5.12.1.ebuild | 4 ++++
2 files changed, 33 insertions(+)
diff --git a/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch b/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch
new file mode 100644
index 00000000000..41814c061a4
--- /dev/null
+++ b/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch
@@ -0,0 +1,29 @@
+From 3f302cb16ebfefade17b3ea90c5ed258c9150f3a Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 1 Mar 2019 21:37:52 -0500
+Subject: [PATCH] gcc: pass -mavx2 instead of -march=core-avx2
+
+Resolves a build failure when QMAKE_CXXFLAGS contains -march=native
+and the compiler is running on a CPU which does not support AVX2.
+
+Bug: https://bugs.gentoo.org/672946
+---
+ mkspecs/common/gcc-base.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
+index c2669e4833..44aa96af38 100644
+--- a/mkspecs/common/gcc-base.conf
++++ b/mkspecs/common/gcc-base.conf
+@@ -109,7 +109,7 @@ QMAKE_CFLAGS_MIPS_DSP += -mdsp
+ QMAKE_CFLAGS_MIPS_DSPR2 += -mdspr2
+
+ # -march=haswell is supported as of GCC 4.9 and Clang 3.6
+-QMAKE_CFLAGS_ARCH_HASWELL = -march=core-avx2
++QMAKE_CFLAGS_ARCH_HASWELL = -mavx2
+
+ # Wrapper tools that understand .o/.a files with GIMPLE instead of machine code
+ QMAKE_AR_LTCG = gcc-ar cqs
+--
+2.21.0.rc1
+
diff --git a/dev-qt/qtgui/qtgui-5.12.1.ebuild b/dev-qt/qtgui/qtgui-5.12.1.ebuild
index d0432526ea6..99baac703ae 100644
--- a/dev-qt/qtgui/qtgui-5.12.1.ebuild
+++ b/dev-qt/qtgui/qtgui-5.12.1.ebuild
@@ -122,6 +122,10 @@ QT5_GENTOO_PRIVATE_CONFIG=(
:gui
)
+PATCHES=(
+ "${FILESDIR}/qt-5.12-gcc-avx2.patch" # 672946
+)
+
src_prepare() {
# don't add -O3 to CXXFLAGS, bug 549140
sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2020-08-22 18:52 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2020-08-22 18:52 UTC (permalink / raw
To: gentoo-commits
commit: 621b799854a30f790193cf9f6177cb297048412a
Author: Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 20 12:03:19 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 18:52:22 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=621b7998
dev-qt/qtgui: fix CVE-2020-17507
Upstream commit: https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1616c719
Reported-by: John Helmert III (ajak) <jchelmert3 <AT> posteo.net>
Bug: https://bugs.gentoo.org/736924
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/17183
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch | 39 +++++
dev-qt/qtgui/qtgui-5.14.2-r1.ebuild | 185 +++++++++++++++++++++
dev-qt/qtgui/qtgui-5.15.0-r1.ebuild | 185 +++++++++++++++++++++
3 files changed, 409 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch b/dev-qt/qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch
new file mode 100644
index 00000000000..cad9aa4b682
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch
@@ -0,0 +1,39 @@
+From 1616c71921b73b227f56ccb3f2c49a994ec23440 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen@qt.io>
+Date: Thu, 23 Jul 2020 11:48:48 +0200
+Subject: Fix buffer overflow in XBM parser
+
+Avoid parsing over the buffer limit, or interpreting non-hex
+as hex.
+
+This still leaves parsing of lines longer than 300 chars
+unreliable
+
+Change-Id: I1c57a7e530c4380f6f9040b2ec729ccd7dc7a5fb
+Reviewed-by: Robert Loehning <robert.loehning@qt.io>
+Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
+(cherry picked from commit c562c1fc19629fb505acd0f6380604840b634211)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+---
+ src/gui/image/qxbmhandler.cpp | 4 ++-
+ .../gui/image/qimagereader/tst_qimagereader.cpp | 38 ++++++++++++++++++++++
+ 2 files changed, 41 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
+index f06561690c..72ce7f7ecd 100644
+--- a/src/gui/image/qxbmhandler.cpp
++++ b/src/gui/image/qxbmhandler.cpp
+@@ -159,7 +159,9 @@ static bool read_xbm_body(QIODevice *device, int w, int h, QImage *outImage)
+ w = (w+7)/8; // byte width
+
+ while (y < h) { // for all encoded bytes...
+- if (p) { // p = "0x.."
++ if (p && p < (buf + readBytes - 3)) { // p = "0x.."
++ if (!isxdigit(p[2]) || !isxdigit(p[3]))
++ return false;
+ *b++ = hex2byte(p+2);
+ p += 2;
+ if (++x == w && ++y < h) {
+--
+cgit v1.2.1
+
diff --git a/dev-qt/qtgui/qtgui-5.14.2-r1.ebuild b/dev-qt/qtgui/qtgui-5.14.2-r1.ebuild
new file mode 100644
index 00000000000..a676219df35
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.14.2-r1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+ +libinput +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.6.0:=
+ sys-libs/zlib:=
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2-only? ( media-libs/mesa[gles2] )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ >=x11-libs/libxkbcommon-0.5.0
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libxcb-1.12:=[xkb]
+ >=x11-libs/libxkbcommon-0.5.0[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( ~dev-qt/qtwayland-${PV} )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=(
+ "${FILESDIR}/qt-5.12-gcc-avx2.patch" # bug 672946
+ "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
+ "${FILESDIR}/${PN}-5.14.2-CVE-2020-17507.patch" # bug 736924
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb system)
+ $(usex X '-xcb-xlib -xcb-xinput -xkb' '')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtgui/qtgui-5.15.0-r1.ebuild b/dev-qt/qtgui/qtgui-5.15.0-r1.ebuild
new file mode 100644
index 00000000000..850f329c65a
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.0-r1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+ +libinput +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.6.0:=
+ sys-libs/zlib:=
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2-only? ( media-libs/mesa[gles2] )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ >=x11-libs/libxkbcommon-0.5.0
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libxcb-1.12:=[xkb]
+ >=x11-libs/libxkbcommon-0.5.0[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( ~dev-qt/qtwayland-${PV} )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=(
+ "${FILESDIR}/qt-5.12-gcc-avx2.patch" # bug 672946
+ "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
+ "${FILESDIR}/${PN}-5.14.2-CVE-2020-17507.patch" # bug 736924
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usex X '-xcb-xlib' '')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2020-10-04 16:07 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2020-10-04 16:07 UTC (permalink / raw
To: gentoo-commits
commit: 5e4b74cf31c4478d491f577d5746e4024b3ea552
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 2 19:36:04 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 4 15:54:06 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e4b74cf
dev-qt/qtgui: Fix multiscreen regression
"There is a bug in Qt 5.15.1 that seriously affects multiscreen. We get
a bunch of reports every day. Effectively a screen change signal goes
missing and Plasma naturally breaks."
See also: https://mail.kde.org/pipermail/distributions/2020-September/000866.html
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=426496
QTBUG: https://bugreports.qt.io/browse/QTBUG-86604
Cherry-picked from: https://codereview.qt-project.org/c/qt/qtbase/+/315721
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...-qscreen-geometrychanged-when-dpi-changes.patch | 86 ++++++++++
dev-qt/qtgui/qtgui-5.15.1-r1.ebuild | 185 +++++++++++++++++++++
2 files changed, 271 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch b/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch
new file mode 100644
index 00000000000..3e4187b22a0
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch
@@ -0,0 +1,86 @@
+From 65243ad7aef48af4689ea4454916b504025b5051 Mon Sep 17 00:00:00 2001
+From: Friedemann Kleint <Friedemann.Kleint@qt.io>
+Date: Fri, 25 Sep 2020 14:10:58 +0200
+Subject: [PATCH] Emit QScreen::geometryChanged when the logical DPI changes
+
+Add the missing call to QScreenPrivate::emitGeometryChangeSignals()
+along with an emission of physicalDotsPerInchChanged()
+since that is calculated from geometry and physical size.
+
+Rearrange the code in
+QGuiApplicationPrivate::processScreenGeometryChange()
+to prevent duplicate emissions of geometryChanged(),
+physicalDotsPerInchChanged() which this change would introduce.
+
+Amends 5290027e3bab75f14fc0a2b7c206594d9cb91e76.
+
+Task-number: QTBUG-76902
+Task-number: QTBUG-79248
+Fixes: QTBUG-86604
+Change-Id: I3dc2ec5ccd9c6413e92f9246242f323e8afc5e57
+Reviewed-by: David Edmundson <davidedmundson@kde.org>
+(cherry picked from commit 5c7307775d32ae0a54acad8ae7a1c9d3cff7d45e)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+---
+ src/gui/kernel/qguiapplication.cpp | 11 +++++------
+ src/gui/kernel/qscreen.cpp | 6 ++++++
+ 2 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
+index 239a78313c5..ef090605819 100644
+--- a/src/gui/kernel/qguiapplication.cpp
++++ b/src/gui/kernel/qguiapplication.cpp
+@@ -3162,13 +3162,14 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
+ bool availableGeometryChanged = e->availableGeometry != s->d_func()->availableGeometry;
+ s->d_func()->availableGeometry = e->availableGeometry;
+
+- if (geometryChanged) {
+- Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
++ const Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
++ if (geometryChanged)
+ s->d_func()->updatePrimaryOrientation();
+
+- emit s->geometryChanged(s->geometry());
++ s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
++
++ if (geometryChanged) {
+ emit s->physicalSizeChanged(s->physicalSize());
+- emit s->physicalDotsPerInchChanged(s->physicalDotsPerInch());
+ emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
+
+ if (s->primaryOrientation() != primaryOrientation)
+@@ -3178,8 +3179,6 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
+ updateFilteredScreenOrientation(s);
+ }
+
+- s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
+-
+ resetCachedDevicePixelRatio();
+ }
+
+diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
+index df628fcc73a..a1afc1ba143 100644
+--- a/src/gui/kernel/qscreen.cpp
++++ b/src/gui/kernel/qscreen.cpp
+@@ -88,6 +88,9 @@ void QScreenPrivate::updateGeometriesWithSignals()
+ void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availableGeometryChanged)
+ {
+ Q_Q(QScreen);
++ if (geometryChanged)
++ emit q->geometryChanged(geometry);
++
+ if (availableGeometryChanged)
+ emit q->availableGeometryChanged(availableGeometry);
+
+@@ -96,6 +99,9 @@ void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availa
+ for (QScreen* sibling : siblings)
+ emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
+ }
++
++ if (geometryChanged)
++ emit q->physicalDotsPerInchChanged(q->physicalDotsPerInch());
+ }
+
+ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
+--
+2.16.3
diff --git a/dev-qt/qtgui/qtgui-5.15.1-r1.ebuild b/dev-qt/qtgui/qtgui-5.15.1-r1.ebuild
new file mode 100644
index 00000000000..be95e1eff6b
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.1-r1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+ +libinput +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.6.0:=
+ sys-libs/zlib:=
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2-only? ( media-libs/mesa[gles2] )
+ !gles2-only? ( virtual/opengl )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ >=x11-libs/libxkbcommon-0.5.0
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libxcb-1.12:=[xkb]
+ >=x11-libs/libxkbcommon-0.5.0[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( ~dev-qt/qtwayland-${PV} )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=(
+ "${FILESDIR}/qt-5.12-gcc-avx2.patch" # bug 672946
+ "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
+ "${FILESDIR}/${P}-emit-qscreen-geometrychanged-when-dpi-changes.patch" # QTBUG-86604
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usex X '-xcb-xlib' '')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2021-01-02 1:23 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2021-01-02 1:23 UTC (permalink / raw
To: gentoo-commits
commit: c1656b6dcec27a716caf2b516e03c9d3fc2558c6
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 1 16:56:05 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jan 2 01:22:31 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1656b6d
dev-qt/qtgui: Drop bogus xcb-util build dep
See also: https://bugreports.qt.io/browse/QTBUG-88688
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/qtgui-5.15.2-bogus-xcb-util-dep.patch | 72 ++++++++
dev-qt/qtgui/qtgui-5.15.2-r1.ebuild | 188 +++++++++++++++++++++
2 files changed, 260 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.15.2-bogus-xcb-util-dep.patch b/dev-qt/qtgui/files/qtgui-5.15.2-bogus-xcb-util-dep.patch
new file mode 100644
index 00000000000..b7f65483fb1
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.2-bogus-xcb-util-dep.patch
@@ -0,0 +1,72 @@
+From 61b07d75f96d4dfb07b485b2a9bd7aed099df987 Mon Sep 17 00:00:00 2001
+From: Liang Qi <liang.qi@qt.io>
+Date: Tue, 1 Dec 2020 08:43:28 +0100
+Subject: [PATCH] Revert "xcb: add xcb-util dependency for xcb-image"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+This reverts commit adc42bebcac764ca8de78578e3a4ac39b621bd09.
+
+adc42beb is wrong, the bug is for static build of qt with static
+xcb. It adds the explicit dependency of xcb-util 0.3.9, which is
+not available on Debian yet.
+
+Task-number: QTBUG-86287
+Fixes: QTBUG-88688
+Change-Id: Iffc821f49bdfcad3f2556951d3677c35a7682266
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
+(adapted from commit 92a57e0b016f811876ec1d62328ca8edfe452a3a)
+---
+ src/gui/configure.json | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+diff --git a/src/gui/configure.json b/src/gui/configure.json
+index c8c4864eca6..1f08795c57b 100644
+--- a/src/gui/configure.json
++++ b/src/gui/configure.json
+@@ -601,15 +601,6 @@
+ ],
+ "use": "xcb"
+ },
+- "xcb_util": {
+- "label": "XCB Util >= 0.3.9",
+- "headers": "xcb/xcb_util.h",
+- "sources": [
+- { "type": "pkgConfig", "args": "xcb-util >= 0.3.9" },
+- "-lxcb-util"
+- ],
+- "use": "xcb"
+- },
+ "xcb_image": {
+ "label": "XCB Image >= 0.3.9",
+ "headers": "xcb/xcb_image.h",
+@@ -617,7 +608,7 @@
+ { "type": "pkgConfig", "args": "xcb-image >= 0.3.9" },
+ "-lxcb-image"
+ ],
+- "use": "xcb_shm xcb_util xcb"
++ "use": "xcb_shm xcb"
+ },
+ "xcb_keysyms": {
+ "label": "XCB Keysyms >= 0.3.9",
+@@ -1065,7 +1056,6 @@
+ "tail": "#undef explicit",
+ "include": [
+ "xcb/xcb.h",
+- "xcb/xcb_util.h",
+ "xcb/xcb_image.h",
+ "xcb/xcb_keysyms.h",
+ "xcb/randr.h",
+@@ -1097,7 +1087,7 @@
+ "xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof(nullptr, 0, 0, 0, 0, 0, 0, 0, 0);"
+ ]
+ },
+- "use": "xcb_icccm xcb_util xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xcb"
++ "use": "xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xcb"
+ },
+ "x11prefix": {
+ "label": "X11 prefix",
+--
+2.16.3
diff --git a/dev-qt/qtgui/qtgui-5.15.2-r1.ebuild b/dev-qt/qtgui/qtgui-5.15.2-r1.ebuild
new file mode 100644
index 00000000000..13063686d1c
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.2-r1.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+ +libinput +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+COMMON_DEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.6.0:=
+ sys-libs/zlib:=
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2-only? ( media-libs/mesa[gles2] )
+ !gles2-only? ( virtual/opengl )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ >=x11-libs/libxkbcommon-0.5.0
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libxcb-1.12:=[xkb]
+ >=x11-libs/libxkbcommon-0.5.0[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-qt/qtchooser
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( ~dev-qt/qtwayland-${PV} )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=(
+ "${FILESDIR}/qt-5.12-gcc-avx2.patch" # bug 672946
+ "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
+ "${FILESDIR}/${P}-bogus-xcb-util-dep.patch" # QTBUG-86287, QTBUG-88688
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usex X '-xcb-xlib' '')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2022-08-15 14:10 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2022-08-15 14:10 UTC (permalink / raw
To: gentoo-commits
commit: ae0a17684633d8932346d06c927cdcecc968b173
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 15 12:27:34 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Aug 15 14:09:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae0a1768
dev-qt/qtgui: xcb: Update _NET_SUPPORTED when the WM changes it
Upstream commit 97acde2828c8814671f4938e0c4805d945a4d110
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=449196
QTBUG: https://bugreports.qt.io/browse/QTBUG-91396
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...-update-_NET_SUPPORTED-when-WM-changes-it.patch | 38 +++++
dev-qt/qtgui/qtgui-5.15.5-r2.ebuild | 185 +++++++++++++++++++++
2 files changed, 223 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch b/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
new file mode 100644
index 000000000000..0d0acdf63a99
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
@@ -0,0 +1,38 @@
+From 97acde2828c8814671f4938e0c4805d945a4d110 Mon Sep 17 00:00:00 2001
+From: Tang Haixiang <tanghaixiang@uniontech.com>
+Date: Thu, 25 Feb 2021 18:05:17 +0800
+Subject: [PATCH] xcb: Update _NET_SUPPORTED when the window manager changes it
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In some cases, the application may start before the window manager, and in some window managers
+_NET_SUPPORTED may be changed. These situations will cause the _NET_SUPPORTED value obtained by Qt
+to be inconsistent with the window manager.
+
+Fixes: QTBUG-91396
+Change-Id: I63c6934ad2538cdb9f05926b3748216bd0dcf04e
+Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
+
+
+(cherry picked from commit acb0065cc7e4ee849cc87ce72e46b05a61370c43)
+---
+ src/plugins/platforms/xcb/qxcbconnection.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
+index 8477e28df1..6aa61e0d34 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
++++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
+@@ -659,6 +659,8 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
+ QXcbVirtualDesktop *virtualDesktop = virtualDesktopForRootWindow(propertyNotify->window);
+ if (virtualDesktop)
+ virtualDesktop->updateWorkArea();
++ } else if (propertyNotify->atom == atom(QXcbAtom::_NET_SUPPORTED)) {
++ m_wmSupport->updateNetWMAtoms();
+ } else {
+ HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent);
+ }
+--
+GitLab
+
diff --git a/dev-qt/qtgui/qtgui-5.15.5-r2.ebuild b/dev-qt/qtgui/qtgui-5.15.5-r2.ebuild
new file mode 100644
index 000000000000..0da032002fac
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.5-r2.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QT5_KDEPATCHSET_REV=2
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/${QT5_PV} # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+ +libinput linuxfb +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs linuxfb vnc X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ =dev-qt/qtcore-${QT5_PV}*:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/harfbuzz:=
+ sys-libs/zlib:=
+ dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+ eglfs? (
+ media-libs/mesa[gbm(+)]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ gles2-only? ( media-libs/libglvnd )
+ !gles2-only? ( media-libs/libglvnd[X] )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ udev? ( virtual/libudev:= )
+ vnc? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libxcb:=[xkb]
+ x11-libs/libxkbcommon[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ linuxfb? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( =dev-qt/qtwayland-${QT5_PV}* )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+# https://bugs.kde.org/show_bug.cgi?id=449196
+# https://bugreports.qt.io/browse/QTBUG-91396
+PATCHES=( # kde/5.15 branch
+ "${FILESDIR}/${P}"-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usev dbus -dbus-linked)
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usev eglfs '-gbm -kms')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usev !gif -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use linuxfb)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usev X '-xcb-xlib')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2022-12-10 12:25 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2022-12-10 12:25 UTC (permalink / raw
To: gentoo-commits
commit: c9e5d65c2ae4b112a738d9762849222d16d54fd5
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 12:09:58 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 12:23:48 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9e5d65c
dev-qt/qtgui: Fix wrong to linear conversion
QTBUG: https://bugreports.qt.io/browse/QTBUG-109169
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...gui-5.15.7-fix-wrong-to-linear-conversion.patch | 47 ++++++
dev-qt/qtgui/qtgui-5.15.7-r1.ebuild | 186 +++++++++++++++++++++
2 files changed, 233 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.15.7-fix-wrong-to-linear-conversion.patch b/dev-qt/qtgui/files/qtgui-5.15.7-fix-wrong-to-linear-conversion.patch
new file mode 100644
index 000000000000..e0ae71f90f3c
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.7-fix-wrong-to-linear-conversion.patch
@@ -0,0 +1,47 @@
+From a9e67318e6a8924c4b5461656bcc6a80720ae899 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen@qt.io>
+Date: Tue, 6 Dec 2022 10:42:59 +0100
+Subject: [PATCH] Fix wrong to linear conversion
+
+Causing bad rendering of gamma corrected text on non-standard image
+format paint devices.
+
+Pick-to: 6.4 6.2 5.15
+Fixes: QTBUG-109169
+Change-Id: I6d95e9a42b9ccac609071123dd4535d25e225a29
+Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
+Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
+(cherry picked from commit a09c33e1f7b5999a16bce9dd23ef8ca33d519210)
+---
+ src/gui/painting/qcolortrclut_p.h | 1 +
+ src/gui/painting/qdrawhelper.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/painting/qcolortrclut_p.h b/src/gui/painting/qcolortrclut_p.h
+index 76a6a60803..24fd522e6c 100644
+--- a/src/gui/painting/qcolortrclut_p.h
++++ b/src/gui/painting/qcolortrclut_p.h
+@@ -118,6 +118,7 @@ public:
+ return QRgba64::fromRgba64(r, g, b, qAlpha(rgb32) * 257);
+ #endif
+ }
++ QRgba64 toLinear64(QRgba64) const = delete;
+
+ QRgb toLinear(QRgb rgb32) const
+ {
+diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
+index a61793508a..5ba2d277b7 100644
+--- a/src/gui/painting/qdrawhelper.cpp
++++ b/src/gui/painting/qdrawhelper.cpp
+@@ -6091,7 +6091,7 @@ static inline void alphargbblend_argb32(quint32 *dst, uint coverage, const QRgba
+ static inline void rgbBlendPixel(QRgba64 &dst, int coverage, QRgba64 slinear, const QColorTrcLut *colorProfile)
+ {
+ // Do a gammacorrected RGB alphablend...
+- const QRgba64 dlinear = colorProfile ? colorProfile->toLinear64(dst) : dst;
++ const QRgba64 dlinear = colorProfile ? colorProfile->toLinear(dst) : dst;
+
+ QRgba64 blend = rgbBlend(dlinear, slinear, coverage);
+
+--
+2.38.1
+
diff --git a/dev-qt/qtgui/qtgui-5.15.7-r1.ebuild b/dev-qt/qtgui/qtgui-5.15.7-r1.ebuild
new file mode 100644
index 000000000000..8c0d97088139
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.7-r1.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != *9999* ]]; then
+ QT5_KDEPATCHSET_REV=1
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+SLOT=5/${QT5_PV} # bug 707658
+IUSE="accessibility dbus egl eglfs evdev gles2-only ibus jpeg +libinput
+ linuxfb +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs linuxfb vnc X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ =dev-qt/qtcore-${QT5_PV}*:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/harfbuzz:=
+ sys-libs/zlib:=
+ dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+ eglfs? (
+ media-libs/mesa[gbm(+)]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ gles2-only? ( media-libs/libglvnd )
+ !gles2-only? ( media-libs/libglvnd[X] )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ udev? ( virtual/libudev:= )
+ vnc? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libxcb:=
+ x11-libs/libxkbcommon[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ linuxfb? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( =dev-qt/qtwayland-${QT5_PV}* )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-wrong-to-linear-conversion.patch" # kde/5.15
+ # Approved but pending rebase:
+ # https://invent.kde.org/qt/qt/qtbase/-/merge_requests/211
+ "${FILESDIR}/${P}-xcb-correctly-disconnect-xsettings-callbacks.patch"
+ # Downstream workaround the fact that QT_CONFIG(dbus) does not work for us:
+ "${FILESDIR}/${P}-fix-no-dbus.patch"
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usev dbus -dbus-linked)
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usev eglfs '-gbm -kms')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use linuxfb)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usev X '-xcb-xlib')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2023-10-09 23:03 Ionen Wolkens
0 siblings, 0 replies; 14+ messages in thread
From: Ionen Wolkens @ 2023-10-09 23:03 UTC (permalink / raw
To: gentoo-commits
commit: e348405bae4e6094dc35832ecf58ff7c4c9d0485
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 9 22:54:52 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Oct 9 23:02:40 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e348405b
dev-qt/qtgui: fix build with >=libxkbcommon-1.6.0
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch | 14 ++++++++++++++
dev-qt/qtgui/qtgui-5.15.11.ebuild | 4 ++++
2 files changed, 18 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
new file mode 100644
index 000000000000..d0da76580df2
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
@@ -0,0 +1,14 @@
+These were removed in libxkbcommon-1.6.0[1] and were apparently
+unnecesary. Usage results in build failure.
+
+Just a quick fix while waiting for what [2] comes up with.
+
+[1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
+[2] https://bugreports.qt.io/browse/QTBUG-117950
+--- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
++++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
+@@ -276,4 +275,0 @@
+- Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>,
+- Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>,
+- Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>,
+- Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,
diff --git a/dev-qt/qtgui/qtgui-5.15.11.ebuild b/dev-qt/qtgui/qtgui-5.15.11.ebuild
index cf55be1bdcd7..e8ef3f8a6ff9 100644
--- a/dev-qt/qtgui/qtgui-5.15.11.ebuild
+++ b/dev-qt/qtgui/qtgui-5.15.11.ebuild
@@ -127,6 +127,10 @@ QT5_GENTOO_PRIVATE_CONFIG=(
:gui
)
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.15.11-xkbcommon160.patch
+)
+
src_prepare() {
# don't add -O3 to CXXFLAGS, bug 549140
sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2023-10-24 10:26 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2023-10-24 10:26 UTC (permalink / raw
To: gentoo-commits
commit: 2831b01de82a3cde65b5b96f2f73065cf6d691e5
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 24 09:47:53 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 24 10:25:42 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2831b01d
dev-qt/qtgui: (Non-)bump to QT5_KDEPATCHSET_REV=2
...just switching to upstream's patch.
Liang Qi (1):
xkb: fix build with libxkbcommon 1.6.0 and later
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
dev-qt/qtgui/Manifest | 2 +-
.../qtgui/files/qtgui-5.15.11-xkbcommon160.patch | 22 ----------------------
dev-qt/qtgui/qtgui-5.15.11.ebuild | 6 +-----
3 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/dev-qt/qtgui/Manifest b/dev-qt/qtgui/Manifest
index 12336c23f79a..53214af79b01 100644
--- a/dev-qt/qtgui/Manifest
+++ b/dev-qt/qtgui/Manifest
@@ -1,5 +1,5 @@
DIST qtbase-5.15-gentoo-patchset-4.tar.xz 4884 BLAKE2B ef1f11ea63084b834e19a9bd4c4a146e0d47f10e6c1f540a23db64ba6b0d42f46d63f54f93587deae9ac528f6824fa0e88177fe109a53aaee7d8328d49e364cd SHA512 1ae6630cef6bead9187aaaf7c420566b2c1f946bfa22cb983c52267c098e9b1c7b82c99204cbd3eed5eb6ebde0359726e260fd449618802735af465ca39f0a1d
DIST qtbase-5.15.10-gentoo-kde-3.tar.xz 747604 BLAKE2B 1d0f0be400504ef5e6f3c9cb5284ed85bf5bbf8b83f7d631fc06fb1622ef1b9750da9bda25b05e9426f64dabdad242181789785bbcdcf25c05abb931170e142a SHA512 6a65d717a9bfda7707c4b92bb42c9a7c4b587a31683cb911f6972bb0f149c83cdd827c25a6b0af791368f2c1b2471aab98618006d02b82ead10bd6bfe51f08f5
-DIST qtbase-5.15.11-gentoo-kde-1.tar.xz 324008 BLAKE2B 3ccd8645b5b727e4794fe4cb605d3db97159bf196b8e3e342ade364b701d6eb41e8e83ed608ec996480d7a82a43ddac098844dcecc9f122d63e9072abc21e9db SHA512 d145af982de89a34eaa15c5dc48ed927b5757e6a6d9bfa064a5cef40618465d7d6139ecaccb71944eac43926b977031034f6c22d4986f1e4a704007de9cb325d
+DIST qtbase-5.15.11-gentoo-kde-2.tar.xz 327120 BLAKE2B 38cf4106d620b28ab690de52dce7bbcf2da9de1009a0b126a68e19949013458ba788edd92a050410f9e33522be77e09eeeb95d4d696c3e482156dce5e120ee70 SHA512 235fb3baf660c551415300b5cc8a0d6091c7edd0a6f2c28bfb4e14bc63ada50203c0108cd8bd84b931860ee196cf83f68ec82a34509515c439ab989d80167d26
DIST qtbase-everywhere-opensource-src-5.15.10.tar.xz 50422688 BLAKE2B 2a625296967bef17d491a3ec8fbb4a3beaf00180a2cda728e485f796c801241798bd85dd06d57ca9fef26c591fe9910a2fcb83a67bbc17640b7393d280b9ce53 SHA512 94ac739d76dd9fff54cde46e818fee6c6763f8b207b759108455febff84c9dfeb48ea7807451d7248cbfd8af24c2a1263c34dcbd2be055136e39325e32725eef
DIST qtbase-everywhere-opensource-src-5.15.11.tar.xz 50825756 BLAKE2B 663d370d46a17939b984ef4c541414b81acdb98a2b7e67bb202c46891f9675e921723a025cef88b54b6111f235d94e273b97e1b55e2ca52b91e3eebca5ff7161 SHA512 4136092eec7bdceba661eee0187b7952ed6ba819148295979c0fd0392c17b0178165fa20136bdf460509a815c96f43892403294ba6e5322c54c51459c358fb7f
diff --git a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
deleted file mode 100644
index 0b5b3f964d57..000000000000
--- a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-These were removed in libxkbcommon-1.6.0[1] and were apparently
-unnecesary. Usage results in build failure.
-
-Just a quick fix while waiting for what [2] comes up with.
-
-Update: will be fixed by [3], see also [4]
-
-[1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
-[2] https://bugreports.qt.io/browse/QTBUG-117950
-[3] https://invent.kde.org/qt/qt/qtbase/-/merge_requests/290
-[4] https://bugs.gentoo.org/915510
---- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
-+++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
-@@ -276,4 +276,4 @@
-- Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>,
-- Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>,
-- Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>,
-- Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,
-+ Xkb2Qt<0xfe90, Qt::Key_Dead_Lowline>,
-+ Xkb2Qt<0xfe91, Qt::Key_Dead_Aboveverticalline>,
-+ Xkb2Qt<0xfe92, Qt::Key_Dead_Belowverticalline>,
-+ Xkb2Qt<0xfe93, Qt::Key_Dead_Longsolidusoverlay>,
diff --git a/dev-qt/qtgui/qtgui-5.15.11.ebuild b/dev-qt/qtgui/qtgui-5.15.11.ebuild
index e8ef3f8a6ff9..65519037df3e 100644
--- a/dev-qt/qtgui/qtgui-5.15.11.ebuild
+++ b/dev-qt/qtgui/qtgui-5.15.11.ebuild
@@ -4,7 +4,7 @@
EAPI=8
if [[ ${PV} != *9999* ]]; then
- QT5_KDEPATCHSET_REV=1
+ QT5_KDEPATCHSET_REV=2
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
@@ -127,10 +127,6 @@ QT5_GENTOO_PRIVATE_CONFIG=(
:gui
)
-PATCHES=(
- "${FILESDIR}"/${PN}-5.15.11-xkbcommon160.patch
-)
-
src_prepare() {
# don't add -O3 to CXXFLAGS, bug 549140
sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
@ 2024-02-15 15:25 Andreas Sturmlechner
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Sturmlechner @ 2024-02-15 15:25 UTC (permalink / raw
To: gentoo-commits
commit: a08e969a19e21838d80d19de94cb1e1108bd6122
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 15 13:02:50 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 15 15:24:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a08e969a
dev-qt/qtgui: Fix CVE-2024-25580
See also:
https://www.qt.io/blog/security-advisory-potential-buffer-overflow-when-reading-ktx-images
https://lists.qt-project.org/pipermail/announce/2024-February/000472.html
Bug: https://bugs.gentoo.org/924647
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch | 228 +++++++++++++++++++++
dev-qt/qtgui/qtgui-5.15.12-r2.ebuild | 182 ++++++++++++++++
2 files changed, 410 insertions(+)
diff --git a/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch b/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch
new file mode 100644
index 000000000000..41a500c82578
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch
@@ -0,0 +1,228 @@
+From c8061284095abebebbcd6fea7167477aef44a00c Mon Sep 17 00:00:00 2001
+From: Jonas Karlsson <jonas.karlsson@qt.io>
+Date: Thu, 8 Feb 2024 17:01:05 +0100
+Subject: [PATCH] Improve KTX file reading memory safety
+
+* Use qAddOverflow/qSubOverflow methods for catching additions and
+ subtractions with overflow and handle these scenarios when reading the
+ file.
+* Add 'safeView' method that checks that the byte array view constructed
+ is not out of bounds.
+* Return error if number of levels is higher than what is reasonable.
+* Return error if number of faces is incorrect.
+* Add unit test with invalid KTX file previously causing a segmentation
+ fault.
+
+This fixes CVE-2024-25580.
+
+Fixes: QTBUG-121918
+Pick-to: 6.7 6.6 6.5 6.2 5.15
+Change-Id: Ie0824c32a5921de30cf07c1fc1b49a084e6d07b2
+Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
+Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
+(cherry picked from commit 28ecb523ce8490bff38b251b3df703c72e057519)
+---
+ src/gui/util/qktxhandler.cpp | 138 +++++++++++++++++++++++++++--------
+ src/gui/util/qktxhandler_p.h | 2 +-
+ 2 files changed, 110 insertions(+), 30 deletions(-)
+
+diff --git a/src/gui/util/qktxhandler.cpp b/src/gui/util/qktxhandler.cpp
+index 7eda4c46fb..2853e46c3d 100644
+--- a/src/gui/util/qktxhandler.cpp
++++ b/src/gui/util/qktxhandler.cpp
+@@ -73,7 +73,7 @@ struct KTXHeader {
+ quint32 bytesOfKeyValueData;
+ };
+
+-static const quint32 headerSize = sizeof(KTXHeader);
++static constexpr quint32 qktxh_headerSize = sizeof(KTXHeader);
+
+ // Currently unused, declared for future reference
+ struct KTXKeyValuePairItem {
+@@ -103,11 +103,36 @@ struct KTXMipmapLevel {
+ */
+ };
+
+-bool QKtxHandler::canRead(const QByteArray &suffix, const QByteArray &block)
++static bool qAddOverflow(quint32 v1, quint32 v2, quint32 *r) {
++ // unsigned additions are well-defined
++ *r = v1 + v2;
++ return v1 > quint32(v1 + v2);
++}
++
++// Returns the nearest multiple of 4 greater than or equal to 'value'
++static bool nearestMultipleOf4(quint32 value, quint32 *result)
++{
++ constexpr quint32 rounding = 4;
++ *result = 0;
++ if (qAddOverflow(value, rounding - 1, result))
++ return true;
++ *result &= ~(rounding - 1);
++ return false;
++}
++
++// Returns a slice with prechecked bounds
++static QByteArray safeSlice(const QByteArray& array, quint32 start, quint32 length)
+ {
+- Q_UNUSED(suffix)
++ quint32 end = 0;
++ if (qAddOverflow(start, length, &end) || end > quint32(array.length()))
++ return {};
++ return QByteArray(array.data() + start, length);
++}
+
+- return (qstrncmp(block.constData(), ktxIdentifier, KTX_IDENTIFIER_LENGTH) == 0);
++bool QKtxHandler::canRead(const QByteArray &suffix, const QByteArray &block)
++{
++ Q_UNUSED(suffix);
++ return block.startsWith(QByteArray::fromRawData(ktxIdentifier, KTX_IDENTIFIER_LENGTH));
+ }
+
+ QTextureFileData QKtxHandler::read()
+@@ -115,42 +140,97 @@ QTextureFileData QKtxHandler::read()
+ if (!device())
+ return QTextureFileData();
+
+- QByteArray buf = device()->readAll();
+- const quint32 dataSize = quint32(buf.size());
+- if (dataSize < headerSize || !canRead(QByteArray(), buf)) {
+- qCDebug(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData());
++ const QByteArray buf = device()->readAll();
++ if (size_t(buf.size()) > std::numeric_limits<quint32>::max()) {
++ qWarning(lcQtGuiTextureIO, "Too big KTX file %s", logName().constData());
++ return QTextureFileData();
++ }
++
++ if (!canRead(QByteArray(), buf)) {
++ qWarning(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData());
++ return QTextureFileData();
++ }
++
++ if (buf.size() < qsizetype(qktxh_headerSize)) {
++ qWarning(lcQtGuiTextureIO, "Invalid KTX header size in %s", logName().constData());
+ return QTextureFileData();
+ }
+
+- const KTXHeader *header = reinterpret_cast<const KTXHeader *>(buf.constData());
+- if (!checkHeader(*header)) {
+- qCDebug(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData());
++ KTXHeader header;
++ memcpy(&header, buf.data(), qktxh_headerSize);
++ if (!checkHeader(header)) {
++ qWarning(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData());
+ return QTextureFileData();
+ }
+
+ QTextureFileData texData;
+ texData.setData(buf);
+
+- texData.setSize(QSize(decode(header->pixelWidth), decode(header->pixelHeight)));
+- texData.setGLFormat(decode(header->glFormat));
+- texData.setGLInternalFormat(decode(header->glInternalFormat));
+- texData.setGLBaseInternalFormat(decode(header->glBaseInternalFormat));
+-
+- texData.setNumLevels(decode(header->numberOfMipmapLevels));
+- quint32 offset = headerSize + decode(header->bytesOfKeyValueData);
+- const int maxLevels = qMin(texData.numLevels(), 32); // Cap iterations in case of corrupt file.
+- for (int i = 0; i < maxLevels; i++) {
+- if (offset + sizeof(KTXMipmapLevel) > dataSize) // Corrupt file; avoid oob read
+- break;
+- const KTXMipmapLevel *level = reinterpret_cast<const KTXMipmapLevel *>(buf.constData() + offset);
+- quint32 levelLen = decode(level->imageSize);
+- texData.setDataOffset(offset + sizeof(KTXMipmapLevel::imageSize), i);
+- texData.setDataLength(levelLen, i);
+- offset += sizeof(KTXMipmapLevel::imageSize) + levelLen + (3 - ((levelLen + 3) % 4));
++ texData.setSize(QSize(decode(header.pixelWidth), decode(header.pixelHeight)));
++ texData.setGLFormat(decode(header.glFormat));
++ texData.setGLInternalFormat(decode(header.glInternalFormat));
++ texData.setGLBaseInternalFormat(decode(header.glBaseInternalFormat));
++
++ texData.setNumLevels(decode(header.numberOfMipmapLevels));
++
++ const quint32 bytesOfKeyValueData = decode(header.bytesOfKeyValueData);
++ quint32 headerKeyValueSize;
++ if (qAddOverflow(qktxh_headerSize, bytesOfKeyValueData, &headerKeyValueSize)) {
++ qWarning(lcQtGuiTextureIO, "Overflow in size of key value data in header of KTX file %s",
++ logName().constData());
++ return QTextureFileData();
++ }
++
++ if (headerKeyValueSize >= quint32(buf.size())) {
++ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
++ return QTextureFileData();
++ }
++
++ // Technically, any number of levels is allowed but if the value is bigger than
++ // what is possible in KTX V2 (and what makes sense) we return an error.
++ // maxLevels = log2(max(width, height, depth))
++ const int maxLevels = (sizeof(quint32) * 8)
++ - qCountLeadingZeroBits(std::max(
++ { header.pixelWidth, header.pixelHeight, header.pixelDepth }));
++
++ if (texData.numLevels() > maxLevels) {
++ qWarning(lcQtGuiTextureIO, "Too many levels in KTX file %s", logName().constData());
++ return QTextureFileData();
++ }
++
++ quint32 offset = headerKeyValueSize;
++ for (int level = 0; level < texData.numLevels(); level++) {
++ const auto imageSizeSlice = safeSlice(buf, offset, sizeof(quint32));
++ if (imageSizeSlice.isEmpty()) {
++ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
++ return QTextureFileData();
++ }
++
++ const quint32 imageSize = decode(qFromUnaligned<quint32>(imageSizeSlice.data()));
++ offset += sizeof(quint32); // overflow checked indirectly above
++
++ texData.setDataOffset(offset, level);
++ texData.setDataLength(imageSize, level);
++
++ // Add image data and padding to offset
++ quint32 padded = 0;
++ if (nearestMultipleOf4(imageSize, &padded)) {
++ qWarning(lcQtGuiTextureIO, "Overflow in KTX file %s", logName().constData());
++ return QTextureFileData();
++ }
++
++ quint32 offsetNext;
++ if (qAddOverflow(offset, padded, &offsetNext)) {
++ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
++ return QTextureFileData();
++ }
++
++ offset = offsetNext;
+ }
+
+ if (!texData.isValid()) {
+- qCDebug(lcQtGuiTextureIO, "Invalid values in header of KTX file %s", logName().constData());
++ qWarning(lcQtGuiTextureIO, "Invalid values in header of KTX file %s",
++ logName().constData());
+ return QTextureFileData();
+ }
+
+@@ -191,7 +271,7 @@ bool QKtxHandler::checkHeader(const KTXHeader &header)
+ (decode(header.numberOfFaces) == 1));
+ }
+
+-quint32 QKtxHandler::decode(quint32 val)
++quint32 QKtxHandler::decode(quint32 val) const
+ {
+ return inverseEndian ? qbswap<quint32>(val) : val;
+ }
+diff --git a/src/gui/util/qktxhandler_p.h b/src/gui/util/qktxhandler_p.h
+index 19f7b0e79a..8da990aaac 100644
+--- a/src/gui/util/qktxhandler_p.h
++++ b/src/gui/util/qktxhandler_p.h
+@@ -68,7 +68,7 @@ public:
+
+ private:
+ bool checkHeader(const KTXHeader &header);
+- quint32 decode(quint32 val);
++ quint32 decode(quint32 val) const;
+
+ bool inverseEndian = false;
+ };
+--
+2.43.0
+
diff --git a/dev-qt/qtgui/qtgui-5.15.12-r2.ebuild b/dev-qt/qtgui/qtgui-5.15.12-r2.ebuild
new file mode 100644
index 000000000000..3ee7968082e2
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.12-r2.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != *9999* ]]; then
+ QT5_KDEPATCHSET_REV=3
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+SLOT=5/${QT5_PV} # bug 707658
+IUSE="accessibility dbus egl eglfs evdev gles2-only ibus jpeg +libinput
+ linuxfb +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs linuxfb vnc wayland X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ =dev-qt/qtcore-${QT5_PV}*:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/harfbuzz:=
+ sys-libs/zlib:=
+ accessibility? ( app-accessibility/at-spi2-core:2 )
+ dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+ eglfs? (
+ media-libs/mesa[gbm(+)]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ gles2-only? ( media-libs/libglvnd )
+ !gles2-only? ( media-libs/libglvnd[X] )
+ libinput? (
+ dev-libs/libinput:=
+ x11-libs/libxkbcommon
+ )
+ png? ( media-libs/libpng:= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ udev? ( virtual/libudev:= )
+ vnc? ( =dev-qt/qtnetwork-${QT5_PV}* )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libxcb:=
+ x11-libs/libxkbcommon[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ linuxfb? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+ X? ( x11-base/xorg-proto )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( =dev-qt/qtwayland-${QT5_PV}* )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=( "${FILESDIR}/${P}-CVE-2024-25580.patch" ) # bug 924647
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(qt_use accessibility feature-accessibility-atspi-bridge)
+ $(usev dbus -dbus-linked)
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usev eglfs '-gbm -kms')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ $(qt_use linuxfb)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usev X '-xcb-xlib')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-02-15 15:25 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-02 4:44 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/ Mike Gilbert
-- strict thread matches above, loose matches on Subject: below --
2024-02-15 15:25 Andreas Sturmlechner
2023-10-24 10:26 Andreas Sturmlechner
2023-10-09 23:03 Ionen Wolkens
2022-12-10 12:25 Andreas Sturmlechner
2022-08-15 14:10 Andreas Sturmlechner
2021-01-02 1:23 Andreas Sturmlechner
2020-10-04 16:07 Andreas Sturmlechner
2020-08-22 18:52 Andreas Sturmlechner
2018-10-30 17:46 Andreas Sturmlechner
2018-02-22 20:09 Andreas Sturmlechner
2018-02-08 0:10 Andreas Sturmlechner
2017-06-10 6:01 Andreas Sturmlechner
2016-02-14 16:29 Michael Palimaka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox