dev-lang/gnat-gpl: Fix case when ADA is specified without the path
authorTupone Alfredo <tupone@gentoo.org>
Thu, 16 Mar 2017 07:38:00 +0000 (08:38 +0100)
committerTupone Alfredo <tupone@gentoo.org>
Thu, 16 Mar 2017 08:26:56 +0000 (09:26 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

dev-lang/gnat-gpl/gnat-gpl-2016.ebuild

index 77ac3e15dcd73e6fba368dc6ac8540cd9c961fe2..2709a1c0990bd290a139587fe16c1ae993ac9c4b 100644 (file)
@@ -57,10 +57,14 @@ GCC_A_FAKEIT="${P}-src.tar.gz
 
 pkg_setup() {
        GCC=${ADA:-$(tc-getCC)}
-       local path=$(dirname ${GCC})
        local base=$(basename ${GCC})
-       GNATMAKE="${path}/${base/gcc/gnatmake}"
-       GNATBIND="${path}/${base/gcc/gnatbind}"
+       GNATMAKE="${base/gcc/gnatmake}"
+       GNATBIND="${base/gcc/gnatbind}"
+       if [[ ${base} != ${GCC} ]] ; then
+               local path=$(dirname ${GCC})
+               GNATMAKE="${path}/${GNATMAKE}"
+               GNATBIND="${path}/${GNATBIND}"
+       fi
        if [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then
                eerror "You need a gcc compiler that provides the Ada Compiler:"
                eerror "1) use gcc-config to select the right compiler or"