Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING)
Antoine Brodin
antoine at FreeBSD.org
Sun Jan 25 21:14:38 UTC 2015
On Sun, Jan 25, 2015 at 9:56 PM, Gerald Pfeifer <gerald at 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. ####################################
> #
>
More information about the freebsd-fortran
mailing list