summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2016-09-12 12:18:13 +0000
committermaya <maya@pkgsrc.org>2016-09-12 12:18:13 +0000
commit938d41cef83f8d3062db6a5358cc40089ac85707 (patch)
tree24822bb52442d234e3f7531a1840f0f8fc015de1 /mk/compiler
parent86862f5f2ef02c6e09503972914370459dd93451 (diff)
downloadpkgsrc-938d41cef83f8d3062db6a5358cc40089ac85707.tar.gz
Introduce GFORTRAN_VERSION, pick which version of gfortran is used.
modified patch from Rin Okuyama PR pkg/50722: do not hardcode lang/gcc48 in gfortran.mk "looks ok, needs docs" - wiz "it'll do for now, ideally I'd like something more robust and possibly integrate into gcc.mk's path selection" - jperkin
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gfortran.mk12
1 files changed, 7 insertions, 5 deletions
diff --git a/mk/compiler/gfortran.mk b/mk/compiler/gfortran.mk
index a305c39c95b..cd165fedefa 100644
--- a/mk/compiler/gfortran.mk
+++ b/mk/compiler/gfortran.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gfortran.mk,v 1.8 2015/11/25 13:05:47 jperkin Exp $
+# $NetBSD: gfortran.mk,v 1.9 2016/09/12 12:18:13 maya Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -40,7 +40,9 @@ COMPILER_GFORTRAN_MK= defined
.include "../../mk/bsd.prefs.mk"
-.if !empty(PKGPATH:Mlang/gcc48) || !empty(PKGPATH:Mdevel/patch) || \
+GFORTRAN_VERSION?= 48
+
+.if !empty(PKGPATH:Mlang/gcc${GFORTRAN_VERSION}) || !empty(PKGPATH:Mdevel/patch) || \
!empty(PKGPATH:Mdevel/libtool-base)
IGNORE_GFORTRAN= yes
MAKEFLAGS+= IGNORE_GFORTRAN=yes
@@ -68,7 +70,7 @@ _USE_GFORTRAN= YES
.endif
.if !empty(_USE_GFORTRAN:M[yY][eE][sS])
-_GFORTRANBASE= ${LOCALBASE}/gcc48
+_GFORTRANBASE= ${LOCALBASE}/gcc${GFORTRAN_VERSION}
FC= gfortran
_GFORTRAN_DIR= ${WRKDIR}/.gfortran
@@ -89,8 +91,8 @@ PREPEND_PATH+= ${_GFORTRAN_DIR}/bin
. endif
# Add the dependency on gfortran.
-BUILDLINK_DEPMETHOD.gcc48= full
-. include "../../lang/gcc48/buildlink3.mk"
+BUILDLINK_DEPMETHOD.gcc${GFORTRAN_VERSION}= full
+. include "../../lang/gcc${GFORTRAN_VERSION}/buildlink3.mk"
. if defined(GFORTRAN_DIR) && !empty(GFORTRAN_DIR)
PKGSRC_MAKE_ENV+= GFORTRAN_DIR=${GFORTRAN_DIR:Q}