Date: Sun, 25 Jan 2015 22:14:33 +0100 From: Antoine Brodin <antoine@FreeBSD.org> To: Gerald Pfeifer <gerald@pfeifer.com> Cc: Tijl Coosemans <tijl@freebsd.org>, fortran@freebsd.org Subject: Re: Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING) Message-ID: <CAALwa8kjsnfFN-B87vz02eo_ipjb1ct0Rv3w9iAmugfGLTdSsg@mail.gmail.com> In-Reply-To: <alpine.LSU.2.11.1501252154240.2527@tuna.site> References: <alpine.LSU.2.11.1501252154240.2527@tuna.site>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 25, 2015 at 9:56 PM, Gerald Pfeifer <gerald@pfeifer.com> wrote: > [ No answers from fortran@ for nine days. Antoine, perhaps > something you can approve as portmgr@ ? ] Hi, I didn't test but this looks ok. I think the LANG_GCC_IS assignement can be moved before the .endif Cheers, Antoine > > 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?CAALwa8kjsnfFN-B87vz02eo_ipjb1ct0Rv3w9iAmugfGLTdSsg>