Gentoo Archives: gentoo-commits

From: John Helmert III <ajak@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/files/, dev-util/rizin/
Date: Thu, 06 Jan 2022 19:08:10
Message-Id: 1641496047.c177d1212996d8cf74d5fc8b1b613fdb1dd4e7c9.ajak@gentoo
1 commit: c177d1212996d8cf74d5fc8b1b613fdb1dd4e7c9
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 6 18:52:29 2022 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 6 19:07:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c177d121
7
8 dev-util/rizin: workaround build failure with tree-sitter[-ts-cli] and nodejs
9
10 Closes: https://bugs.gentoo.org/830068
11 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
12
13 .../files/rizin-0.3.2-never-rebuild-parser.patch | 36 ++++++++++++++++++++++
14 dev-util/rizin/rizin-0.3.2.ebuild | 3 +-
15 2 files changed, 38 insertions(+), 1 deletion(-)
16
17 diff --git a/dev-util/rizin/files/rizin-0.3.2-never-rebuild-parser.patch b/dev-util/rizin/files/rizin-0.3.2-never-rebuild-parser.patch
18 new file mode 100644
19 index 000000000000..5231da0c7eaf
20 --- /dev/null
21 +++ b/dev-util/rizin/files/rizin-0.3.2-never-rebuild-parser.patch
22 @@ -0,0 +1,36 @@
23 +commit 9bcfa2a6d3eaa5df00ae728c44811faf08effbd3
24 +Author: John Helmert III <jchelmert3@××××××.net>
25 +Date: Thu Jan 6 11:12:58 2022 -0600
26 +
27 + shlr/rizin-shell-parser/src: Never rebuild parser.c
28 +
29 + This requires dev-libs/tree-sitter[ts-cli] and net-libs/nodejs, both
30 + of which would be heavy new dependencies. However, these are only
31 + needed to rebuild the already-existing tree-sitter parser, which
32 + doesn't do much for us (if anything) since it already exists. In this
33 + case, it's better to just reduce fragility by unconditionally
34 + disabling this.
35 +
36 + Bug: https://bugs.gentoo.org/830068
37 + Signed-off-by: John Helmert III <ajak@g.o>
38 +
39 +diff --git a/shlr/rizin-shell-parser/src/meson.build b/shlr/rizin-shell-parser/src/meson.build
40 +index 0171183ae0..81dcc13b33 100644
41 +--- a/shlr/rizin-shell-parser/src/meson.build
42 ++++ b/shlr/rizin-shell-parser/src/meson.build
43 +@@ -1,14 +1,4 @@
44 +-tree_sitter_bin = find_program('tree-sitter', required: false)
45 +-node_bin = find_program('node', required: false)
46 +-if tree_sitter_bin.found() and node_bin.found() and tree_sitter_dep.type_name() != 'internal'
47 +- parser_c = custom_target('parser_src_c',
48 +- command: [tree_sitter_wrap_py, tree_sitter_bin, '@OUTDIR@/..', '@INPUT@'],
49 +- input: [grammar_js],
50 +- output: 'parser.c',
51 +- )
52 +-else
53 +- parser_c = files('parser.c')
54 +-endif
55 ++parser_c = files('parser.c')
56 +
57 + shell_parser_files = [files('scanner.c'), parser_c]
58 + shell_parser_inc = [platform_inc, include_directories('tree_sitter')]
59
60 diff --git a/dev-util/rizin/rizin-0.3.2.ebuild b/dev-util/rizin/rizin-0.3.2.ebuild
61 index be6e33690c5a..f0f118bdd3dc 100644
62 --- a/dev-util/rizin/rizin-0.3.2.ebuild
63 +++ b/dev-util/rizin/rizin-0.3.2.ebuild
64 @@ -1,4 +1,4 @@
65 -# Copyright 1999-2021 Gentoo Authors
66 +# Copyright 1999-2022 Gentoo Authors
67 # Distributed under the terms of the GNU General Public License v2
68
69 EAPI=8
70 @@ -40,6 +40,7 @@ BDEPEND="${PYTHON_DEPS}"
71
72 PATCHES=(
73 "${FILESDIR}/${PN}-0.3.0-typedb-prefix.patch"
74 + "${FILESDIR}/${PN}-0.3.2-never-rebuild-parser.patch"
75 )
76
77 S="${WORKDIR}/${PN}-v${PV}"