ruby-ng.eclass: remove 2-arg calling of depend methods in EAPI 7
authorHans de Graaff <graaff@gentoo.org>
Sun, 21 Jul 2019 07:44:29 +0000 (09:44 +0200)
committerHans de Graaff <graaff@gentoo.org>
Thu, 25 Jul 2019 06:09:42 +0000 (08:09 +0200)
No longer allow the deprecated 2 argument calls to the ruby*depend
methods in EAPI 7. These are already deprecated for a long time.

Signed-off-by: Hans de Graaff <graaff@gentoo.org>
eclass/ruby-ng.eclass

index 9fb6965a079078b6d944f65578388e325976a2bb..a0c03ab6027e0666db3cec3f04873c52083a00e5 100644 (file)
@@ -208,9 +208,16 @@ ruby_add_rdepend() {
        case $# in
                1) ;;
                2)
-                       [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF"
-                       ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")"
-                       return
+                       case ${EAPI} in
+                               4|5|6)
+                                       [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF"
+                                       ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")"
+                                       return
+                                       ;;
+                               *)
+                                       die "Use the usual depend syntax with a single argument in ruby_add_rdepend"
+                                       ;;
+                       esac
                        ;;
                *)
                        die "bad number of arguments to $0"
@@ -243,9 +250,16 @@ ruby_add_bdepend() {
        case $# in
                1) ;;
                2)
-                       [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF"
-                       ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")"
-                       return
+                       case ${EAPI} in
+                               4|5|6)
+                                       [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF"
+                                       ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")"
+                                       return
+                                       ;;
+                               *)
+                                       die "Use the usual depend syntax with a single argument in ruby_add_bdepend"
+                                       ;;
+                       esac
                        ;;
                *)
                        die "bad number of arguments to $0"