summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorGeorge Shapovalov <george@gentoo.org>2007-12-29 23:41:29 +0000
committerGeorge Shapovalov <george@gentoo.org>2007-12-29 23:41:29 +0000
commite2036d6db442cd4e05ff962edbffb0ead12d745c (patch)
treee204f7f9509e76a040ab4d0f4ed44d85dda3dfb2 /eclass
parentAdd patch to build against kernels later than 2.6.21. Fixes bug #192052. (diff)
downloadgentoo-2-e2036d6db442cd4e05ff962edbffb0ead12d745c.tar.gz
gentoo-2-e2036d6db442cd4e05ff962edbffb0ead12d745c.tar.bz2
gentoo-2-e2036d6db442cd4e05ff962edbffb0ead12d745c.zip
actually added the rule enforcing that all primary compilers be present before Ada lib can be emerged (#151343)
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gnat.eclass16
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/gnat.eclass b/eclass/gnat.eclass
index 5743eca1da31..95e55b440a16 100644
--- a/eclass/gnat.eclass
+++ b/eclass/gnat.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnat.eclass,v 1.31 2007/12/27 01:40:44 george Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnat.eclass,v 1.32 2007/12/29 23:41:29 george Exp $
#
# Author: George Shapovalov <george@gentoo.org>
# Belongs to: ada herd <ada@gentoo.org>
@@ -31,6 +31,9 @@ inherit flag-o-matic eutils
# functions!
GnatCommon="/usr/share/gnat/lib/gnat-common.bash"
+# !!NOTE!!
+# src_install should not be exported!
+# Instead gnat_src_install should be explicitly called from within src_install.
EXPORT_FUNCTIONS pkg_setup pkg_postinst src_compile
DESCRIPTION="Common procedures for building Ada libs using split gnat compilers"
@@ -269,6 +272,17 @@ gnat_filter_flags() {
gnat_pkg_setup() {
debug-print-function $FUNCNAME $*
+
+ # check whether all the primary compilers are installed
+ . ${GnatCommon} || die "failed to source gnat-common lib"
+ for fn in $(cat ${PRIMELIST}); do
+ if [[ ! -f ${SPECSDIR}/${fn} ]]; then
+ elog "The ${fn} Ada compiler profile is specified as primary, but is not installed."
+ elog "Please rectify the situation before emerging Ada library!"
+ die "Primary compiler is missing"
+ fi
+ done
+
export ADAC=${ADAC:-gnatgcc}
export ADAMAKE=${ADAMAKE:-gnatmake}
export ADABIND=${ADABIND:-gnatbind}