Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Nov 2017 13:09:56 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r454428 - in head: Mk Mk/Uses math/R math/libRmath
Message-ID:  <201711181309.vAID9uTg024227@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Sat Nov 18 13:09:56 2017
New Revision: 454428
URL: https://svnweb.freebsd.org/changeset/ports/454428

Log:
  - Allow users to change the default Fortran compiler via DEFAULT_VERSIONS.
  - Rename USES=fortran:gcc to the more appropriate USES=fortran:gfortran.
  - Change the options in math/R and math/libRmath so the choice becomes
    flang or default instead of flang or gfortran.  Use default Fortran
    compiler again on amd64.

Modified:
  head/Mk/Uses/fortran.mk
  head/Mk/bsd.default-versions.mk
  head/math/R/Makefile
  head/math/libRmath/Makefile

Modified: head/Mk/Uses/fortran.mk
==============================================================================
--- head/Mk/Uses/fortran.mk	Sat Nov 18 12:41:18 2017	(r454427)
+++ head/Mk/Uses/fortran.mk	Sat Nov 18 13:09:56 2017	(r454428)
@@ -4,7 +4,7 @@
 #
 # Feature:	fortran
 # Usage:	USES=fortran
-# Valid ARGS:	flang, gcc (default)
+# Valid ARGS:	flang, gfortran (default)
 #
 # MAINTAINER:	fortran@FreeBSD.org
 
@@ -12,7 +12,7 @@
 _INCLUDE_USES_FORTRAN_MK=	yes
 
 .if empty(fortran_ARGS)
-fortran_ARGS=	gcc
+fortran_ARGS=	${FORTRAN_DEFAULT}
 .endif
 
 .if ${fortran_ARGS} == flang
@@ -25,7 +25,7 @@ LDFLAGS+=	-L${LOCALBASE}/flang/lib -Wl,--as-needed -lf
 .else
 IGNORE=		USES=fortran: flang argument only available for amd64
 .endif
