depend.apache.eclass: Replace build_with_use with has_version, disallow for EAPIs...
authorDoug Freed <dwfreed@mtu.edu>
Thu, 8 Dec 2016 18:38:18 +0000 (19:38 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sat, 10 Dec 2016 17:19:46 +0000 (18:19 +0100)
There are no EAPI=0 / EAPI=1 ebuilds in the tree that are affected.

eclass/depend.apache.eclass

index b69c2ec55b5787ac5f564db2b4742afa1598b4b2..f0848a63d1814cbea934ce446d8e696ec9d90c4f 100644 (file)
@@ -290,7 +290,13 @@ has_apache() {
 has_apache_threads() {
        debug-print-function $FUNCNAME $*
 
-       if ! built_with_use www-servers/apache threads; then
+       case ${EAPI:-0} in
+               0|1)
+                       die "depend.apache.eclass: has_apache_threads is not supported for EAPI=${EAPI:-0}"
+                       ;;
+       esac
+
+       if ! has_version 'www-servers/apache[threads]'; then
                return
        fi
 
@@ -313,14 +319,20 @@ has_apache_threads() {
 has_apache_threads_in() {
        debug-print-function $FUNCNAME $*
 
-       if ! built_with_use www-servers/apache threads; then
+       case ${EAPI:-0} in
+               0|1)
+                       die "depend.apache.eclass: has_apache_threads_in is not supported for EAPI=${EAPI:-0}"
+                       ;;
+       esac
+
+       if ! has_version 'www-servers/apache[threads]'; then
                return
        fi
 
        local myforeign="$1"
        local myflag="${2:-threads}"
 
-       if ! built_with_use ${myforeign} ${myflag}; then
+       if ! has_version "${myforeign}[${myflag}]"; then
                echo
                eerror "You need to enable USE flag '${myflag}' in ${myforeign} to"
                eerror "build a thread-safe version of ${CATEGORY}/${PN} for use"