commit:     b768dbf36b2aeed97440910380ea9f96b5fa1127
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 15:23:48 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 16 17:11:33 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b768dbf3

python-r1.eclass: python_gen_useflags, use _python_impl_matches()

 eclass/python-r1.eclass | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index f337e25337b..7ec77acd866 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -324,16 +324,12 @@ python_gen_usedep() {
 python_gen_useflags() {
        debug-print-function ${FUNCNAME} "${@}"
 
-       local impl pattern
-       local matches=()
+       local impl matches=()
 
        for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
-               for pattern; do
-                       if [[ ${impl} == ${pattern} ]]; then
-                               matches+=( "python_targets_${impl}" )
-                               break
-                       fi
-               done
+               if _python_impl_matches "${impl}" "${@}"; then
+                       matches+=( "python_targets_${impl}" )
+               fi
        done
 
        echo "${matches[@]}"

Reply via email to