]> git.pld-linux.org Git - packages/pulseview.git/commitdiff
upstream patch to fix build with glib2 >= 2.68
authorJan Palus <atler@pld-linux.org>
Mon, 16 Aug 2021 19:26:44 +0000 (21:26 +0200)
committerJan Palus <atler@pld-linux.org>
Mon, 16 Aug 2021 19:26:44 +0000 (21:26 +0200)
glib2.68.patch [new file with mode: 0644]
pulseview.spec

diff --git a/glib2.68.patch b/glib2.68.patch
new file mode 100644 (file)
index 0000000..f129407
--- /dev/null
@@ -0,0 +1,54 @@
+From ed643f0b4ac587204a5243451cda181ee1405d62 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
+Date: Wed, 28 Apr 2021 02:14:47 +0200
+Subject: [PATCH] Fix broken build due to C++ template behind C linkage
+
+glib/gatomic.h since 2.68 includes type_traits, which causes a compilation
+error:
+In file included from /usr/include/glib-2.0/glib/gatomic.h:31,
+                 from /usr/include/glib-2.0/glib/gthread.h:32,
+                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
+                 from /usr/include/glib-2.0/glib.h:32,
+                 from /usr/include/libsigrokdecode/libsigrokdecode.h:25,
+                 from /home/abuild/rpmbuild/BUILD/pulseview-0.4.2/pv/data/decode/annotation.cpp:21:
+/usr/include/c++/10/type_traits:2308:3: error: template with C linkage
+2308 |   template<typename _CTp, typename _Rp>
+
+As libsigrokdecode.h declares extern C linkage itself where necessary,
+remove it from pulseviews include statements from the last two occasions.
+---
+ pv/data/decode/annotation.cpp  | 2 --
+ pv/views/trace/decodetrace.cpp | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp
+index 7f233478..f8a5c47b 100644
+--- a/pv/data/decode/annotation.cpp
++++ b/pv/data/decode/annotation.cpp
+@@ -17,9 +17,7 @@
+  * along with this program; if not, see <http://www.gnu.org/licenses/>.
+  */
+-extern "C" {
+ #include <libsigrokdecode/libsigrokdecode.h>
+-}
+ #include <cassert>
+ #include <vector>
+diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp
+index 409f1d28..888064d0 100644
+--- a/pv/views/trace/decodetrace.cpp
++++ b/pv/views/trace/decodetrace.cpp
+@@ -17,9 +17,7 @@
+  * along with this program; if not, see <http://www.gnu.org/licenses/>.
+  */
+-extern "C" {
+ #include <libsigrokdecode/libsigrokdecode.h>
+-}
+ #include <limits>
+ #include <mutex>
+-- 
+2.24.0.rc2
+
index a6d9850f2b6937054e0810e9dddb3efee5079439..8ad828bd7b909da3024dbcf1b83ccfc2d70ae1de 100644 (file)
@@ -13,6 +13,7 @@ Group:                X11/Applications/Graphics
 Source0:       https://sigrok.org/download/source/pulseview/%{name}-%{version}.tar.gz
 # Source0-md5: 108a5f095f06a9485d31a0349ea38243
 Patch0:                %{name}-qt.patch
+Patch1:                glib2.68.patch
 URL:           https://sigrok.org/wiki/PulseView
 BuildRequires: Qt5Core-devel >= 5.3
 BuildRequires: Qt5Gui-devel >= 5.3
@@ -52,6 +53,7 @@ sigrok.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
This page took 0.106316 seconds and 4 git commands to generate.