summaryrefslogtreecommitdiff
path: root/eclass/ada.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-15 09:01:56 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-15 09:01:56 +0100
commite8f81810baa21f490d6910e8e2d424546b72a333 (patch)
treedb79151c528a566490ffcac0d7b64484e12b4762 /eclass/ada.eclass
parentd00821e77f72d4af4ea30158c1c6e18ffff0875b (diff)
gentoo resync : 15.09.2019
Diffstat (limited to 'eclass/ada.eclass')
-rw-r--r--eclass/ada.eclass36
1 files changed, 27 insertions, 9 deletions
diff --git a/eclass/ada.eclass b/eclass/ada.eclass
index 338b73bab86b..86a67fc24fd0 100644
--- a/eclass/ada.eclass
+++ b/eclass/ada.eclass
@@ -23,10 +23,10 @@
# Mostly copied from python-single-r1.eclass
case "${EAPI:-0}" in
- 0|1|2|3|4)
+ 0|1|2|3|4|5)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 5|6|7)
+ 6|7)
# EAPI=5 is required for sane USE_EXPAND dependencies
;;
*)
@@ -233,6 +233,14 @@ ada_export() {
export GNATLS=${EPREFIX}/usr/bin/gnatls-${gcc_pv}
debug-print "${FUNCNAME}: GNATLS = ${GNATLS}"
;;
+ GNATPREP)
+ export GNATPREP=${EPREFIX}/usr/bin/gnatprep-${gcc_pv}
+ debug-print "${FUNCNAME}: GNATPREP = ${GNATPREP}"
+ ;;
+ GNATCHOP)
+ export GNATCHOP=${EPREFIX}/usr/bin/gnatchop-${gcc_pv}
+ debug-print "${FUNCNAME}: GNATCHOP = ${GNATCHOP}"
+ ;;
ADA_PKG_DEP)
ADA_PKG_DEP="dev-lang/gnat-gpl:${gcc_pv}"
@@ -341,30 +349,40 @@ ada_wrapper_setup() {
if [[ ! -x ${workdir}/bin/gnatmake ]]; then
mkdir -p "${workdir}"/bin || die
- local GCC GNATMAKE GNATLS GNATBIND
- ada_export "${impl}" GCC GNATMAKE GNATLS GNATBIND
+ local GCC GNATMAKE GNATLS GNATBIND GNATCHOP GNATPREP
+ ada_export "${impl}" GCC GNATMAKE GNATLS GNATCHOP GNATBIND GNATPREP
# Ada compiler
cat > "${workdir}/bin/gcc" <<-_EOF_ || die
#!/bin/sh
exec "${GCC}" "\${@}"
_EOF_
- chmod a+x "${workdir}/bin/gcc"
+ chmod a+x "${workdir}/bin/gcc" || die
cat > "${workdir}/bin/gnatmake" <<-_EOF_ || die
#!/bin/sh
exec "${GNATMAKE}" "\${@}"
_EOF_
- chmod a+x "${workdir}/bin/gnatmake"
+ chmod a+x "${workdir}/bin/gnatmake" || die
cat > "${workdir}/bin/gnatls" <<-_EOF_ || die
#!/bin/sh
exec "${GNATLS}" "\${@}"
_EOF_
- chmod a+x "${workdir}/bin/gnatls"
+ chmod a+x "${workdir}/bin/gnatls" || die
cat > "${workdir}/bin/gnatbind" <<-_EOF_ || die
#!/bin/sh
exec "${GNATBIND}" "\${@}"
_EOF_
- chmod a+x "${workdir}/bin/gnatbind"
+ chmod a+x "${workdir}/bin/gnatbind" || die
+ cat > "${workdir}/bin/gnatchop" <<-_EOF_ || die
+ #!/bin/sh
+ exec "${GNATCHOP}" "\${@}"
+ _EOF_
+ chmod a+x "${workdir}/bin/gnatchop" || die
+ cat > "${workdir}/bin/gnatprep" <<-_EOF_ || die
+ #!/bin/sh
+ exec "${GNATPREP}" "\${@}"
+ _EOF_
+ chmod a+x "${workdir}/bin/gnatprep" || die
fi
# Now, set the environment.
@@ -388,7 +406,7 @@ ada_setup() {
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_export "${_ADA_SUPPORTED_IMPLS[0]}" EADA GCC_PV
ada_wrapper_setup
fi
else