Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/edb-debugger/, dev-util/edb-debugger/files/
Date: Sat, 07 May 2022 04:20:09
Message-Id: 1651896015.1ec95586a5708ea3652b1f6893204d0f55281ece.sam@gentoo
1 commit: 1ec95586a5708ea3652b1f6893204d0f55281ece
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 7 04:00:15 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat May 7 04:00:15 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ec95586
7
8 dev-util/edb-debugger: fix build with GCC 12
9
10 Closes: https://bugs.gentoo.org/841839
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-util/edb-debugger/edb-debugger-1.3.0.ebuild | 24 +++---
14 .../files/edb-debugger-1.3.0-gcc12.patch | 88 ++++++++++++++++++++++
15 2 files changed, 99 insertions(+), 13 deletions(-)
16
17 diff --git a/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild b/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild
18 index 21c906d48591..e550d9ad3f47 100644
19 --- a/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild
20 +++ b/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild
21 @@ -1,4 +1,4 @@
22 -# Copyright 1999-2020 Gentoo Authors
23 +# Copyright 1999-2022 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26 EAPI=7
27 @@ -8,14 +8,14 @@ inherit cmake
28 DESCRIPTION="edb is a cross platform x86/x86-64 debugger, inspired by Ollydbg"
29 HOMEPAGE="https://github.com/eteran/edb-debugger"
30 SRC_URI="https://github.com/eteran/edb-debugger/releases/download/${PV}/edb-debugger-${PV}.tgz"
31 +S="${WORKDIR}"/${PN}
32
33 LICENSE="GPL-2+"
34 SLOT="0"
35 KEYWORDS="~amd64 ~x86"
36 IUSE="graphviz"
37
38 -RDEPEND="
39 - dev-libs/capstone:=
40 +RDEPEND="dev-libs/capstone:=
41 dev-libs/double-conversion
42 dev-qt/qtconcurrent:5
43 dev-qt/qtcore:5
44 @@ -25,19 +25,17 @@ RDEPEND="
45 dev-qt/qtwidgets:5
46 dev-qt/qtxml:5
47 dev-qt/qtxmlpatterns:5
48 - graphviz? ( media-gfx/graphviz )
49 -"
50 + graphviz? ( media-gfx/graphviz )"
51 +DEPEND="dev-libs/boost
52 + ${RDEPEND}"
53 +BDEPEND="virtual/pkgconfig"
54
55 -DEPEND="
56 - dev-libs/boost
57 - virtual/pkgconfig
58 - ${RDEPEND}
59 -"
60 -
61 -S=${WORKDIR}/${PN}
62 +PATCHES=(
63 + "${FILESDIR}"/${P}-gcc12.patch
64 +)
65
66 src_prepare() {
67 - #Make the desktop's entries somewhat better
68 + # Make the desktop's entries somewhat better
69 sed -i -e 's/GenericName=edb debugger/GenericName=Evan\x27s Debugger/' edb.desktop || die
70 sed -i -e 's/Comment=edb debugger/Comment=edb is a cross platform x86\/x86-64 debugger/' edb.desktop || die
71
72
73 diff --git a/dev-util/edb-debugger/files/edb-debugger-1.3.0-gcc12.patch b/dev-util/edb-debugger/files/edb-debugger-1.3.0-gcc12.patch
74 new file mode 100644
75 index 000000000000..df037193310f
76 --- /dev/null
77 +++ b/dev-util/edb-debugger/files/edb-debugger-1.3.0-gcc12.patch
78 @@ -0,0 +1,88 @@
79 +https://github.com/eteran/edb-debugger/commit/da04c339559f82257ff54ea62b1d403ee98c1ba0
80 +https://bugs.gentoo.org/841839
81 +
82 +From da04c339559f82257ff54ea62b1d403ee98c1ba0 Mon Sep 17 00:00:00 2001
83 +From: Sergei Trofimovich <slyich@×××××.com>
84 +Date: Sat, 2 Apr 2022 22:36:50 +0000
85 +Subject: [PATCH] Gcc 12 includes fix (#815)
86 +
87 +* RegisterViewModelBase.h: add <memory> for unique_ptr
88 +
89 +Without the change gcc-12 fails to build edb-debugger as:
90 +
91 + [ 20%] Building CXX object src/CMakeFiles/edb.dir/RegisterViewModelBase.cpp.o
92 + In file included from edb-debugger/src/RegisterViewModelBase.cpp:18:
93 + edb-debugger/include/RegisterViewModelBase.h:162:14: error:
94 + 'unique_ptr' in namespace 'std' does not name a template type
95 + 162 | std::unique_ptr<CategoriesHolder> rootItem;
96 + | ^~~~~~~~~~
97 + edb-debugger/include/RegisterViewModelBase.h:9:1: note:
98 + 'std::unique_ptr' is defined in header '<memory>';
99 + did you forget to '#include <memory>'?
100 + 8 | #include <deque>
101 + +++ |+#include <memory>
102 +
103 +* State.h: add <memory> for unique_ptr
104 +
105 +Without the change gcc-12 fails to build edb-debugger as:
106 +
107 + [ 21%] Building CXX object src/CMakeFiles/edb.dir/State.cpp.o
108 + In file included from edb-debugger/src/State.cpp:19:
109 + edb-debugger/include/State.h:93:14:
110 + error: 'unique_ptr' in namespace 'std' does not name a template type
111 + 93 | std::unique_ptr<IState> impl_;
112 + | ^~~~~~~~~~
113 + edb-debugger/include/State.h:24:1:
114 + note: 'std::unique_ptr' is defined in header '<memory>';
115 + did you forget to '#include <memory>'?
116 + 23 | #include "Types.h"
117 + +++ |+#include <memory>
118 + 24 |
119 +
120 +* IState.h: add <memory> for unique_ptr
121 +
122 +Without the change gcc-12 fails to build edb-debugger as:
123 +
124 + [ 69%] Building CXX object plugins/DebuggerCore/CMakeFiles/DebuggerCore.dir/unix/linux/arch/x86-generic/PlatformState.cpp.o
125 + In file included from edb-debugger/plugins/DebuggerCore/unix/linux/arch/x86-generic/PlatformState.h:22,
126 + from edb-debugger/plugins/DebuggerCore/unix/linux/arch/x86-generic/PlatformState.cpp:19:
127 + edb-debugger/include/IState.h:33:22:
128 + error: 'unique_ptr' in namespace 'std' does not name a template type
129 + 33 | virtual std::unique_ptr<IState> clone() const = 0;
130 + | ^~~~~~~~~~
131 + edb-debugger/include/IState.h:23:1:
132 + note: 'std::unique_ptr' is defined in header '<memory>';
133 + did you forget to '#include <memory>'?
134 + 22 | #include "Register.h"
135 + +++ |+#include <memory>
136 + 23 | #include "Types.h"
137 +--- a/include/IState.h
138 ++++ b/include/IState.h
139 +@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
140 + #ifndef ISTATE_H_20110315_
141 + #define ISTATE_H_20110315_
142 +
143 ++#include <memory>
144 + #include "Register.h"
145 + #include "Types.h"
146 +
147 +--- a/include/RegisterViewModelBase.h
148 ++++ b/include/RegisterViewModelBase.h
149 +@@ -6,6 +6,7 @@
150 + #include "util/Integer.h"
151 + #include <QAbstractItemModel>
152 + #include <deque>
153 ++#include <memory>
154 + #include <vector>
155 +
156 + Q_DECLARE_METATYPE(std::vector<NumberDisplayMode>)
157 +--- a/include/State.h
158 ++++ b/include/State.h
159 +@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
160 + #ifndef STATE_H_20060715_
161 + #define STATE_H_20060715_
162 +
163 ++#include <memory>
164 + #include "API.h"
165 + #include "Types.h"
166 +