1 |
commit: c4c4ee8ac824c1f83c963e9ca9c0055a2d3ec5bb |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Wed Jun 29 19:52:19 2022 +0000 |
4 |
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
5 |
CommitDate: Thu Jun 30 06:00:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c4c4ee8a |
7 |
|
8 |
nimble.eclass: add nimble_comment_requires |
9 |
|
10 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
11 |
|
12 |
eclass/nimble.eclass | 14 ++++++++++++++ |
13 |
1 file changed, 14 insertions(+) |
14 |
|
15 |
diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass |
16 |
index 1a6dc24af..60bd28689 100644 |
17 |
--- a/eclass/nimble.eclass |
18 |
+++ b/eclass/nimble.eclass |
19 |
@@ -87,6 +87,20 @@ get_package_url() { |
20 |
echo "${_PACKAGE_URL}" |
21 |
} |
22 |
|
23 |
+# @FUNCTION: nimble_comment_requires |
24 |
+# @USAGE: <dep...> |
25 |
+# @DESCRIPTION: |
26 |
+# Comment out one or more 'requires' calls in the Nimble file. |
27 |
+nimble_comment_requires() { |
28 |
+ debug-print-function ${FUNCNAME} "${@}" |
29 |
+ |
30 |
+ local dep |
31 |
+ for dep in "${@}"; do |
32 |
+ dep=${dep//\//\\/} |
33 |
+ sed "/requires[[:space:]]*\"${dep}\>.*\"/ s/^/#/" -i *.nimble || die |
34 |
+ done |
35 |
+} |
36 |
+ |
37 |
# @FUNCTION: nimble_src_configure |
38 |
# @USAGE: |
39 |
# @DESCRIPTION: |