Gentoo Archives: gentoo-dev

From: graaff@g.o
To: gentoo-dev@l.g.o
Cc: Hans de Graaff <graaff@g.o>
Subject: [gentoo-dev] [PATCH 6/6] ruby-ng.eclass: remove 2-arg calling of depend methods in EAPI 7
Date: Sun, 21 Jul 2019 07:56:51
Message-Id: 20190721075510.31524-6-graaff@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/6] ruby-ng.eclass: add EAPI 7 support by graaff@gentoo.org
1 From: Hans de Graaff <graaff@g.o>
2
3 No longer allow the deprecated 2 argument calls to the ruby*depend
4 methods in EAPI 7. These are already deprecated for a long time.
5
6 Signed-off-by: Hans de Graaff <graaff@g.o>
7 ---
8 eclass/ruby-ng.eclass | 26 ++++++++++++++++++++------
9 1 file changed, 20 insertions(+), 6 deletions(-)
10
11 diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
12 index 9fb6965a0790..a0c03ab6027e 100644
13 --- a/eclass/ruby-ng.eclass
14 +++ b/eclass/ruby-ng.eclass
15 @@ -208,9 +208,16 @@ ruby_add_rdepend() {
16 case $# in
17 1) ;;
18 2)
19 - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF"
20 - ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")"
21 - return
22 + case ${EAPI} in
23 + 4|5|6)
24 + [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF"
25 + ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")"
26 + return
27 + ;;
28 + *)
29 + die "Use the usual depend syntax with a single argument in ruby_add_rdepend"
30 + ;;
31 + esac
32 ;;
33 *)
34 die "bad number of arguments to $0"
35 @@ -243,9 +250,16 @@ ruby_add_bdepend() {
36 case $# in
37 1) ;;
38 2)
39 - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF"
40 - ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")"
41 - return
42 + case ${EAPI} in
43 + 4|5|6)
44 + [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF"
45 + ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")"
46 + return
47 + ;;
48 + *)
49 + die "Use the usual depend syntax with a single argument in ruby_add_bdepend"
50 + ;;
51 + esac
52 ;;
53 *)
54 die "bad number of arguments to $0"
55 --
56 2.21.0