usr-ldscript.eclass: add EAPI check and drop legacy code
authorMike Gilbert <floppym@gentoo.org>
Mon, 15 Jul 2019 17:12:33 +0000 (13:12 -0400)
committerMike Gilbert <floppym@gentoo.org>
Thu, 18 Jul 2019 15:13:14 +0000 (11:13 -0400)
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
eclass/usr-ldscript.eclass

index 1a115ca6a88c007167f424ff055821d7c9a5c04c..4d503e7d6db944e6ff99707fbba3be5c95dd2353 100644 (file)
@@ -4,11 +4,17 @@
 # @ECLASS: usr-ldscript.eclass
 # @MAINTAINER:
 # Toolchain Ninjas <toolchain@gentoo.org>
+# @SUPPORTED_EAPIS: 4 5 6 7
 # @BLURB: Defines the gen_usr_ldscript function.
 
 if [[ -z ${_USR_LDSCRIPT_ECLASS} ]]; then
 _USR_LDSCRIPT_ECLASS=1
 
+case ${EAPI:-0} in
+       4|5|6|7) ;;
+       *) die "EAPI=${EAPI} is not supported" ;;
+esac
+
 inherit multilib toolchain-funcs
 
 IUSE="split-usr"
@@ -29,7 +35,6 @@ IUSE="split-usr"
 # correctly to point to the latest version of the library present.
 gen_usr_ldscript() {
        local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
-       [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
 
        tc-is-static-only && return