summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorshannonjr <shannonjr@pkgsrc.org>2004-08-11 22:45:00 +0000
committershannonjr <shannonjr@pkgsrc.org>2004-08-11 22:45:00 +0000
commit9c4bc6261e2657e6b76f1a0e71307e720d6635db (patch)
treecc845e550b366d5115b866d6dbf796607a942170 /lang
parenta8d2bb1f7b5e838b29de1365684cbd330419cf2b (diff)
downloadpkgsrc-9c4bc6261e2657e6b76f1a0e71307e720d6635db.tar.gz
Bring inline with gcc34 pkg by incomporating the following changes
already in lang/gcc34: 1) Locate adalib for bootstrap compiler with ${ALT_GCC} --print-file-name=adalib rather than find. This behaves better if ${ALT_GCC} does not specify a gcc executable. 2) Elide trailing letters from GCC_PLATFORM so that GCC_ARCHSUBDIR remains constant for CURRENT when the version letter changes.
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc34-ada/Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/lang/gcc34-ada/Makefile b/lang/gcc34-ada/Makefile
index 1438b55598b..d2d211183dc 100644
--- a/lang/gcc34-ada/Makefile
+++ b/lang/gcc34-ada/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2004/08/08 11:14:37 shannonjr Exp $
+# $NetBSD: Makefile,v 1.8 2004/08/11 22:45:00 shannonjr Exp $
#
DISTNAME= gcc-${GCC_VERSION}
@@ -67,9 +67,12 @@ CONFIGURE_ARGS+= --with-gnu-ld
#ALT_GCC= prefix/bin/gcc
.if defined(ALT_GCC)
. if exists(${ALT_GCC})
-ALT_GCC_PREFIX:= ${ALT_GCC:H}/..
-ALT_GCC_RTS!= ${FIND} ${ALT_GCC_PREFIX} -name adalib
+ALT_GCC_RTS!= ${ALT_GCC} --print-file-name=adalib
+. if !empty(ALT_GCC_RTS)
RALT_GCC_RTS= ${ALT_GCC_RTS:S%${LOCALBASE}%%:S%/%%}
+. else
+PKG_SKIP_REASON= "${ALT_GCC} does not appear to be an Ada compiler"
+. endif
. else
PKG_SKIP_REASON= "Missing bootstrap Ada compiler"
. endif
@@ -87,7 +90,7 @@ GCC34_PKGMODIF= ${GCC34_INSTALLTO_SUBPREFIX}
GCC_SUBPREFIX= ${GCC34_INSTALLTO_SUBPREFIX}
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
-GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}${LOWER_OS_VERSION:C/_.*//}
+GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}${LOWER_OS_VERSION:C/[_a-z].*//}
CONFIGURE_ARGS+= --host=${GCC_PLATFORM}
GCC_ARCHSUBDIR= ${GCC_SUBPREFIX}/lib/gcc/${GCC_PLATFORM}/${GCC_VERSION}
GCC_ARCHDIR= ${PREFIX}/${GCC_ARCHSUBDIR}