gfortran (was: Any chances to reduce number of gcc ports/packages which are installed as BINARY PACKAGES dependencies?)

Diane Bruce db at db.net
Mon Nov 23 23:03:27 UTC 2015


It looks good to me. 

On Mon, Nov 23, 2015 at 01:16:38AM +0100, Gerald Pfeifer wrote:
> On Tue, 22 Jul 2014, Diane Bruce wrote:
> > Any chance we could have a script "gfortran" which by default
> > ran the default gcc from bsd.default-versions.mk and make.conf ?
> 
> I know this took a little, ahem, but what do you think about
> the patch below?
> 
> With this change, lang/gcc, our canonical GCC port, now features
> gfortran as well as gcc and g++ without the appended major version 
> number.
> 
> (Not committed yet; feedback very welcome.)
> 
> Gerald
> 
> Index: Makefile
> ===================================================================
> --- Makefile	(revision 402204)
> +++ Makefile	(working copy)
> @@ -3,6 +3,7 @@
>  
>  PORTNAME=	gcc
>  PORTVERSION=	4.8.5
> +PORTREVISION=	1
>  CATEGORIES=	lang java
>  MASTER_SITES=	GCC/releases/gcc-${DISTVERSION}
>  
> @@ -158,5 +159,10 @@
>  	fi
>  .endfor
>  	cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
> +	# This is the canonical GCC port, so add key commands without
> +	# version numbers as part of their names.
> +	for c in gfortran g++ gcc; do \
> +	    ${LN} -s ${PREFIX}/bin/$$c${SUFFIX} ${STAGEDIR}${PREFIX}/bin/$$c; \
> +	done
>  
>  .include <bsd.port.post.mk>
> Index: pkg-plist
> ===================================================================
> --- pkg-plist	(revision 402204)
> +++ pkg-plist	(working copy)
> @@ -8,12 +8,15 @@
>  bin/%%GNU_HOST%%-gfortran%%SUFFIX%%
>  bin/c++%%SUFFIX%%
>  bin/cpp%%SUFFIX%%
> +bin/g++
>  bin/g++%%SUFFIX%%
> +bin/gcc
>  bin/gcc%%SUFFIX%%
>  bin/gcc-ar%%SUFFIX%%
>  bin/gcc-nm%%SUFFIX%%
>  bin/gcc-ranlib%%SUFFIX%%
>  bin/gcov%%SUFFIX%%
> +bin/gfortran
>  bin/gfortran%%SUFFIX%%
>  @comment info/gcc%%SUFFIX%%/dir
>  man/man1/cpp%%SUFFIX%%.1.gz
> 

-- 
- db at FreeBSD.org db at db.net http://www.db.net/~db


More information about the freebsd-ports mailing list