aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-06-13 12:24:24 +0200
committerJustin Lecher <jlec@gentoo.org>2011-06-13 12:24:24 +0200
commitf0fcbef01170601bd11820976911296c857332b8 (patch)
tree5107775f21f43ce0e37acb493fe9e21b77061d0f
parentfix typos (diff)
downloadsci-f0fcbef01170601bd11820976911296c857332b8.tar.gz
sci-f0fcbef01170601bd11820976911296c857332b8.tar.bz2
sci-f0fcbef01170601bd11820976911296c857332b8.zip
move to pkg_pretend for EAPI=4
-rw-r--r--eclass/fortran-2.eclass20
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