diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-06-13 12:24:24 +0200 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-06-13 12:24:24 +0200 |
commit | f0fcbef01170601bd11820976911296c857332b8 (patch) | |
tree | 5107775f21f43ce0e37acb493fe9e21b77061d0f | |
parent | fix typos (diff) | |
download | sci-f0fcbef01170601bd11820976911296c857332b8.tar.gz sci-f0fcbef01170601bd11820976911296c857332b8.tar.bz2 sci-f0fcbef01170601bd11820976911296c857332b8.zip |
move to pkg_pretend for EAPI=4
-rw-r--r-- | eclass/fortran-2.eclass | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass index 051182668..8d7c609a1 100644 --- a/eclass/fortran-2.eclass +++ b/eclass/fortran-2.eclass @@ -97,10 +97,10 @@ get_fcomp() { esac } -# @FUNCTION: fortran-2_pkg_setup +# @FUNCTION: fortran-2_pkg_pretend # @DESCRIPTION: # Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support. -fortran-2_pkg_setup() { +fortran-2_pkg_pretend() { _have-valid-fortran || \ die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler" export FC="$(tc-getFC)" @@ -113,4 +113,18 @@ fortran-2_pkg_setup() { fi } -EXPORT_FUNCTIONS pkg_setup + +# @FUNCTION: fortran-2_pkg_setup +# @DESCRIPTION: +# Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support, used in EAPI < 4. +fortran-2_pkg_setup() { + has ${EAPI:-0} 0 1 2 3 && fortran-2_pkg_pretend +} + +case "${EAPI:-0}" in + 0|1|2|3) + EXPORT_FUNCTIONS pkg_setup;; + 4) + EXPORT_FUNCTIONS pkg_pretend;; + *) die "EAPI=${EAPI} is not supported" ;; +esac |