ruby-ng.eclass: Add RESTRICT="!test? ( test )"
authorMichał Górny <mgorny@gentoo.org>
Mon, 4 Nov 2019 09:04:35 +0000 (10:04 +0100)
committerMichał Górny <mgorny@gentoo.org>
Mon, 4 Nov 2019 09:05:02 +0000 (10:05 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/ruby-ng.eclass

index dd9d3f2418ca4aefa726e8d751f774f2085d9736..db701d81f4fc07284419afda9e963b9be3b27024 100644 (file)
@@ -234,7 +234,10 @@ ruby_add_rdepend() {
                4|5|6) DEPEND="${DEPEND} test? ( ${dependency} )" ;;
                *) BDEPEND="${BDEPEND} test? ( ${dependency} )" ;;
        esac
-       has test "$IUSE" || IUSE="${IUSE} test"
+       if ! has test "$IUSE"; then
+               IUSE+=" test"
+               RESTRICT+=" !test? ( test )"
+       fi
 }
 
 # @FUNCTION: ruby_add_bdepend