eclass/ada.eclass: Adding gnatprep launcher
authorTupone Alfredo <tupone@gentoo.org>
Fri, 13 Sep 2019 19:50:28 +0000 (21:50 +0200)
committerTupone Alfredo <tupone@gentoo.org>
Fri, 13 Sep 2019 19:50:28 +0000 (21:50 +0200)
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
eclass/ada.eclass

index 338b73bab86bcbfdc38ef62e250b058783e98ff4..e5463e15b3035ab2bd8368b114db1887c8f80277 100644 (file)
@@ -233,6 +233,10 @@ 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}"
+                               ;;
                        ADA_PKG_DEP)
                                ADA_PKG_DEP="dev-lang/gnat-gpl:${gcc_pv}"
 
@@ -341,8 +345,8 @@ 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 GNATPREP
+               ada_export "${impl}" GCC GNATMAKE GNATLS GNATBIND GNATPREP
 
                # Ada compiler
                cat > "${workdir}/bin/gcc" <<-_EOF_ || die
@@ -365,6 +369,11 @@ ada_wrapper_setup() {
                        exec "${GNATBIND}" "\${@}"
                _EOF_
                chmod a+x "${workdir}/bin/gnatbind"
+               cat > "${workdir}/bin/gnatprep" <<-_EOF_ || die
+                       #!/bin/sh
+                       exec "${GNATPREP}" "\${@}"
+               _EOF_
+               chmod a+x "${workdir}/bin/gnatprep"
        fi
 
        # Now, set the environment.