intel-sdp.eclass: Inherit only once
authorJustin Lecher <jlec@gentoo.org>
Mon, 15 Feb 2016 07:55:44 +0000 (08:55 +0100)
committerJustin Lecher <jlec@gentoo.org>
Mon, 15 Feb 2016 08:04:57 +0000 (09:04 +0100)
* Move EAPI check to the top

Signed-off-by: Justin Lecher <jlec@gentoo.org>
eclass/intel-sdp.eclass

index 00e52a083e2203f164095a44de246ec13dee504b..4fa28610eb45bddf1746f95bf560013b76d32ad6 100644 (file)
@@ -8,6 +8,13 @@
 # Sci Team <sci@gentoo.org>
 # @BLURB: Handling of Intel's Software Development Products package management
 
+if [[ ! ${_INTEL_SDP_ECLASS_} ]]; then
+
+case "${EAPI:-0}" in
+       5) ;;
+       *) die "EAPI=${EAPI} is not supported" ;;
+esac
+
 # @ECLASS-VARIABLE: INTEL_DID
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -514,8 +521,6 @@ intel-sdp_pkg_postrm() {
 }
 
 EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
-case "${EAPI:-0}" in
-       0|1|2|3)die "EAPI=${EAPI} is not supported anymore" ;;
-       4|5) ;;
-       *) die "EAPI=${EAPI} is not supported" ;;
-esac
+
+_INTEL_SDP_ECLASS_=1
+fi