summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-02-03 21:39:54 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-02-03 21:40:46 +0100
commit63b752597393bbb7720bee365a94712017afc5ce (patch)
treeef8c5000240c22b862000343c8555760126e5ada /dev-libs/kuserfeedback
parentdev-python/nuitka: add 0.6.19.6 (diff)
downloadgentoo-63b752597393bbb7720bee365a94712017afc5ce.tar.gz
gentoo-63b752597393bbb7720bee365a94712017afc5ce.tar.bz2
gentoo-63b752597393bbb7720bee365a94712017afc5ce.zip
dev-libs/kuserfeedback: Fix opengl crash
Upstream commit 17db7d75643b4f3dccd5b36a6ab175f03ba74297 See also: https://mail.kde.org/pipermail/distributions/2022-February/001123.html KDE-bug: https://bugs.kde.org/show_bug.cgi?id=449505 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-libs/kuserfeedback')
-rw-r--r--dev-libs/kuserfeedback/files/kuserfeedback-1.0.0-fix-opengl-crash.patch39
-rw-r--r--dev-libs/kuserfeedback/kuserfeedback-1.0.0-r1.ebuild59
2 files changed, 98 insertions, 0 deletions
diff --git a/dev-libs/kuserfeedback/files/kuserfeedback-1.0.0-fix-opengl-crash.patch b/dev-libs/kuserfeedback/files/kuserfeedback-1.0.0-fix-opengl-crash.patch
new file mode 100644
index 000000000000..57321355b23a
--- /dev/null
+++ b/dev-libs/kuserfeedback/files/kuserfeedback-1.0.0-fix-opengl-crash.patch
@@ -0,0 +1,39 @@
+From 17db7d75643b4f3dccd5b36a6ab175f03ba74297 Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Wed, 2 Feb 2022 20:36:40 +0100
+Subject: [PATCH] opengl source: Do not crash if we could not make our context
+ current
+
+BUG: 449505
+---
+ src/provider/core/openglinfosource.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/provider/core/openglinfosource.cpp b/src/provider/core/openglinfosource.cpp
+index 5117d85..08402c7 100644
+--- a/src/provider/core/openglinfosource.cpp
++++ b/src/provider/core/openglinfosource.cpp
+@@ -13,6 +13,7 @@
+ #include <QOpenGLFunctions>
+ #include <QSurfaceFormat>
+ #include <QWindow>
++#include "logging_p.h"
+ #endif
+
+ using namespace KUserFeedback;
+@@ -37,7 +38,11 @@ QVariant OpenGLInfoSource::data()
+ QWindow window;
+ window.setSurfaceType(QSurface::OpenGLSurface);
+ window.create();
+- context.makeCurrent(&window);
++ if (!context.makeCurrent(&window)) {
++ qCWarning(Log) << "Could not make OpenGL context current";
++ m.insert(QStringLiteral("type"), QStringLiteral("none"));
++ return m;
++ }
+ QOpenGLFunctions functions(&context);
+ m.insert(QStringLiteral("vendor"), OpenGLInfoSourcePrivate::normalizeVendor(reinterpret_cast<const char*>(functions.glGetString(GL_VENDOR))));
+ m.insert(QStringLiteral("renderer"), OpenGLInfoSourcePrivate::normalizeRenderer(reinterpret_cast<const char*>(functions.glGetString(GL_RENDERER))));
+--
+GitLab
+
diff --git a/dev-libs/kuserfeedback/kuserfeedback-1.0.0-r1.ebuild b/dev-libs/kuserfeedback/kuserfeedback-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..bdde403d372a
--- /dev/null
+++ b/dev-libs/kuserfeedback/kuserfeedback-1.0.0-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="forceoptional"
+KFMIN=5.82.0
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Framework to collect user feedback for applications via telemetry and surveys"
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+ SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+fi
+LICENSE="MIT"
+SLOT="5"
+IUSE="doc"
+
+DEPEND="
+ >=dev-qt/qtcharts-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtnetwork-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtsql-${QTMIN}:5
+ >=dev-qt/qtsvg-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kguiaddons-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ doc? (
+ >=dev-qt/qdoc-${QTMIN}:5
+ >=dev-qt/qthelp-${QTMIN}:5
+ )
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-opengl-crash.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ # disable server application
+ -DENABLE_PHP=NO
+ -DENABLE_PHP_UNIT=NO
+ -DENABLE_SURVEY_TARGET_EXPRESSIONS=YES
+ -DENABLE_DOCS=$(usex doc)
+ )
+
+ ecm_src_configure
+}