-.elif ${fortran_ARGS} == gcc
+.elif ${fortran_ARGS} == gfortran
 _GCC_VER=	${GCC_DEFAULT:S/.//}
 BUILD_DEPENDS+=	gfortran${_GCC_VER}:lang/gcc${_GCC_VER}
 RUN_DEPENDS+=	gfortran${_GCC_VER}:lang/gcc${_GCC_VER}

Modified: head/Mk/bsd.default-versions.mk
==============================================================================
--- head/Mk/bsd.default-versions.mk	Sat Nov 18 12:41:18 2017	(r454427)
+++ head/Mk/bsd.default-versions.mk	Sat Nov 18 13:09:56 2017	(r454428)
@@ -15,8 +15,8 @@ _INCLUDE_BSD_DEFAULT_VERSIONS_MK=	yes
 
 LOCALBASE?=	/usr/local
 
-.for lang in APACHE BDB FIREBIRD FPC GCC GHOSTSCRIPT LINUX LUA MYSQL PERL5 \
-	PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY SSL TCLTK
+.for lang in APACHE BDB FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT LINUX LUA MYSQL \
+	PERL5 PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY SSL TCLTK
 .if defined(${lang}_DEFAULT)
 WARNING+=	"The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
 WARNING+=	"This behaviour has never been supported and will be removed on 2017-01-31"
@@ -35,6 +35,8 @@ APACHE_DEFAULT?=	2.4
 BDB_DEFAULT?=		5
 # Possible values: 2.5
 FIREBIRD_DEFAULT?=	2.5
+# Possible values: flang (experimental), gfortran
+FORTRAN_DEFAULT?=	gfortran
 # Possible values: 3.0.0
 FPC_DEFAULT?=		3.0.2
 # Possible values: 4.8, 4.9, 5, 6, 7

Modified: head/math/R/Makefile
==============================================================================
--- head/math/R/Makefile	Sat Nov 18 12:41:18 2017	(r454427)
+++ head/math/R/Makefile	Sat Nov 18 13:09:56 2017	(r454428)
@@ -3,7 +3,7 @@
 
 PORTNAME=		R
 DISTVERSION=		3.4.2
-PORTREVISION=		2
+PORTREVISION=		3
 CATEGORIES=		math lang
 MASTER_SITES=		CRAN/src/base/R-${PORTVERSION:C|\..*||}
 
@@ -29,23 +29,20 @@ USES=			gmake iconv libtool localbase \
 USE_PERL5=		build
 USE_LDCONFIG=		${PREFIX}/lib/R/lib
 
-OPTIONS_DEFINE=		ICU INFO LDOUBLE LETTER LIBR MEMPROF NLS OPENMP RPROF X11
+OPTIONS_DEFINE=		FLANG ICU INFO LDOUBLE LETTER LIBR MEMPROF NLS OPENMP RPROF X11
+OPTIONS_EXCLUDE_aarch64=FLANG	# define+exclude for *_OFF option helpers
+OPTIONS_EXCLUDE_i386=	FLANG
 OPTIONS_GROUP=		NEEDX11
 OPTIONS_GROUP_NEEDX11=	GHOSTSCRIPT JPEG CAIROPANGO PNG TCLTK TEXDOCS TIFF
-OPTIONS_SINGLE=		BLAS FORTRAN
+OPTIONS_SINGLE=		BLAS
 OPTIONS_SINGLE_BLAS=	ATLAS OPENBLAS NETLIB RBLAS
-OPTIONS_SINGLE_FORTRAN=	${OPTIONS_SINGLE_FORTRAN_${MACHINE_ARCH}}
-OPTIONS_SINGLE_FORTRAN_i386=	GFORTRAN
-OPTIONS_SINGLE_FORTRAN_aarch64=	GFORTRAN
-OPTIONS_SINGLE_FORTRAN_amd64=	GFORTRAN FLANG
 
 OPTIONS_SUB=		YES
 
 ATLAS_DESC=		ATLAS BLAS implementation
-FLANG_DESC=		Build Fortran source with flang
+FLANG_DESC=		Use flang instead of the default Fortran compiler
 GHOSTSCRIPT_DESC=	Graphics device for bitmap files via Ghostscript
 CAIROPANGO_DESC=	Cairo graphics device and Pango multi-language text
-GFORTRAN_DESC=		Build Fortran source with gfortran
 INFO_DESC=		GNU info manuals
 JPEG_DESC=		JPEG graphics device
 LDOUBLE_DESC=		Long double data type
@@ -64,9 +61,6 @@ X11_DESC=		X11 graphics device
 
 OPTIONS_DEFAULT=	CAIROPANGO GHOSTSCRIPT ICU INFO JPEG LDOUBLE LIBR PNG \
 			RBLAS RPROF TCLTK TIFF X11
-OPTIONS_DEFAULT_aarch64=GFORTRAN
-OPTIONS_DEFAULT_amd64=	FLANG
-OPTIONS_DEFAULT_i386=	GFORTRAN
 
 ATLAS_USES=		blaslapack:atlas
 ATLAS_CONFIGURE_ON=	--disable-BLAS-shlib
@@ -77,9 +71,8 @@ CAIROPANGO_CONFIGURE_WITH=cairo
 CAIROPANGO_USES=	gettext jpeg pkgconfig
 CAIROPANGO_USE=		GNOME=pango,cairo
 FLANG_USES=		fortran:flang
+FLANG_USES_OFF=		fortran
 FLANG_PREVENTS=		ATLAS OPENBLAS NETLIB
-GFORTRAN_USES=		fortran:gcc
-GFORTRAN_RUN_DEPENDS=	wget:ftp/wget
 GHOSTSCRIPT_IMPLIES=	X11
 GHOSTSCRIPT_USES=	ghostscript
 ICU_CONFIGURE_WITH=	ICU

Modified: head/math/libRmath/Makefile
==============================================================================
--- head/math/libRmath/Makefile	Sat Nov 18 12:41:18 2017	(r454427)
+++ head/math/libRmath/Makefile	Sat Nov 18 13:09:56 2017	(r454428)
@@ -3,7 +3,7 @@
 
 PORTNAME=	libRmath
 DISTVERSION=	3.4.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	math lang
 MASTER_SITES=	CRAN/src/base/R-${PORTVERSION:C|\..*||}
 DISTNAME=	R-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
@@ -31,22 +31,13 @@ USE_LDCONFIG=	yes
 
 PLIST_SUB=	RMATH_SOVERSION="${RMATH_SOVERSION}"
 
-OPTIONS_SINGLE=		FORTRAN
-OPTIONS_SINGLE_FORTRAN=	${OPTIONS_SINGLE_FORTRAN_${MACHINE_ARCH}}
-OPTIONS_SINGLE_FORTRAN_amd64=	GFORTRAN FLANG
-OPTIONS_DEFAULT_amd64=	FLANG
+OPTIONS_DEFINE=		FLANG
+OPTIONS_EXCLUDE_aarch64=FLANG
+OPTIONS_EXCLUDE_i386=	FLANG
 
-FLANG_DESC=		Build Fortran source with flang
-GFORTRAN_DESC=		Build Fortran source with gfortran
-
-GFORTRAN_USES=		fortran:gcc
+FLANG_DESC=		Use flang instead of the default Fortran compiler
 FLANG_USES=		fortran:flang
-
-.include <bsd.port.options.mk>
-
-.if ${ARCH} != amd64
-USES+=		fortran:gcc
-.endif
+FLANG_USES_OFF=		fortran
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g'\



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