commit:     b044751f25eeeeabe1e9c636b2c071855cbf1dad
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 13 16:55:58 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 13 16:56:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b044751f

dev-util/edb-debugger: fix build with Capstone 5

.. and add missing double-conversion slot dep

Closes: https://bugs.gentoo.org/843755
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/edb-debugger/edb-debugger-1.3.0.ebuild    |  3 ++-
 .../files/edb-debugger-1.3.0-capstone-5.patch      | 29 ++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild 
b/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild
index e550d9ad3f47..cf000cdee218 100644
--- a/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild
+++ b/dev-util/edb-debugger/edb-debugger-1.3.0.ebuild
@@ -16,7 +16,7 @@ KEYWORDS="~amd64 ~x86"
 IUSE="graphviz"
 
 RDEPEND="dev-libs/capstone:=
-       dev-libs/double-conversion
+       dev-libs/double-conversion:=
        dev-qt/qtconcurrent:5
        dev-qt/qtcore:5
        dev-qt/qtgui:5
@@ -32,6 +32,7 @@ BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
        "${FILESDIR}"/${P}-gcc12.patch
+       "${FILESDIR}"/${PN}-1.3.0-capstone-5.patch
 )
 
 src_prepare() {

diff --git a/dev-util/edb-debugger/files/edb-debugger-1.3.0-capstone-5.patch 
b/dev-util/edb-debugger/files/edb-debugger-1.3.0-capstone-5.patch
new file mode 100644
index 000000000000..d900ae335242
--- /dev/null
+++ b/dev-util/edb-debugger/files/edb-debugger-1.3.0-capstone-5.patch
@@ -0,0 +1,29 @@
+From cb1da3fb1d2e45e279118ee8e68468373b71dbc8 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Tue, 13 Sep 2022 17:52:01 +0100
+Subject: [PATCH] Fix build with Capstone 5
+
+Capstone 5 drops X86_INS_VCVTPD2DQX and X86_INS_VCVTPD2PSX from
+x86.h (happened in 
https://github.com/capstone-engine/capstone/commit/dd91f03fef5102492352756e2adb5972dd79a70f
+but no real explanation).
+
+Given:
+1. these instructions had no wiring up;
+2. other Capstone consumers have done the same
+let's drop based on a macro for the Capstone version.
+
+Bug: https://bugs.gentoo.org/843755
+Signed-off-by: Sam James <[email protected]>
+--- a/src/capstone-edb/Instruction.cpp
++++ b/src/capstone-edb/Instruction.cpp
+@@ -880,8 +880,10 @@ bool is_SIMD_PD(const Operand &operand) {
+       case X86_INS_CVTPD2PI:
+       case X86_INS_CVTPD2PS:
+       case X86_INS_VCVTPD2PS:
++#if CS_API_MAJOR < 5
+       case X86_INS_VCVTPD2DQX: // FIXME: what's this?
+       case X86_INS_VCVTPD2PSX: // FIXME: what's this?
++#endif
+       // case X86_INS_VCVTPD2QQ: // FIXME: Capstone seems to not support it
+       case X86_INS_VCVTPD2UDQ:
+               // case X86_INS_VCVTPD2UQQ: // FIXME: Capstone seems to not 
support it

Reply via email to