summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2019-09-14 19:07:21 +0200
committerTupone Alfredo <tupone@gentoo.org>2019-09-14 19:07:21 +0200
commitc65fcde989f19d2695ca851331936e3c61f0ecf0 (patch)
tree84ee96f81fdd42a9fe435eff4802b13e02e99798 /eclass/ada.eclass
parentkde-frameworks: Drop KDE Frameworks 5.61.0 (diff)
downloadgentoo-c65fcde989f19d2695ca851331936e3c61f0ecf0.tar.gz
gentoo-c65fcde989f19d2695ca851331936e3c61f0ecf0.tar.bz2
gentoo-c65fcde989f19d2695ca851331936e3c61f0ecf0.zip
eclass/ada.eclass: Adding gnatchop wrapper
Took also in account comments from mgorny Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'eclass/ada.eclass')
-rw-r--r--eclass/ada.eclass29
1 files changed, 19 insertions, 10 deletions
diff --git a/eclass/ada.eclass b/eclass/ada.eclass
index e5463e15b303..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
;;
*)
@@ -237,6 +237,10 @@ ada_export() {
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}"
@@ -345,35 +349,40 @@ ada_wrapper_setup() {
if [[ ! -x ${workdir}/bin/gnatmake ]]; then
mkdir -p "${workdir}"/bin || die
- local GCC GNATMAKE GNATLS GNATBIND GNATPREP
- ada_export "${impl}" GCC GNATMAKE GNATLS GNATBIND GNATPREP
+ 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"
+ chmod a+x "${workdir}/bin/gnatprep" || die
fi
# Now, set the environment.
@@ -397,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