toolchain.eclass: remove built_with_use, bug #610456
authorUlrich Müller <ulm@gentoo.org>
Fri, 5 Jan 2018 23:14:58 +0000 (18:14 -0500)
committerAnthony G. Basile <blueness@gentoo.org>
Fri, 5 Jan 2018 23:14:58 +0000 (18:14 -0500)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
eclass/toolchain.eclass

index 36d344012d4480e079d6a4aca026ae5610d4e346..7fc4c70652f3f7b640ca7a33d8f4d8108f91915a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -23,14 +23,13 @@ fi
 
 FEATURES=${FEATURES/multilib-strict/}
 
-EXPORTED_FUNCTIONS="pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm"
 case ${EAPI:-0} in
-       0|1)    die "Need to upgrade to at least EAPI=2";;
-       2|3)    EXPORTED_FUNCTIONS+=" src_prepare src_configure" ;;
-       4*|5*)  EXPORTED_FUNCTIONS+=" pkg_pretend src_prepare src_configure" ;;
-       *)      die "I don't speak EAPI ${EAPI}."
+       0|1|2|3) die "Need to upgrade to at least EAPI=4" ;;
+       4*|5*)   ;;
+       *)       die "I don't speak EAPI ${EAPI}." ;;
 esac
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
+EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
+       src_compile src_test src_install pkg_postinst pkg_postrm
 
 #---->> globals <<----
 
@@ -390,10 +389,6 @@ toolchain_pkg_pretend() {
 #---->> pkg_setup <<----
 
 toolchain_pkg_setup() {
-       case ${EAPI} in
-       2|3) toolchain_pkg_pretend ;;
-       esac
-
        # we dont want to use the installed compiler's specs to build gcc
        unset GCC_SPECS
        unset LANGUAGES #265283
@@ -998,7 +993,7 @@ toolchain_src_configure() {
                                        --disable-threads
                                        --without-headers
                                )
-                       elif built_with_use --hidden --missing false ${CATEGORY}/${needed_libc} crosscompile_opts_headers-only ; then
+                       elif has_version "${CATEGORY}/${needed_libc}[crosscompile_opts_headers-only(-)]" ; then
                                confgcc+=(
                                        "${confgcc_no_libc[@]}"
                                        --with-sysroot="${PREFIX}"/${CTARGET}