1 |
commit: 63b752597393bbb7720bee365a94712017afc5ce |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 3 20:39:54 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 3 20:40:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63b75259 |
7 |
|
8 |
dev-libs/kuserfeedback: Fix opengl crash |
9 |
|
10 |
Upstream commit 17db7d75643b4f3dccd5b36a6ab175f03ba74297 |
11 |
|
12 |
See also: |
13 |
https://mail.kde.org/pipermail/distributions/2022-February/001123.html |
14 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=449505 |
15 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
.../kuserfeedback-1.0.0-fix-opengl-crash.patch | 39 ++++++++++++++ |
19 |
.../kuserfeedback/kuserfeedback-1.0.0-r1.ebuild | 59 ++++++++++++++++++++++ |
20 |
2 files changed, 98 insertions(+) |
21 |
|
22 |
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 |
23 |
new file mode 100644 |
24 |
index 000000000000..57321355b23a |
25 |
--- /dev/null |
26 |
+++ b/dev-libs/kuserfeedback/files/kuserfeedback-1.0.0-fix-opengl-crash.patch |
27 |
@@ -0,0 +1,39 @@ |
28 |
+From 17db7d75643b4f3dccd5b36a6ab175f03ba74297 Mon Sep 17 00:00:00 2001 |
29 |
+From: Aleix Pol <aleixpol@×××.org> |
30 |
+Date: Wed, 2 Feb 2022 20:36:40 +0100 |
31 |
+Subject: [PATCH] opengl source: Do not crash if we could not make our context |
32 |
+ current |
33 |
+ |
34 |
+BUG: 449505 |
35 |
+--- |
36 |
+ src/provider/core/openglinfosource.cpp | 7 ++++++- |
37 |
+ 1 file changed, 6 insertions(+), 1 deletion(-) |
38 |
+ |
39 |
+diff --git a/src/provider/core/openglinfosource.cpp b/src/provider/core/openglinfosource.cpp |
40 |
+index 5117d85..08402c7 100644 |
41 |
+--- a/src/provider/core/openglinfosource.cpp |
42 |
++++ b/src/provider/core/openglinfosource.cpp |
43 |
+@@ -13,6 +13,7 @@ |
44 |
+ #include <QOpenGLFunctions> |
45 |
+ #include <QSurfaceFormat> |
46 |
+ #include <QWindow> |
47 |
++#include "logging_p.h" |
48 |
+ #endif |
49 |
+ |
50 |
+ using namespace KUserFeedback; |
51 |
+@@ -37,7 +38,11 @@ QVariant OpenGLInfoSource::data() |
52 |
+ QWindow window; |
53 |
+ window.setSurfaceType(QSurface::OpenGLSurface); |
54 |
+ window.create(); |
55 |
+- context.makeCurrent(&window); |
56 |
++ if (!context.makeCurrent(&window)) { |
57 |
++ qCWarning(Log) << "Could not make OpenGL context current"; |
58 |
++ m.insert(QStringLiteral("type"), QStringLiteral("none")); |
59 |
++ return m; |
60 |
++ } |
61 |
+ QOpenGLFunctions functions(&context); |
62 |
+ m.insert(QStringLiteral("vendor"), OpenGLInfoSourcePrivate::normalizeVendor(reinterpret_cast<const char*>(functions.glGetString(GL_VENDOR)))); |
63 |
+ m.insert(QStringLiteral("renderer"), OpenGLInfoSourcePrivate::normalizeRenderer(reinterpret_cast<const char*>(functions.glGetString(GL_RENDERER)))); |
64 |
+-- |
65 |
+GitLab |
66 |
+ |
67 |
|
68 |
diff --git a/dev-libs/kuserfeedback/kuserfeedback-1.0.0-r1.ebuild b/dev-libs/kuserfeedback/kuserfeedback-1.0.0-r1.ebuild |
69 |
new file mode 100644 |
70 |
index 000000000000..bdde403d372a |
71 |
--- /dev/null |
72 |
+++ b/dev-libs/kuserfeedback/kuserfeedback-1.0.0-r1.ebuild |
73 |
@@ -0,0 +1,59 @@ |
74 |
+# Copyright 1999-2022 Gentoo Authors |
75 |
+# Distributed under the terms of the GNU General Public License v2 |
76 |
+ |
77 |
+EAPI=8 |
78 |
+ |
79 |
+ECM_TEST="forceoptional" |
80 |
+KFMIN=5.82.0 |
81 |
+QTMIN=5.15.2 |
82 |
+VIRTUALX_REQUIRED="test" |
83 |
+inherit ecm kde.org |
84 |
+ |
85 |
+DESCRIPTION="Framework to collect user feedback for applications via telemetry and surveys" |
86 |
+ |
87 |
+if [[ ${KDE_BUILD_TYPE} = release ]]; then |
88 |
+ SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz" |
89 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
90 |
+fi |
91 |
+LICENSE="MIT" |
92 |
+SLOT="5" |
93 |
+IUSE="doc" |
94 |
+ |
95 |
+DEPEND=" |
96 |
+ >=dev-qt/qtcharts-${QTMIN}:5 |
97 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
98 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
99 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
100 |
+ >=dev-qt/qtprintsupport-${QTMIN}:5 |
101 |
+ >=dev-qt/qtsql-${QTMIN}:5 |
102 |
+ >=dev-qt/qtsvg-${QTMIN}:5 |
103 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
104 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
105 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
106 |
+ >=kde-frameworks/kdeclarative-${KFMIN}:5 |
107 |
+ >=kde-frameworks/kguiaddons-${KFMIN}:5 |
108 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
109 |
+" |
110 |
+RDEPEND="${DEPEND}" |
111 |
+BDEPEND=" |
112 |
+ sys-devel/bison |
113 |
+ sys-devel/flex |
114 |
+ doc? ( |
115 |
+ >=dev-qt/qdoc-${QTMIN}:5 |
116 |
+ >=dev-qt/qthelp-${QTMIN}:5 |
117 |
+ ) |
118 |
+" |
119 |
+ |
120 |
+PATCHES=( "${FILESDIR}/${P}-fix-opengl-crash.patch" ) |
121 |
+ |
122 |
+src_configure() { |
123 |
+ local mycmakeargs=( |
124 |
+ # disable server application |
125 |
+ -DENABLE_PHP=NO |
126 |
+ -DENABLE_PHP_UNIT=NO |
127 |
+ -DENABLE_SURVEY_TARGET_EXPRESSIONS=YES |
128 |
+ -DENABLE_DOCS=$(usex doc) |
129 |
+ ) |
130 |
+ |
131 |
+ ecm_src_configure |
132 |
+} |