commit:     fdd5c618b5ac3633580b76043cb344e0881ffc6d
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  5 07:25:56 2019 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Sep  5 07:26:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdd5c618

Revert ada.eclass modification as requested

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ada/gprbuild/gprbuild-2017-r2.ebuild |  89 -------
 dev-ada/gprbuild/gprbuild-2019-r1.ebuild |  81 ------
 dev-ada/libgpr/libgpr-2019-r1.ebuild     |  60 -----
 dev-ada/xmlada/xmlada-2019-r1.ebuild     |  80 ------
 eclass/ada.eclass                        | 435 -------------------------------
 5 files changed, 745 deletions(-)

diff --git a/dev-ada/gprbuild/gprbuild-2017-r2.ebuild 
b/dev-ada/gprbuild/gprbuild-2017-r2.ebuild
deleted file mode 100644
index 79897043cf6..00000000000
--- a/dev-ada/gprbuild/gprbuild-2017-r2.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ADA_COMPAT=( gnat_201{6,7} )
-
-inherit ada toolchain-funcs multiprocessing
-
-MYP=${PN}-gpl-${PV}
-
-DESCRIPTION="Multi-Language Management"
-HOMEPAGE="http://libre.adacore.com/";
-SRC_URI="
-       http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deecff7
-               -> ${MYP}-src.tar.gz
-       http://mirrors.cdn.adacore.com/art/591aeb88c7a4473fcbb154f8
-               -> xmlada-gpl-${PV}-src.tar.gz"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-REQUIRED_USE="${ADA_REQUIRED_USE}"
-
-DEPEND="${ADA_DEPS}"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}"/${MYP}-src
-
-PATCHES=(
-       "${FILESDIR}"/${P}-gentoo.patch
-       "${FILESDIR}"/${P}-config.patch
-)
-
-src_prepare() {
-       default
-       sed -i \
-               -e "s:@VER@:${GCC_PV}:g" \
-               share/gprconfig/compilers.xml \
-               share/gprconfig/gnat.xml \
-               share/gprconfig/c.xml \
-               share/gprconfig/linker.xml \
-               || die
-       sed -i \
-               -e "s:@GNATBIND@:${GNATBIND}:g" \
-               src/gprlib.adb \
-               || die
-       if use ada_target_gnat_2016; then
-               sed -i \
-                       -e 's:"-no-pie", ::g' \
-                       share/gprconfig/linker.xml \
-                       || die
-       fi
-}
-
-src_configure() {
-       emake prefix="${D}"/usr setup
-}
-
-bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"
-lib_progs="gprlib gprbind"
-
-src_compile() {
-       local xmlada_src="../xmlada-gpl-${PV}-src"
-       incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
-               -I${xmlada_src}/schema -I${xmlada_src}/unicode \
-               -I${xmlada_src}/input_sources"
-       ${GCC} -c ${CFLAGS} gpr/src/gpr_imports.c -o gpr_imports.o || die
-       for bin in ${bin_progs}; do
-               ${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS 
${bin}-main \
-                       -o ${bin} -largs gpr_imports.o || die
-       done
-       for lib in $lib_progs; do
-               ${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
-                       -largs gpr_imports.o || die
-       done
-}
-
-src_install() {
-       dobin ${bin_progs}
-       exeinto /usr/libexec/gprbuild
-       doexe ${lib_progs}
-       insinto /usr/share/gprconfig
-       doins share/gprconfig/*
-       insinto /usr/share/gpr
-       doins share/_default.gpr
-       einstalldocs
-}

diff --git a/dev-ada/gprbuild/gprbuild-2019-r1.ebuild 
b/dev-ada/gprbuild/gprbuild-2019-r1.ebuild
deleted file mode 100644
index 14f410a45c1..00000000000
--- a/dev-ada/gprbuild/gprbuild-2019-r1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ADA_COMPAT=( gnat_201{7,8,9} )
-
-inherit ada toolchain-funcs multiprocessing
-
-MYP=${P}-20190517-194D8-src
-XMLADA=xmlada-${PV}-20190429-19B9D-src
-
-DESCRIPTION="Multi-Language Management"
-HOMEPAGE="http://libre.adacore.com/";
-SRC_URI="
-       http://mirrors.cdn.adacore.com/art/5cdf8e8031e87a8f1d425093
-               -> ${MYP}.tar.gz
-       http://mirrors.cdn.adacore.com/art/5cdf916831e87a8f1d4250b5
-               -> ${XMLADA}.tar.gz"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-REQUIRED_USE="${ADA_REQUIRED_USE}"
-
-DEPEND="${ADA_DEPS}"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}"/${MYP}
-
-PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
-
-src_prepare() {
-       default
-       sed -i \
-               -e "s:@VER@:${GCC_PV}:g" \
-               share/gprconfig/compilers.xml \
-               share/gprconfig/gnat.xml \
-               share/gprconfig/c.xml \
-               share/gprconfig/linker.xml \
-               || die
-       sed -i \
-               -e "s:@GNATBIND@:${GNATBIND}:g" \
-               src/gprlib.adb \
-               || die
-}
-
-src_configure() {
-       emake prefix="${D}"/usr setup
-}
-
-bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"
-lib_progs="gprlib gprbind"
-
-src_compile() {
-       local xmlada_src="../${XMLADA}"
-       incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
-               -I${xmlada_src}/schema -I${xmlada_src}/unicode \
-               -I${xmlada_src}/input_sources"
-       ${GCC} -c ${CFLAGS} gpr/src/gpr_imports.c -o gpr_imports.o || die
-       for bin in ${bin_progs}; do
-               ${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS 
${bin}-main \
-                       -o ${bin} -largs gpr_imports.o || die
-       done
-       for lib in $lib_progs; do
-               ${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
-                       -largs gpr_imports.o || die
-       done
-}
-
-src_install() {
-       dobin ${bin_progs}
-       exeinto /usr/libexec/gprbuild
-       doexe ${lib_progs}
-       insinto /usr/share/gprconfig
-       doins share/gprconfig/*
-       insinto /usr/share/gpr
-       doins share/_default.gpr
-       einstalldocs
-}

diff --git a/dev-ada/libgpr/libgpr-2019-r1.ebuild 
b/dev-ada/libgpr/libgpr-2019-r1.ebuild
deleted file mode 100644
index 01d8cf7cfbd..00000000000
--- a/dev-ada/libgpr/libgpr-2019-r1.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ADA_COMPAT=( gnat_201{6,7,8,9} )
-inherit ada toolchain-funcs multiprocessing
-
-MYP=gprbuild-${PV}-20190517-194D8
-
-DESCRIPTION="Ada library to handle GPRbuild project files"
-HOMEPAGE="http://libre.adacore.com/";
-SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8e8031e87a8f1d425093
-               -> ${MYP}-src.tar.gz"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+shared static-libs static-pic"
-
-RDEPEND="dev-ada/xmlada[shared?,static-libs?,static-pic?,${ADA_USEDEP}]
-       !net-libs/grpc"
-DEPEND="${RDEPEND}
-       dev-ada/gprbuild[${ADA_USEDEP}]"
-REQUIRED_USE="${ADA_REQUIRED_USE}"
-
-S="${WORKDIR}"/${MYP}-src
-
-src_configure() {
-       emake prefix="${D}"/usr setup
-}
-
-src_compile() {
-       build () {
-               gprbuild -p -m -j$(makeopts_jobs) -XBUILD=production -v \
-                       -XLIBRARY_TYPE=$1 -XXMLADA_BUILD=$1 \
-                       gpr/gpr.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} 
|| die
-       }
-       if use shared; then
-               build relocatable
-       fi
-       if use static-libs; then
-               build static
-       fi
-       if use static-pic; then
-               build static-pic
-       fi
-}
-
-src_install() {
-       if use static-libs; then
-               emake DESTDIR="${D}" libgpr.install.static
-       fi
-       for kind in shared static-pic; do
-               if use ${kind}; then
-                       emake DESTDIR="${D}" libgpr.install.${kind}
-               fi
-       done
-       rm -r "${D}"/usr/share/gpr/manifests || die
-       einstalldocs
-}

diff --git a/dev-ada/xmlada/xmlada-2019-r1.ebuild 
b/dev-ada/xmlada/xmlada-2019-r1.ebuild
deleted file mode 100644
index 994bc36f6f5..00000000000
--- a/dev-ada/xmlada/xmlada-2019-r1.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ADA_COMPAT=( gnat_201{6,7,8,9} )
-inherit ada multiprocessing
-
-MYP=${P}-20190429-19B9D
-
-DESCRIPTION="Set of modules that provide a simple manipulation of XML streams"
-HOMEPAGE="http://libre.adacore.com/";
-SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf916831e87a8f1d4250b5
-       -> ${MYP}-src.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+shared static-libs static-pic"
-REQUIRED_USE="|| ( shared static-libs static-pic )
-       ${ADA_REQUIRED_USE}"
-
-RDEPEND="${ADA_DEPS}"
-DEPEND="${RDEPEND}
-       dev-ada/gprbuild[${ADA_USEDEP}]"
-
-S="${WORKDIR}"/${MYP}-src
-
-PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
-
-src_configure () {
-       econf --prefix="${D}"/usr
-}
-
-src_compile () {
-       build () {
-               gprbuild -j$(makeopts_jobs) -m -p -v -XLIBRARY_TYPE=$1 \
-                       -XBUILD=Production -XPROCESSORS=$(makeopts_jobs) 
xmlada.gpr \
-                       -cargs ${ADAFLAGS} || die "gprbuild failed"
-       }
-       if use shared; then
-               build relocatable
-       fi
-       if use static-libs; then
-               build static
-       fi
-       if use static-pic; then
-               build static-pic
-       fi
-}
-
-src_test() {
-       emake test
-       emake run_test | tee xmlada.testLog
-       grep -q DIFF xmlada.testLog && die
-}
-
-src_install () {
-       build () {
-               gprinstall -XLIBRARY_TYPE=$1 -f -p -XBUILD=Production \
-                       -XPROCESSORS=$(makeopts_jobs) --prefix="${D}"/usr \
-                       --install-name=xmlada --build-var=LIBRARY_TYPE \
-                       --build-var=XMLADA_BUILD \
-                       --build-name=$1 xmlada.gpr || die "gprinstall failed"
-       }
-       if use shared; then
-               build relocatable
-       fi
-       if use static-libs; then
-               build static
-       fi
-       if use static-pic; then
-               build static-pic
-       fi
-
-       einstalldocs
-       dodoc xmlada-roadmap.txt
-       rm -f "${D}"/usr/share/doc/${PN}/.buildinfo
-       rm -rf "${D}"/usr/share/gpr/manifests
-}

diff --git a/eclass/ada.eclass b/eclass/ada.eclass
deleted file mode 100644
index 338b73bab86..00000000000
--- a/eclass/ada.eclass
+++ /dev/null
@@ -1,435 +0,0 @@
-# Copyright 2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: ada.eclass
-# @MAINTAINER:
-# Ada team <a...@gentoo.org>
-# @AUTHOR:
-# Tupone Alfredo <tup...@gentoo.org>
-# @BLURB: An eclass for Ada packages
-# @DESCRIPTION:
-# This eclass set the IUSE and REQUIRED_USE to request the ADA_TARGET
-# when the inheriting ebuild can be supported by more than one Ada
-# implementation. It also set ADA_USEDEP and ADA_DEPS with a suitable form.
-# A common eclass providing helper functions to build and install
-# packages supporting Ada implementations.
-#
-# This eclass sets correct IUSE. Modification of REQUIRED_USE has to
-# be done by the author of the ebuild (but ADA_REQUIRED_USE is
-# provided for convenience, see below). ada exports ADA_DEPS
-# and ADA_USEDEP so you can create correct dependencies for your
-# package easily.
-#
-# Mostly copied from python-single-r1.eclass
-
-case "${EAPI:-0}" in
-       0|1|2|3|4)
-               die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
-               ;;
-       5|6|7)
-               # EAPI=5 is required for sane USE_EXPAND dependencies
-               ;;
-       *)
-               die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-               ;;
-esac
-
-EXPORT_FUNCTIONS pkg_setup
-
-# @ECLASS-VARIABLE: ADA_DEPS
-# @DESCRIPTION:
-# This is an eclass-generated Ada dependency string for all
-# implementations listed in ADA_COMPAT.
-#
-# The dependency string is conditional on ADA_TARGET.
-#
-# Example use:
-# @CODE
-# RDEPEND="${ADA_DEPS}
-#   dev-foo/mydep"
-# DEPEND="${RDEPEND}"
-# @CODE
-#
-
-# @ECLASS-VARIABLE: _ADA_ALL_IMPLS
-# @INTERNAL
-# @DESCRIPTION:
-# All supported Ada implementations, most preferred last.
-_ADA_ALL_IMPLS=(
-       gnat_2016 gnat_2017 gnat_2018 gnat_2019
-)
-readonly _ADA_ALL_IMPLS
-
-
-# @FUNCTION: _ada_impl_supported
-# @USAGE: <impl>
-# @INTERNAL
-# @DESCRIPTION:
-# Check whether the implementation <impl> (ADA_COMPAT-form)
-# is still supported.
-#
-# Returns 0 if the implementation is valid and supported. If it is
-# unsupported, returns 1 -- and the caller should ignore the entry.
-# If it is invalid, dies with an appopriate error messages.
-_ada_impl_supported() {
-       debug-print-function ${FUNCNAME} "${@}"
-
-       [[ ${#} -eq 1 ]] || die "${FUNCNAME}: takes exactly 1 argument (impl)."
-
-       local impl=${1}
-
-       # keep in sync with _ADA_ALL_IMPLS!
-       # (not using that list because inline patterns shall be faster)
-       case "${impl}" in
-               gnat_201[6789])
-                       return 0
-                       ;;
-               *)
-                       [[ ${ADA_COMPAT_NO_STRICT} ]] && return 1
-                       die "Invalid implementation in ADA_COMPAT: ${impl}"
-       esac
-}
-
-# @FUNCTION: _ada_set_impls
-# @INTERNAL
-# @DESCRIPTION:
-# Check ADA_COMPAT for well-formedness and validity, then set
-# two global variables:
-#
-# - _ADA_SUPPORTED_IMPLS containing valid implementations supported
-#   by the ebuild (ADA_COMPAT - dead implementations),
-#
-# - and _ADA_UNSUPPORTED_IMPLS containing valid implementations that
-#   are not supported by the ebuild.
-#
-# Implementations in both variables are ordered using the pre-defined
-# eclass implementation ordering.
-#
-# This function must be called once in global scope by an eclass
-# utilizing ADA_COMPAT.
-_ada_set_impls() {
-       local i
-
-       if ! declare -p ADA_COMPAT &>/dev/null; then
-               die 'ADA_COMPAT not declared.'
-       fi
-       if [[ $(declare -p ADA_COMPAT) != "declare -a"* ]]; then
-               die 'ADA_COMPAT must be an array.'
-       fi
-       for i in "${ADA_COMPAT[@]}"; do
-               # trigger validity checks
-               _ada_impl_supported "${i}"
-       done
-
-       local supp=() unsupp=()
-
-       for i in "${_ADA_ALL_IMPLS[@]}"; do
-               if has "${i}" "${ADA_COMPAT[@]}"; then
-                       supp+=( "${i}" )
-               else
-                       unsupp+=( "${i}" )
-               fi
-       done
-       if [[ ! ${supp[@]} ]]; then
-               die "No supported implementation in ADA_COMPAT."
-       fi
-
-       if [[ ${_ADA_SUPPORTED_IMPLS[@]} ]]; then
-               # set once already, verify integrity
-               if [[ ${_ADA_SUPPORTED_IMPLS[@]} != ${supp[@]} ]]; then
-                       eerror "Supported impls (ADA_COMPAT) changed between 
inherits!"
-                       eerror "Before: ${_ADA_SUPPORTED_IMPLS[*]}"
-                       eerror "Now   : ${supp[*]}"
-                       die "_ADA_SUPPORTED_IMPLS integrity check failed"
-               fi
-               if [[ ${_ADA_UNSUPPORTED_IMPLS[@]} != ${unsupp[@]} ]]; then
-                       eerror "Unsupported impls changed between inherits!"
-                       eerror "Before: ${_ADA_UNSUPPORTED_IMPLS[*]}"
-                       eerror "Now   : ${unsupp[*]}"
-                       die "_ADA_UNSUPPORTED_IMPLS integrity check failed"
-               fi
-       else
-               _ADA_SUPPORTED_IMPLS=( "${supp[@]}" )
-               _ADA_UNSUPPORTED_IMPLS=( "${unsupp[@]}" )
-               readonly _ADA_SUPPORTED_IMPLS _ADA_UNSUPPORTED_IMPLS
-       fi
-}
-
-# @FUNCTION: ada_export
-# @USAGE: [<impl>] <variables>...
-# @DESCRIPTION:
-# Set and export the Ada implementation-relevant variables passed
-# as parameters.
-#
-# The optional first parameter may specify the requested Ada
-# implementation (either as ADA_TARGETS value, e.g. ada2_7,
-# or an EADA one, e.g. ada2.7). If no implementation passed,
-# the current one will be obtained from ${EADA}.
-#
-# The variables which can be exported are: GCC, EADA, GNATMAKE.
-# They are described more completely in the eclass
-# variable documentation.
-ada_export() {
-       debug-print-function ${FUNCNAME} "${@}"
-
-       local impl var
-
-       case "${1}" in
-               gnat_201[6789])
-                       impl=${1}
-                       shift
-                       ;;
-               *)
-                       impl=${EADA}
-                       if [[ -z ${impl} ]]; then
-                               die "ada_export called without a ada 
implementation and EADA is unset"
-                       fi
-                       ;;
-       esac
-       debug-print "${FUNCNAME}: implementation: ${impl}"
-
-       local gcc_pv
-       case "${impl}" in
-               gnat_2016)
-                       gcc_pv=4.9.4
-                       ;;
-               gnat_2017)
-                       gcc_pv=6.3.0
-                       ;;
-               gnat_2018)
-                       gcc_pv=7.3.1
-                       ;;
-               gnat_2019)
-                       gcc_pv=8.3.1
-                       ;;
-               *)
-                       gcc_pv="9.9.9"
-                       ;;
-       esac
-
-       for var; do
-               case "${var}" in
-                       EADA)
-                               export EADA=${impl}
-                               debug-print "${FUNCNAME}: EADA = ${EADA}"
-                               ;;
-                       GCC)
-                               export GCC=${EPREFIX}/usr/bin/gcc-${gcc_pv}
-                               debug-print "${FUNCNAME}: GCC = ${GCC}"
-                               ;;
-                       GCC_PV)
-                               export GCC_PV=${gcc_pv}
-                               debug-print "${FUNCNAME}: GCC_PV = ${GCC_PV}"
-                               ;;
-                       GNATBIND)
-                               export 
GNATBIND=${EPREFIX}/usr/bin/gnatbind-${gcc_pv}
-                               debug-print "${FUNCNAME}: GNATBIND = 
${GNATBIND}"
-                               ;;
-                       GNATMAKE)
-                               export 
GNATMAKE=${EPREFIX}/usr/bin/gnatmake-${gcc_pv}
-                               debug-print "${FUNCNAME}: GNATMAKE = 
${GNATMAKE}"
-                               ;;
-                       GNATLS)
-                               export 
GNATLS=${EPREFIX}/usr/bin/gnatls-${gcc_pv}
-                               debug-print "${FUNCNAME}: GNATLS = ${GNATLS}"
-                               ;;
-                       ADA_PKG_DEP)
-                               ADA_PKG_DEP="dev-lang/gnat-gpl:${gcc_pv}"
-
-                               # use-dep
-                               if [[ ${ADA_REQ_USE} ]]; then
-                                       ADA_PKG_DEP+=[${ADA_REQ_USE}]
-                               fi
-
-                               export ADA_PKG_DEP
-                               debug-print "${FUNCNAME}: ADA_PKG_DEP = 
${ADA_PKG_DEP}"
-                               ;;
-                       *)
-                               die "ada_export: unknown variable ${var}"
-               esac
-       done
-}
-
-_ada_single_set_globals() {
-       _ada_set_impls
-       local i ADA_PKG_DEP
-
-       local flags=( "${_ADA_SUPPORTED_IMPLS[@]/#/ada_target_}" )
-       local unflags=( "${_ADA_UNSUPPORTED_IMPLS[@]/#/-ada_target_}" )
-       local allflags=( ${flags[@]} ${unflags[@]} )
-
-       local optflags=${flags[@]/%/(-)?}
-
-       IUSE="${allflags[*]}"
-
-       if [[ ${#_ADA_UNSUPPORTED_IMPLS[@]} -gt 0 ]]; then
-               optflags+=,${unflags[@]/%/(-)}
-       fi
-
-       local deps requse usedep
-       if [[ ${#_ADA_SUPPORTED_IMPLS[@]} -eq 1 ]]; then
-               # There is only one supported implementation; set IUSE and other
-               # variables without ADA_SINGLE_TARGET.
-               requse=${flags[*]}
-               ada_export "${_ADA_SUPPORTED_IMPLS[0]}" ADA_PKG_DEP
-               deps="${flags[*]}? ( ${ADA_PKG_DEP} ) "
-       else
-               # Multiple supported implementations; honor ADA_TARGET.
-               requse="^^ ( ${flags[*]} )"
-
-               for i in "${_ADA_SUPPORTED_IMPLS[@]}"; do
-                       ada_export "${i}" ADA_PKG_DEP
-                       deps+="ada_target_${i}? ( ${ADA_PKG_DEP} ) "
-               done
-       fi
-       usedep=${optflags// /,}
-       if [[ ${ADA_DEPS+1} ]]; then
-               if [[ ${ADA_DEPS} != "${deps}" ]]; then
-                       eerror "ADA_DEPS have changed between inherits 
(ADA_REQ_USE?)!"
-                       eerror "Before: ${ADA_DEPS}"
-                       eerror "Now   : ${deps}"
-                       die "ADA_DEPS integrity check failed"
-               fi
-
-               # these two are formality -- they depend on ADA_COMPAT only
-               if [[ ${ADA_REQUIRED_USE} != ${requse} ]]; then
-                       eerror "ADA_REQUIRED_USE have changed between inherits!"
-                       eerror "Before: ${ADA_REQUIRED_USE}"
-                       eerror "Now   : ${requse}"
-                       die "ADA_REQUIRED_USE integrity check failed"
-               fi
-
-               if [[ ${ADA_USEDEP} != "${usedep}" ]]; then
-                       eerror "ADA_USEDEP have changed between inherits!"
-                       eerror "Before: ${ADA_USEDEP}"
-                       eerror "Now   : ${usedep}"
-                       die "ADA_USEDEP integrity check failed"
-               fi
-       else
-               ADA_DEPS=${deps}
-               ADA_REQUIRED_USE=${requse}
-               ADA_USEDEP=${usedep}
-               readonly ADA_DEPS ADA_REQUIRED_USE ADA_USEDEP
-       fi
-}
-_ada_single_set_globals
-unset -f _ada_single_set_globals
-
-# @FUNCTION: ada_wrapper_setup
-# @USAGE: [<path> [<impl>]]
-# @DESCRIPTION:
-# Create proper 'ada' executable wrappers
-# in the directory named by <path>. Set up PATH
-# appropriately. <path> defaults to ${T}/${EADA}.
-#
-# The wrappers will be created for implementation named by <impl>,
-# or for one named by ${EADA} if no <impl> passed.
-#
-# If the named directory contains a ada symlink already, it will
-# be assumed to contain proper wrappers already and only environment
-# setup will be done. If wrapper update is requested, the directory
-# shall be removed first.
-ada_wrapper_setup() {
-       debug-print-function ${FUNCNAME} "${@}"
-
-       local workdir=${1:-${T}/${EADA}}
-       local impl=${2:-${EADA}}
-
-       [[ ${workdir} ]] || die "${FUNCNAME}: no workdir specified."
-       [[ ${impl} ]] || die "${FUNCNAME}: no impl nor EADA specified."
-
-       if [[ ! -x ${workdir}/bin/gnatmake ]]; then
-               mkdir -p "${workdir}"/bin || die
-
-               local GCC GNATMAKE GNATLS GNATBIND
-               ada_export "${impl}" GCC GNATMAKE GNATLS GNATBIND
-
-               # Ada compiler
-               cat > "${workdir}/bin/gcc" <<-_EOF_ || die
-                       #!/bin/sh
-                       exec "${GCC}" "\${@}"
-               _EOF_
-               chmod a+x "${workdir}/bin/gcc"
-               cat > "${workdir}/bin/gnatmake" <<-_EOF_ || die
-                       #!/bin/sh
-                       exec "${GNATMAKE}" "\${@}"
-               _EOF_
-               chmod a+x "${workdir}/bin/gnatmake"
-               cat > "${workdir}/bin/gnatls" <<-_EOF_ || die
-                       #!/bin/sh
-                       exec "${GNATLS}" "\${@}"
-               _EOF_
-               chmod a+x "${workdir}/bin/gnatls"
-               cat > "${workdir}/bin/gnatbind" <<-_EOF_ || die
-                       #!/bin/sh
-                       exec "${GNATBIND}" "\${@}"
-               _EOF_
-               chmod a+x "${workdir}/bin/gnatbind"
-       fi
-
-       # Now, set the environment.
-       # But note that ${workdir} may be shared with something else,
-       # and thus already on top of PATH.
-       if [[ ${PATH##:*} != ${workdir}/bin ]]; then
-               PATH=${workdir}/bin${PATH:+:${PATH}}
-       fi
-       export PATH
-}
-
-# @FUNCTION: ada_setup
-# @DESCRIPTION:
-# Determine what the selected Ada implementation is and set
-# the Ada build environment up for it.
-ada_setup() {
-       debug-print-function ${FUNCNAME} "${@}"
-
-       unset EADA
-
-       if [[ ${#_ADA_SUPPORTED_IMPLS[@]} -eq 1 ]]; then
-               if use "ada_targets_${_ADA_SUPPORTED_IMPLS[0]}"; then
-                       # Only one supported implementation, enable it 
explicitly
-                       ada_export "${_ADA_SUPPORTED_IMPLS[0]}" EADA GCC GCC_PV 
GNATMAKE
-                       ada_wrapper_setup
-               fi
-       else
-               local impl
-               for impl in "${_ADA_SUPPORTED_IMPLS[@]}"; do
-                       if use "ada_target_${impl}"; then
-                               if [[ ${EADA} ]]; then
-                                       eerror "Your ADA_TARGET setting lists 
more than a single Ada"
-                                       eerror "implementation. Please set it 
to just one value. If you need"
-                                       eerror "to override the value for a 
single package, please use package.env"
-                                       eerror "or an equivalent solution (man 
5 portage)."
-                                       echo
-                                       die "More than one implementation in 
ADA_TARGET."
-                               fi
-
-                               ada_export "${impl}" EADA GCC GCC_PV GNATMAKE
-                               ada_wrapper_setup
-                       fi
-               done
-       fi
-
-       if [[ ! ${EADA} ]]; then
-               eerror "No Ada implementation selected for the build. Please 
set"
-               if [[ ${#_ADA_SUPPORTED_IMPLS[@]} -eq 1 ]]; then
-                       eerror "the ADA_TARGETS variable in your make.conf to 
include one"
-               else
-                       eerror "the ADA_SINGLE_TARGET variable in your 
make.conf to one"
-               fi
-               eerror "of the following values:"
-               eerror
-               eerror "${_ADA_SUPPORTED_IMPLS[@]}"
-               echo
-               die "No supported Ada implementation in 
ADA_SINGLE_TARGET/ADA_TARGETS."
-       fi
-}
-
-# @FUNCTION: ada_pkg_setup
-# @DESCRIPTION:
-# Runs ada_setup.
-ada_pkg_setup() {
-       debug-print-function ${FUNCNAME} "${@}"
-
-       [[ ${MERGE_TYPE} != binary ]] && ada_setup
-}

Reply via email to