summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-31 05:19:31 +0100
committerSam James <sam@gentoo.org>2023-08-31 05:19:31 +0100
commit7fdc1251b7205263da7b5360aee17a5c5f82f7c5 (patch)
tree2b7580da3731805defa9946985f108d279fe9c9a /dev-util
parentapp-vim/jedi: add 0.11.2 (diff)
downloadgentoo-7fdc1251b7205263da7b5360aee17a5c5f82f7c5.tar.gz
gentoo-7fdc1251b7205263da7b5360aee17a5c5f82f7c5.tar.bz2
gentoo-7fdc1251b7205263da7b5360aee17a5c5f82f7c5.zip
dev-util/rizin: fix build w/ >=tree-sitter-0.20.8-r1
>=tree-sitter-0.20.8-r1 doesn't install parser.h anymore because it may be mismatched with the version used to build the parser. Use one bundled with rizin-shell-parser instead. This should propagate into rizin-shell-parser when they regenerate with a newer tree-sitter release (once one is made). See also: * https://github.com/tree-sitter/tree-sitter/pull/2573 * https://github.com/tree-sitter/tree-sitter/pull/2574 Bug: https://bugs.gentoo.org/912716 Closes: https://bugs.gentoo.org/913343 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/rizin/files/rizin-0.5.2-find-tree-sitter-parser.patch33
-rw-r--r--dev-util/rizin/rizin-0.5.2.ebuild1
2 files changed, 34 insertions, 0 deletions
diff --git a/dev-util/rizin/files/rizin-0.5.2-find-tree-sitter-parser.patch b/dev-util/rizin/files/rizin-0.5.2-find-tree-sitter-parser.patch
new file mode 100644
index 000000000000..27811e9930ee
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.5.2-find-tree-sitter-parser.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/913343
+
+>=tree-sitter-0.20.8-r1 doesn't install parser.h anymore because it may be
+mismatched with the version used to build the parser. Use one bundled with
+rizin-shell-parser instead.
+
+This should propagate into rizin-shell-parser when they regenerate
+with a newer tree-sitter release (once one is made).
+
+See also:
+* https://bugs.gentoo.org/912716
+* https://bugs.gentoo.org/913343
+* https://github.com/tree-sitter/tree-sitter/pull/2573
+* https://github.com/tree-sitter/tree-sitter/pull/2574
+--- a/subprojects/rizin-shell-parser/src/parser.c
++++ b/subprojects/rizin-shell-parser/src/parser.c
+@@ -1,4 +1,4 @@
+-#include <tree_sitter/parser.h>
++#include "tree_sitter/parser.h"
+
+ #if defined(__GNUC__) || defined(__clang__)
+ #pragma GCC diagnostic push
+--- a/subprojects/rizin-shell-parser/src/scanner.c
++++ b/subprojects/rizin-shell-parser/src/scanner.c
+@@ -1,7 +1,7 @@
+ // SPDX-FileCopyrightText: 2020 ret2libc <sirmy15@gmail.com>
+ // SPDX-License-Identifier: LGPL-3.0-only
+
+-#include <tree_sitter/parser.h>
++#include "tree_sitter/parser.h"
+ #include <ctype.h>
+ #include <wctype.h>
+ #include <stdio.h>
diff --git a/dev-util/rizin/rizin-0.5.2.ebuild b/dev-util/rizin/rizin-0.5.2.ebuild
index 9d91882992da..3a1e1579d4fb 100644
--- a/dev-util/rizin/rizin-0.5.2.ebuild
+++ b/dev-util/rizin/rizin-0.5.2.ebuild
@@ -41,6 +41,7 @@ BDEPEND="${PYTHON_DEPS}"
PATCHES=(
"${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
+ "${FILESDIR}/${PN}-0.5.2-find-tree-sitter-parser.patch"
)
S="${WORKDIR}/${PN}-v${PV}"