From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1500774-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4B12515864F
	for <garchives@archives.gentoo.org>; Sun, 26 Mar 2023 11:56:43 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5E6EDE0825;
	Sun, 26 Mar 2023 11:56:42 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 3C041E0825
	for <gentoo-commits@lists.gentoo.org>; Sun, 26 Mar 2023 11:56:42 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 515BE3411AA
	for <gentoo-commits@lists.gentoo.org>; Sun, 26 Mar 2023 11:56:41 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BDDB38EB
	for <gentoo-commits@lists.gentoo.org>; Sun, 26 Mar 2023 11:56:39 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1679831507.285f11ea640a832e1e9905e317f089ed1f3b6fba.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-qt/qtgui/Manifest dev-qt/qtgui/qtgui-5.15.8-r4.ebuild
X-VCS-Directories: dev-qt/qtgui/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 285f11ea640a832e1e9905e317f089ed1f3b6fba
X-VCS-Branch: master
Date: Sun, 26 Mar 2023 11:56:39 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 6671b80a-f2f7-42aa-94c7-655df39cdeed
X-Archives-Hash: 3a85067bc54007f10216a82d805b334b

commit:     285f11ea640a832e1e9905e317f089ed1f3b6fba
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 26 11:37:47 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 26 11:51:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=285f11ea

dev-qt/qtgui: Add QImage null check when QOpenGLTexture converts

the image to RGBA8888. Fixes crash in driver(s), at least Nvidia.

QTBUG: https://bugreports.qt.io/browse/QTBUG-68884

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtgui/Manifest               |   1 +
 dev-qt/qtgui/qtgui-5.15.8-r4.ebuild | 177 ++++++++++++++++++++++++++++++++++++
 2 files changed, 178 insertions(+)

diff --git a/dev-qt/qtgui/Manifest b/dev-qt/qtgui/Manifest
index db6cd834f163..f65bdbf9d40c 100644
--- a/dev-qt/qtgui/Manifest
+++ b/dev-qt/qtgui/Manifest
@@ -1,3 +1,4 @@
 DIST qtbase-5.15-gentoo-patchset-3.tar.xz 3856 BLAKE2B 0752426f9bc2dfa1ab2bc246b29f5d00305df05175a7801d7d5eddacfa46fcb605d9a317547edc01d3ef339f6effc2fcee7549cb7aecced37f0098166c70dbe2 SHA512 2515bea53232e76ca3e40bdaf1dd52fdf452052a2f40002ee91360d1fcceea3c5c2f5a8d2a3bfc0f9c2bacd61460a632c5b351accd73fd37b64985593219148e
 DIST qtbase-5.15.8-gentoo-kde-5.tar.xz 793372 BLAKE2B f486a0275fdf4da28a88ba40b7e6f227267fa05e8f466f734f720e792de1796501d5f1fb4427a84ca2d709bfa07abd695ad59210f7fd11227b1bf465484736b8 SHA512 f51d7ee2d121acda1141b9816197afc57ac0176a12acc08a93c2a793694afb734f8f1ad280a5bf95170cf912e32edb4a6612befeb4198fec78a7e50bbb6a61cd
+DIST qtbase-5.15.8-gentoo-kde-6.tar.xz 796880 BLAKE2B 014fd9c9693fe1a5adc54f1d147db4bbb4bf6f5fbde5950a9586a6868d16b63b83cf24821c33fd2a325d6b70a1fa655b0fc0da7ef74ae175e278ebda1f8c9aa4 SHA512 910a7e42e13f33b53984b4f61c58e53c1cf0accfa9eb1e143cc011882fff6cab14fa7c66562396b3a929f5ec6ecf56724d74df34ac15f32cc4d8ae6cb8da797b
 DIST qtbase-everywhere-opensource-src-5.15.8.tar.xz 50259432 BLAKE2B cb1b790a384a5cad9a95fdc448e275d48a68c6ee2addf08b40f9963cc5762fd7ab15852dea8392dc76da39f1565c1e23ddb5875c280f0177e802082f4b4f7f2b SHA512 29e8877bafdbc908072209f1b27a5040b022e2b71f17f4ab4cecd570adeae21597f9af7f1d38758760f3cb30376eeb15c5f066bf02c6e9a9e3a4d07f967046ce

diff --git a/dev-qt/qtgui/qtgui-5.15.8-r4.ebuild b/dev-qt/qtgui/qtgui-5.15.8-r4.ebuild
new file mode 100644
index 000000000000..9e6464df2a92
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.8-r4.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != *9999* ]]; then
+	QT5_KDEPATCHSET_REV=6
+	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
+)
+
+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
+}