Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2015 21:56:21 +0100 (CET)
From:      Gerald Pfeifer <gerald@pfeifer.com>
To:        fortran@FreeBSD.org, Antoine Brodin <antoine@FreeBSD.org>
Subject:   Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING)
Message-ID:  <alpine.LSU.2.11.1501252154240.2527@tuna.site>

next in thread | raw e-mail | index | archive | help
[ No answers from fortran@ for nine days.  Antoine, perhaps
  something you can approve as portmgr@ ? ]

This patch avoids hardcoding of the version of GCC in lang/gcc
in Uses/fortran.mk.

It does so by moving the variable LANG_GCC_IS from bsd.mk.gcc
to bsd.default-versions.mk and using it both in bsd.mk.gcc and
Uses/fortran.mk.

Okay for me to commit?

(I tested by tweaking LANG_GCC_IS and GCC_DEFAULT in various ways
and inspecting the settings of variables in consequence.)

Gerald @FreeBSD.org


PS: Antoine, this should address your comment in PR/196712 in a
different and permanent matter. :-)


Index: Uses/fortran.mk
===================================================================
--- Uses/fortran.mk	(revision 377007)
+++ Uses/fortran.mk	(working copy)
@@ -18,7 +18,7 @@
 .if ${fortran_ARGS} == gcc
 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
 _GCC_VER=	${GCC_DEFAULT:S/.//}
-.if ${_GCC_VER} == 48
+.if ${GCC_DEFAULT} == ${LANG_GCC_IS}
 BUILD_DEPENDS+=	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc
 RUN_DEPENDS+=	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc
 .else
Index: bsd.default-versions.mk
===================================================================
--- bsd.default-versions.mk	(revision 377007)
+++ bsd.default-versions.mk	(working copy)
@@ -34,3 +34,6 @@
 FIREBIRD_DEFAULT?=	2.5
 
 .endif
+
+# Version of lang/gcc.  Do not override!
+LANG_GCC_IS=		4.8
Index: bsd.gcc.mk
===================================================================
--- bsd.gcc.mk	(revision 377007)
+++ bsd.gcc.mk	(working copy)
@@ -47,9 +47,6 @@
 GCCVERSION_040900=	     0       0 4.9
 GCCVERSION_050000=	     0       0 5
 
-# Version of lang/gcc
-LANG_GCC_IS=	4.8
-
 # No configurable parts below this. ####################################
 #
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.LSU.2.11.1501252154240.2527>