diff options
author | John Helmert III <ajak@gentoo.org> | 2022-01-06 12:52:29 -0600 |
---|---|---|
committer | John Helmert III <ajak@gentoo.org> | 2022-01-06 13:07:27 -0600 |
commit | c177d1212996d8cf74d5fc8b1b613fdb1dd4e7c9 (patch) | |
tree | e272f2530d3b76089533f1a1369e21c66f34ed5d /dev-util | |
parent | dev-python/jaraco-collections: add 3.5.1 (diff) | |
download | gentoo-c177d1212996d8cf74d5fc8b1b613fdb1dd4e7c9.tar.gz gentoo-c177d1212996d8cf74d5fc8b1b613fdb1dd4e7c9.tar.bz2 gentoo-c177d1212996d8cf74d5fc8b1b613fdb1dd4e7c9.zip |
dev-util/rizin: workaround build failure with tree-sitter[-ts-cli] and nodejs
Closes: https://bugs.gentoo.org/830068
Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/rizin/files/rizin-0.3.2-never-rebuild-parser.patch | 36 | ||||
-rw-r--r-- | dev-util/rizin/rizin-0.3.2.ebuild | 3 |
2 files changed, 38 insertions, 1 deletions
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 new file mode 100644 index 000000000000..5231da0c7eaf --- /dev/null +++ b/dev-util/rizin/files/rizin-0.3.2-never-rebuild-parser.patch @@ -0,0 +1,36 @@ +commit 9bcfa2a6d3eaa5df00ae728c44811faf08effbd3 +Author: John Helmert III <jchelmert3@posteo.net> +Date: Thu Jan 6 11:12:58 2022 -0600 + + shlr/rizin-shell-parser/src: Never rebuild parser.c + + This requires dev-libs/tree-sitter[ts-cli] and net-libs/nodejs, both + of which would be heavy new dependencies. However, these are only + needed to rebuild the already-existing tree-sitter parser, which + doesn't do much for us (if anything) since it already exists. In this + case, it's better to just reduce fragility by unconditionally + disabling this. + + Bug: https://bugs.gentoo.org/830068 + Signed-off-by: John Helmert III <ajak@gentoo.org> + +diff --git a/shlr/rizin-shell-parser/src/meson.build b/shlr/rizin-shell-parser/src/meson.build +index 0171183ae0..81dcc13b33 100644 +--- a/shlr/rizin-shell-parser/src/meson.build ++++ b/shlr/rizin-shell-parser/src/meson.build +@@ -1,14 +1,4 @@ +-tree_sitter_bin = find_program('tree-sitter', required: false) +-node_bin = find_program('node', required: false) +-if tree_sitter_bin.found() and node_bin.found() and tree_sitter_dep.type_name() != 'internal' +- parser_c = custom_target('parser_src_c', +- command: [tree_sitter_wrap_py, tree_sitter_bin, '@OUTDIR@/..', '@INPUT@'], +- input: [grammar_js], +- output: 'parser.c', +- ) +-else +- parser_c = files('parser.c') +-endif ++parser_c = files('parser.c') + + shell_parser_files = [files('scanner.c'), parser_c] + shell_parser_inc = [platform_inc, include_directories('tree_sitter')] diff --git a/dev-util/rizin/rizin-0.3.2.ebuild b/dev-util/rizin/rizin-0.3.2.ebuild index be6e33690c5a..f0f118bdd3dc 100644 --- a/dev-util/rizin/rizin-0.3.2.ebuild +++ b/dev-util/rizin/rizin-0.3.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,6 +40,7 @@ BDEPEND="${PYTHON_DEPS}" PATCHES=( "${FILESDIR}/${PN}-0.3.0-typedb-prefix.patch" + "${FILESDIR}/${PN}-0.3.2-never-rebuild-parser.patch" ) S="${WORKDIR}/${PN}-v${PV}" |