From owner-freebsd-fortran@FreeBSD.ORG Fri Jan 16 09:31:32 2015 Return-Path: Delivered-To: fortran@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 524869CD; Fri, 16 Jan 2015 09:31:32 +0000 (UTC) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0424D405; Fri, 16 Jan 2015 09:31:28 +0000 (UTC) Received: from tuna.dhcp.nue.suse.com (nat.nue.novell.com [195.135.221.2]) by ainaz.pair.com (Postfix) with ESMTPSA id 9693A3F4BD; Fri, 16 Jan 2015 04:31:20 -0500 (EST) Date: Fri, 16 Jan 2015 10:31:19 +0100 (CET) From: Gerald Pfeifer To: fortran@FreeBSD.org, Antoine Brodin Subject: Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 09:31:32 -0000 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. #################################### #