toolchain-autoconf.eclass: Modernise
authorDavid Seifert <soap@gentoo.org>
Wed, 17 Jan 2018 23:31:18 +0000 (00:31 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Thu, 18 Jan 2018 09:40:32 +0000 (10:40 +0100)
* Add EAPI blacklist
Closes: https://github.com/gentoo/gentoo/pull/6893

eclass/toolchain-autoconf.eclass

index 59057b8d6ebbd8c93480dc7b174f59f368998605..18276f0b49c5b3fdca0a08bdd5bb40686e916eea 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: toolchain-autoconf.eclass
@@ -9,16 +9,24 @@
 # This eclass contains the common phase functions migrated from
 # sys-devel/autoconf eblits.
 
-if [[ -z ${_TOOLCHAIN_AUTOCONF_ECLASS} ]]; then
+case ${EAPI:-0} in
+       [0-5])
+               die "${ECLASS} is banned in EAPI ${EAPI:-0}"
+               ;;
+       6)
+               ;;
+       *)
+               die "Unknown EAPI ${EAPI:-0}"
+               ;;
+esac
 
-inherit eutils
+if [[ -z ${_TOOLCHAIN_AUTOCONF_ECLASS} ]]; then
 
 EXPORT_FUNCTIONS src_prepare src_configure src_install
 
 toolchain-autoconf_src_prepare() {
        find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} + || die
-
-       [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}"
+       default
 }
 
 toolchain-autoconf_src_configure() {