summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-01-12 15:31:58 +0000
committerjlam <jlam@pkgsrc.org>2005-01-12 15:31:58 +0000
commitb6b853727dc16c84fba65c5d610f333d83e309ff (patch)
treec0c77d22dc6d7622e4196a9cf79e6fc77ed93ceb
parent98d6a371a10bb43601330b19f60f71ceb54ac6d2 (diff)
downloadpkgsrc-b6b853727dc16c84fba65c5d610f333d83e309ff.tar.gz
Nuke USE_FORTRAN and bring the f2c handling within the mk/compiler
framework. The list of changes include: * Modify compiler.mk so that "c" is always prepended to USE_LANGUAGES, so we no longer need to say it in package Makefiles. Packages should now append to USE_LANGUAGES instead of setting it. * Create mk/compiler/f2c.mk which implements another pseudo-compiler "f2c" that may be used with any C compiler backend, e.g. PKGSRC_COMPILER= f2c ccache gcc * Teach the various "real" compiler files, e.g., sunpro.mk, mipspro.mk, etc., to use f2c if the native Fortran compiler isn't present. Packages that use Fortran should now simply include the line: USE_LANGUAGES+= fortran in the package Makefile.
-rw-r--r--benchmarks/benchfft/Makefile4
-rw-r--r--cad/tnt-mmtl/Makefile3
-rw-r--r--devel/hdf/Makefile4
-rw-r--r--devel/netcdf/Makefile3
-rw-r--r--doc/CHANGES4
-rw-r--r--graphics/plplot/Makefile4
-rw-r--r--math/R/Makefile3
-rw-r--r--math/algae/Makefile4
-rw-r--r--math/blas/Makefile4
-rw-r--r--math/dcdflib.f/Makefile4
-rw-r--r--math/dfftpack/Makefile6
-rw-r--r--math/eispack/Makefile6
-rw-r--r--math/fftpack/Makefile6
-rw-r--r--math/fftw/Makefile4
-rw-r--r--math/fftw2/Makefile6
-rw-r--r--math/grace/Makefile4
-rw-r--r--math/lapack/Makefile4
-rw-r--r--math/linpack/Makefile4
-rw-r--r--math/minpack/Makefile6
-rw-r--r--math/octave-current/Makefile4
-rw-r--r--math/octave/Makefile4
-rw-r--r--math/odepack/Makefile6
-rw-r--r--math/quadpack/Makefile6
-rw-r--r--math/scilab/Makefile4
-rw-r--r--math/slatec/Makefile4
-rw-r--r--math/tela/Makefile6
-rw-r--r--math/xmgr/Makefile6
-rw-r--r--misc/molden/Makefile4
-rw-r--r--mk/bsd.pkg.mk40
-rw-r--r--mk/compiler.mk23
-rw-r--r--mk/compiler/ccc.mk12
-rw-r--r--mk/compiler/f2c.mk93
-rw-r--r--mk/compiler/gcc.mk19
-rw-r--r--mk/compiler/mipspro.mk12
-rw-r--r--mk/compiler/sunpro.mk12
-rw-r--r--mk/compiler/xlc.mk12
-rw-r--r--parallel/mpi-ch/Makefile6
-rw-r--r--parallel/pvm3/Makefile4
38 files changed, 247 insertions, 113 deletions
diff --git a/benchmarks/benchfft/Makefile b/benchmarks/benchfft/Makefile
index 84ea72b0ecd..87f314b4df5 100644
--- a/benchmarks/benchfft/Makefile
+++ b/benchmarks/benchfft/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2004/11/01 15:07:51 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2005/01/12 15:31:58 jlam Exp $
DISTNAME= benchfft-2.0
PKGREVISION= 1
@@ -16,7 +16,7 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
GNU_CONFIGURE= yes
USE_BUILDLINK3= yes
USE_GNU_TOOLS+= make
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
USE_LIBTOOL= yes
LTCONFIG_OVERRIDE= ${WRKDIR}/fftw-2.0.1/ltconfig
diff --git a/cad/tnt-mmtl/Makefile b/cad/tnt-mmtl/Makefile
index 1326e90be1d..ff900c806c3 100644
--- a/cad/tnt-mmtl/Makefile
+++ b/cad/tnt-mmtl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2004/10/03 00:13:13 tv Exp $
+# $NetBSD: Makefile,v 1.3 2005/01/12 15:31:58 jlam Exp $
#
DISTNAME= tnt-1.2.2
@@ -20,7 +20,6 @@ GNU_CONFIGURE= YES
USE_BUILDLINK3= YES
USE_GNU_TOOLS+= make
USE_LANGUAGES= c c++ fortran
-USE_FORTRAN= YES
post-patch:
${MV} ${WRKSRC}/tnt ${WRKSRC}/tnt-mmtl
diff --git a/devel/hdf/Makefile b/devel/hdf/Makefile
index 3e03bab127c..6a6c731fcc3 100644
--- a/devel/hdf/Makefile
+++ b/devel/hdf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2004/10/03 00:13:28 tv Exp $
+# $NetBSD: Makefile,v 1.20 2005/01/12 15:31:59 jlam Exp $
DISTNAME= HDF4.2r0
PKGNAME= hdf-4.2r0
@@ -10,7 +10,7 @@ MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://hdf.ncsa.uiuc.edu/hdf4.html
COMMENT= NCSA Hierarchical Data Format
-USE_FORTRAN= # defined
+USE_LANGUAGES= fortran
USE_BUILDLINK3= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-szlib
diff --git a/devel/netcdf/Makefile b/devel/netcdf/Makefile
index 69a6896e3a9..7730f140b7f 100644
--- a/devel/netcdf/Makefile
+++ b/devel/netcdf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2004/11/10 09:33:18 markd Exp $
+# $NetBSD: Makefile,v 1.21 2005/01/12 15:32:00 jlam Exp $
DISTNAME= netcdf-3.5.0
PKGREVISION= 2
@@ -12,7 +12,6 @@ COMMENT= Library for array-oriented data access
WRKSRC= ${WRKDIR}/${DISTNAME}/src
USE_BUILDLINK3= yes
-USE_FORTRAN= # defined
USE_LANGUAGES= c c++ fortran
USE_LIBTOOL= # defined
GNU_CONFIGURE= # defined
diff --git a/doc/CHANGES b/doc/CHANGES
index e1b945d7782..d4527ea6aa5 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.8717 2005/01/12 14:04:44 xtraeme Exp $
+$NetBSD: CHANGES,v 1.8718 2005/01/12 15:31:59 jlam Exp $
Changes to the packages collection and infrastructure in 2005:
@@ -263,3 +263,5 @@ Changes to the packages collection and infrastructure in 2005:
Added pbzip2-0.8.3 [wiz 2005-01-12]
Added ladspa-1.12 [xtraeme 2005-01-12]
Added terminatorx-3.82 [xtraeme 2005-01-12]
+ bsd.pkg.mk: deprecate USE_FORTRAN in favor of USE_LANGUAGES+=fortran
+ [jlam 2005-01-12]
diff --git a/graphics/plplot/Makefile b/graphics/plplot/Makefile
index 7271c56efcc..265b11dd090 100644
--- a/graphics/plplot/Makefile
+++ b/graphics/plplot/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2004/10/15 11:54:11 tv Exp $
+# $NetBSD: Makefile,v 1.39 2005/01/12 15:32:00 jlam Exp $
DISTNAME= plplot-5.2.1
PKGREVISION= 3
@@ -12,7 +12,7 @@ COMMENT= Scientific plotting package
USE_BUILDLINK3= yes
GNU_CONFIGURE= # defined
USE_GNU_TOOLS+= m4 make
-USE_FORTRAN= # defined
+USE_LANGUAGES= fortran
USE_X11= # defined
USE_PERL5= build
USE_LIBTOOL= # defined
diff --git a/math/R/Makefile b/math/R/Makefile
index b8fbefd57e4..7e138423f49 100644
--- a/math/R/Makefile
+++ b/math/R/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.59 2004/11/18 12:31:29 markd Exp $
+# $NetBSD: Makefile,v 1.60 2005/01/12 15:32:00 jlam Exp $
DISTNAME= R-2.0.1
CATEGORIES= math
@@ -51,7 +51,6 @@ CONFIGURE_ENV+= ac_cv_lib_blas_dgemm_=yes
# Pass the Fortran compiler to the configure script in case it's overridden
# by the package builder.
#
-USE_FORTRAN= # defined
USE_LANGUAGES= c fortran
# Package assumes it can append to files (specifically DESCRIPTION) that have
diff --git a/math/algae/Makefile b/math/algae/Makefile
index dd53da3610e..f1d2f4502e9 100644
--- a/math/algae/Makefile
+++ b/math/algae/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2004/10/03 00:12:55 tv Exp $
+# $NetBSD: Makefile,v 1.12 2005/01/12 15:32:00 jlam Exp $
DISTNAME= algae-4.1.3
PKGREVISION= 2
@@ -12,7 +12,7 @@ COMMENT= Interpreted language for numerical analysis
DEPENDS+= gnuplot>=3.5:../../graphics/gnuplot
GNU_CONFIGURE= # defined
-USE_FORTRAN= # defined
+USE_LANGUAGES= fortran
USE_BUILDLINK3= yes
USE_GNU_READLINE= # uses history_truncate_file
diff --git a/math/blas/Makefile b/math/blas/Makefile
index e720b65fc10..d7a748c83ce 100644
--- a/math/blas/Makefile
+++ b/math/blas/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2004/10/03 00:12:55 tv Exp $
+# $NetBSD: Makefile,v 1.20 2005/01/12 15:32:00 jlam Exp $
#
DISTNAME= blas
@@ -17,8 +17,8 @@ COMMENT= Basic Linear Algebra Subprograms (Fortran)
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
+USE_LANGUAGES= fortran
USE_BUILDLINK3= YES
-USE_FORTRAN= YES
USE_LIBTOOL= YES
INSTALLATION_DIRS= lib
diff --git a/math/dcdflib.f/Makefile b/math/dcdflib.f/Makefile
index 41174753231..37aa94ada91 100644
--- a/math/dcdflib.f/Makefile
+++ b/math/dcdflib.f/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2004/10/03 00:12:55 tv Exp $
+# $NetBSD: Makefile,v 1.8 2005/01/12 15:32:00 jlam Exp $
DISTNAME= dcdflib.f-1.1
PKGREVISION= 1
@@ -10,7 +10,7 @@ HOMEPAGE= http://odin.mdacc.tmc.edu/anonftp/
COMMENT= Library of Fortran Routines for Cumulative Distribution Functions
WRKSRC= ${WRKDIR}/dcdflib.f/src
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/dcdflib.f
diff --git a/math/dfftpack/Makefile b/math/dfftpack/Makefile
index 29f2d280a3f..10a1775eda1 100644
--- a/math/dfftpack/Makefile
+++ b/math/dfftpack/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2004/10/03 00:12:55 tv Exp $
+# $NetBSD: Makefile,v 1.11 2005/01/12 15:32:00 jlam Exp $
DISTNAME= dfftpack-20001209
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -9,7 +9,7 @@ MAINTAINER= tech-pkg@NetBSD.org
COMMENT= Double precision version of FFTPACK
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
WRKSRC= ${WRKDIR}/dfftpack
post-extract:
diff --git a/math/eispack/Makefile b/math/eispack/Makefile
index 015bf81fcb1..5a2d2246256 100644
--- a/math/eispack/Makefile
+++ b/math/eispack/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2004/10/03 00:12:55 tv Exp $
+# $NetBSD: Makefile,v 1.11 2005/01/12 15:32:00 jlam Exp $
DISTNAME= eispack-20001130
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -9,7 +9,7 @@ MAINTAINER= tech-pkg@NetBSD.org
COMMENT= Fortran routines for the solution of eigenvalue problems
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
WRKSRC= ${WRKDIR}/eispack
pre-build:
diff --git a/math/fftpack/Makefile b/math/fftpack/Makefile
index 50a7027135c..45f05a4fa74 100644
--- a/math/fftpack/Makefile
+++ b/math/fftpack/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2004/10/03 00:12:56 tv Exp $
+# $NetBSD: Makefile,v 1.13 2005/01/12 15:32:00 jlam Exp $
DISTNAME= fftpack-20001130
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -9,7 +9,7 @@ MAINTAINER= tech-pkg@NetBSD.org
COMMENT= Single precision Fortran FFT subroutines
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
WRKSRC= ${WRKDIR}/fftpack
post-extract:
diff --git a/math/fftw/Makefile b/math/fftw/Makefile
index af06dd37650..0ff2f5f9519 100644
--- a/math/fftw/Makefile
+++ b/math/fftw/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2004/10/03 00:12:56 tv Exp $
+# $NetBSD: Makefile,v 1.17 2005/01/12 15:32:01 jlam Exp $
.if (${MACHINE_ARCH} == "powerpc")
DISTNAME= fftw-3.0.1-fma
@@ -19,7 +19,7 @@ USE_LIBTOOL= yes
PKGCONFIG_OVERRIDE+= fftw.pc.in
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-shared
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
USE_GNU_TOOLS+= make
INFO_FILES= fftw3.info
diff --git a/math/fftw2/Makefile b/math/fftw2/Makefile
index 942c8ac13e7..5e1371b6fa9 100644
--- a/math/fftw2/Makefile
+++ b/math/fftw2/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2004/10/03 00:12:56 tv Exp $
+# $NetBSD: Makefile,v 1.9 2005/01/12 15:32:01 jlam Exp $
DISTNAME= fftw-2.1.5
PKGNAME= fftw2-2.1.5
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.fftw.org/pub/fftw/ \
http://www.fftw.org/
@@ -19,7 +19,7 @@ CONFIGURE_ARGS= --enable-shared
CONFIGURE_ARGS+= --enable-i386-hacks
.endif
USE_BUILDLINK3= yes
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
USE_GNU_TOOLS+= make
USE_MAKEINFO= yes
INFO_FILES= fftw.info
diff --git a/math/grace/Makefile b/math/grace/Makefile
index bc590bfb462..fa3ad5390f9 100644
--- a/math/grace/Makefile
+++ b/math/grace/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2004/12/28 23:18:17 reed Exp $
+# $NetBSD: Makefile,v 1.34 2005/01/12 15:32:01 jlam Exp $
#
DISTNAME= grace-5.1.14
@@ -19,7 +19,7 @@ COMMENT= GRaphing, Advanced Computation and Exploration of data
USE_BUILDLINK3= YES
USE_X11BASE= YES
USE_GNU_TOOLS+= make
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --enable-grace-home=${PREFIX}/grace
CONFIGURE_ARGS+= --without-bundled-xbae
diff --git a/math/lapack/Makefile b/math/lapack/Makefile
index d12ed79e86f..985b6c62b11 100644
--- a/math/lapack/Makefile
+++ b/math/lapack/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2005/01/03 15:33:55 wennmach Exp $
+# $NetBSD: Makefile,v 1.19 2005/01/12 15:32:01 jlam Exp $
#
DISTNAME= lapack
@@ -21,7 +21,7 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}/LAPACK
DIST_SUBDIR= lapack-20010201
USE_BUILDLINK3= YES
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
USE_LIBTOOL= YES
BUILD_TARGET= lapacklib
diff --git a/math/linpack/Makefile b/math/linpack/Makefile
index c998bb22775..63c87e15184 100644
--- a/math/linpack/Makefile
+++ b/math/linpack/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2004/10/03 00:12:56 tv Exp $
+# $NetBSD: Makefile,v 1.9 2005/01/12 15:32:01 jlam Exp $
DISTNAME= linpack-20010510
PKGREVISION= 1
@@ -11,7 +11,7 @@ COMMENT= Library of linear algebra Fortran routines
DEPENDS+= blas-[0-9]*:../../math/blas
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
WRKSRC= ${WRKDIR}/linpack
.include "../../mk/bsd.pkg.mk"
diff --git a/math/minpack/Makefile b/math/minpack/Makefile
index 4736b86c15e..51d37bb1f3a 100644
--- a/math/minpack/Makefile
+++ b/math/minpack/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2004/10/03 00:12:56 tv Exp $
+# $NetBSD: Makefile,v 1.10 2005/01/12 15:32:01 jlam Exp $
DISTNAME= minpack-20001130
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -9,7 +9,7 @@ MAINTAINER= tech-pkg@NetBSD.org
COMMENT= FORTRAN 77 library for the solution of nonlinear equations
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
WRKSRC= ${WRKDIR}/minpack
pre-build:
diff --git a/math/octave-current/Makefile b/math/octave-current/Makefile
index 7f463bbc0bd..383e4999cac 100644
--- a/math/octave-current/Makefile
+++ b/math/octave-current/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2004/12/05 11:17:54 adam Exp $
+# $NetBSD: Makefile,v 1.39 2005/01/12 15:32:01 jlam Exp $
DISTNAME= octave-${OCTAVE_VER}
PKGNAME= octave-current-${OCTAVE_VER}
@@ -25,7 +25,7 @@ BROKEN= Internal compiler error occurs on arm32 (even with gcc-2.95.3)
.endif
USE_BUILDLINK3= yes
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
USE_GNU_TOOLS+= make
USE_GNU_READLINE= yes
USE_MAKEINFO= yes
diff --git a/math/octave/Makefile b/math/octave/Makefile
index 2bde2c665e1..e41f43ed8cb 100644
--- a/math/octave/Makefile
+++ b/math/octave/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2004/10/03 00:12:57 tv Exp $
+# $NetBSD: Makefile,v 1.50 2005/01/12 15:32:01 jlam Exp $
# FreeBSD Id: Makefile,v 1.18 1998/09/27 20:10:45 steve Exp
DISTNAME= octave-2.0.17
@@ -23,7 +23,7 @@ CONFLICTS+= octave-2.1.*
USE_BUILDLINK3= yes
USE_X11= yes
GNU_CONFIGURE= yes
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
USE_LIBTOOL= yes
USE_GNU_TOOLS+= make
CONFIGURE_ENV+= FFLAGS="${CFLAGS}" OBJECT_FMT="${OBJECT_FMT}"
diff --git a/math/odepack/Makefile b/math/odepack/Makefile
index 11441664d5f..1ad6ed0fd1c 100644
--- a/math/odepack/Makefile
+++ b/math/odepack/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.14 2004/10/03 00:12:57 tv Exp $
+# $NetBSD: Makefile,v 1.15 2005/01/12 15:32:01 jlam Exp $
DISTNAME= odepack-20001130
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -11,7 +11,7 @@ COMMENT= Systematized Collection of ODE Solvers
DEPENDS+= linpack>=20010427:../../math/linpack
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
WRKSRC= ${WRKDIR}/odepack
pre-build:
diff --git a/math/quadpack/Makefile b/math/quadpack/Makefile
index a0a480f89fc..80e16d6309b 100644
--- a/math/quadpack/Makefile
+++ b/math/quadpack/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.11 2004/10/03 00:12:57 tv Exp $
+# $NetBSD: Makefile,v 1.12 2005/01/12 15:32:01 jlam Exp $
DISTNAME= quadpack-20001130
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -9,7 +9,7 @@ MAINTAINER= tech-pkg@NetBSD.org
COMMENT= Fortran subroutines for the solution of definite univariate integrals
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
WRKSRC= ${WRKDIR}/quadpack
pre-build:
diff --git a/math/scilab/Makefile b/math/scilab/Makefile
index dcb9db9fe85..6080d409fe5 100644
--- a/math/scilab/Makefile
+++ b/math/scilab/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2004/12/24 17:21:01 jmmv Exp $
+# $NetBSD: Makefile,v 1.59 2005/01/12 15:32:01 jlam Exp $
#
DISTNAME= ${SCIBASE}.src
@@ -19,7 +19,7 @@ NOT_FOR_PLATFORM= NetBSD-1.[0-4]*-alpha NetBSD-1.5-alpha \
NetBSD-1.5.*-alpha NetBSD-1.5[A-U]-alpha
USE_BUILDLINK3= yes
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
USE_X11BASE= yes
USE_LIBTOOL= yes
diff --git a/math/slatec/Makefile b/math/slatec/Makefile
index cd77767369f..5786ff0c3cb 100644
--- a/math/slatec/Makefile
+++ b/math/slatec/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2004/10/03 00:12:57 tv Exp $
+# $NetBSD: Makefile,v 1.15 2005/01/12 15:32:01 jlam Exp $
#
DISTNAME= slatec_src
@@ -18,7 +18,7 @@ COMMENT= Library of mathematical and statistical Fortran 77 subroutines
WRKSRC= ${WRKDIR}/src
USE_BUILDLINK3= YES
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
USE_LIBTOOL= YES
post-extract:
diff --git a/math/tela/Makefile b/math/tela/Makefile
index 797dfe632cf..c896e09c263 100644
--- a/math/tela/Makefile
+++ b/math/tela/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.16 2004/10/03 00:12:57 tv Exp $
+# $NetBSD: Makefile,v 1.17 2005/01/12 15:32:01 jlam Exp $
DISTNAME= tela-1.34
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.funet.fi/pub/sci/math/tela/ \
ftp://sumppu.fmi.fi/pub/tela/
@@ -13,7 +13,7 @@ COMMENT= Tensor Language - a programming language for scientific computing
DEPENDS+= plotmtv-[0-9]*:../../graphics/plotmtv
GNU_CONFIGURE= # defined
-USE_FORTRAN= # defined
+USE_LANGUAGES= fortran
USE_X11= # defined
USE_BUILDLINK3= yes
diff --git a/math/xmgr/Makefile b/math/xmgr/Makefile
index a478d01da74..98e50c7254e 100644
--- a/math/xmgr/Makefile
+++ b/math/xmgr/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.19 2004/12/03 15:15:03 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2005/01/12 15:32:01 jlam Exp $
# FreeBSD Id: Makefile,v 1.13 1998/12/12 22:27:21 jseger Exp
#
DISTNAME= xmgr-4.1.2
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://plasma-gate.weizmann.ac.il/pub/xmgr4/src/ \
ftp://plasma-gate.weizmann.ac.il/pub/xmgr4/src/old/ \
@@ -20,7 +20,7 @@ BUILD_DEPENDS= bison-[0-9]*:../../devel/bison
USE_BUILDLINK3= YES
USE_X11BASE= YES
-USE_FORTRAN= YES
+USE_LANGUAGES= fortran
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --enable-acegr-home="${PREFIX}"
diff --git a/misc/molden/Makefile b/misc/molden/Makefile
index a2c7576b026..a0c19fa96c3 100644
--- a/misc/molden/Makefile
+++ b/misc/molden/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2004/12/03 15:15:04 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2005/01/12 15:32:01 jlam Exp $
DISTNAME= molden4.2
PKGNAME= ${DISTNAME:S/molden/&-/}
@@ -17,7 +17,7 @@ BUILD_TARGET= molden
USE_BUILDLINK3= yes
USE_X11= # defined
-USE_FORTRAN= # defined
+USE_LANGUAGES= fortran
INTERACTIVE_STAGE= fetch
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 095ee320003..ccc1ec26c69 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1556 2005/01/11 20:09:14 jmmv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1557 2005/01/12 15:32:01 jlam Exp $
#
# This file is in the public domain.
#
@@ -341,34 +341,6 @@ MAKEFLAGS+= PERL5_ARCHLIB=${PERL5_ARCHLIB:Q}
. endif # !defined(PERL5_*)
.endif # USE_PERL5 == run
-.if defined(USE_FORTRAN)
-. if !exists(/usr/bin/f77)
-PKG_FC?= f2c-f77
-. endif
-# it is anticipated that once /usr/bin/f77 is more stable that the following
-# default will be changed to f77. However, in the case where there is no
-# /usr/bin/f77, the default will remain as f2c-f77.
-.for __tmp__ in 1.[5-9]* [2-9].*
-. if ${MACHINE_PLATFORM:MNetBSD-${__tmp__}-*} != ""
-PKG_FC?= f77
-. endif # MACHINE_PLATFORM
-.endfor # __tmp__
-PKG_FC?= f2c-f77
-. if (${PKG_FC} == "f2c-f77")
-# this is a DEPENDS not BUILD_DEPENDS because of the
-# shared Fortran libs
-. if !empty(USE_BUILDLINK3:M[yY][eE][sS])
-. include "../../lang/f2c/buildlink3.mk"
-. else
-DEPENDS+= f2c>=20001205nb3:../../lang/f2c
-. endif
-. endif
-FC= ${PKG_FC}
-F77= ${PKG_FC}
-MAKE_ENV+= F77="${F77}"
-MAKE_ENV+= FC="${FC}"
-.endif
-
# Automatically increase process limit where necessary for building.
_ULIMIT_CMD=
.if defined(UNLIMIT_RESOURCES)
@@ -407,12 +379,12 @@ _SHLIBTOOL?= ${PKG_SHLIBTOOL}
LIBTOOL?= ${PKG_LIBTOOL}
SHLIBTOOL?= ${PKG_SHLIBTOOL}
.if defined(USE_LIBTOOL)
-. if defined(USE_FORTRAN)
+. if defined(USE_LANGUAGES) && !empty(USE_LANGUAGES:Mfortran)
LIBTOOL_REQD?= 1.5.10nb7
BUILD_DEPENDS+= libtool-base>=${LIBTOOL_REQD}:../../devel/libtool-base
. else
LIBTOOL_REQD?= 1.5.10nb1
-BUILD_DEPENDS+= libtool-base>=${_OPSYS_LIBTOOL_REQD:U${LIBTOOL_REQD}}:../../devel/libtool-base
+BUILD_DEPENDS+= libtool-base>=${_OPSYS_LIBTOOL_REQD}:../../devel/libtool-base
. endif
CONFIGURE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
@@ -487,6 +459,12 @@ MAKE_ENV+= CPP="${CPP}"
.if defined(CXXFLAGS)
MAKE_ENV+= CXXFLAGS="${CXXFLAGS}"
.endif
+.if defined(F77)
+MAKE_ENV+= F77="${F77}"
+.endif
+.if defined(FC)
+MAKE_ENV+= FC="${FC}"
+.endif
TOUCH_FLAGS?= -f
diff --git a/mk/compiler.mk b/mk/compiler.mk
index 342694b4798..08854fae6bf 100644
--- a/mk/compiler.mk
+++ b/mk/compiler.mk
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.42 2005/01/10 09:05:01 jlam Exp $
+# $NetBSD: compiler.mk,v 1.43 2005/01/12 15:32:01 jlam Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
@@ -13,6 +13,7 @@
# ccc Compaq C Compilers (Tru64)
# ccache compiler cache (chainable)
# distcc distributed C/C++ (chainable)
+# f2c Fortran 77 to C compiler (chainable)
# gcc GNU
# mipspro Silicon Graphics, Inc. MIPSpro (n32/n64)
# mipspro-ucode Silicon Graphics, Inc. MIPSpro (o32)
@@ -20,10 +21,12 @@
# ONE Studio
# xlc IBM's XL C/C++ compiler suite
#
-# The default is "gcc". You can use ccache and/or distcc with an
-# appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
-# The chain should always end in a real compiler. This should only
-# be set in /etc/mk.conf.
+# The default is "gcc". You can use ccache and/or distcc with
+# an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc
+# gcc". You can also use "f2c" to overlay the lang/f2c package
+# over the C compiler instead of using the system Fortran
+# compiler. The chain should always end in a real compiler.
+# This should only be set in /etc/mk.conf.
#
# GCC_REQD
# A list of version numbers used to determine the minimum
@@ -45,7 +48,7 @@
# Lists the languages used in the source code of the package,
# and is used to determine the correct compilers to install.
# Valid values are: c, c++, fortran, java, objc. The default
-# is "c".
+# is "c" ("c" is actually _always_ implicitly in this list).
#
# The following variables are defined, and available for testing in
# package Makefiles:
@@ -65,20 +68,24 @@ BSD_COMPILER_MK= defined
.include "../../mk/bsd.prefs.mk"
-# By default, assume that the package requires a C compiler.
+# Always require a C compiler for proper compiler detection.
USE_LANGUAGES?= c
+.if empty(USE_LANGUAGES:Mc)
+USE_LANGUAGES:= c ${USE_LANGUAGES}
+.endif
# Default to using gcc.
PKGSRC_COMPILER?= gcc
# For environments where there is an external gcc too, but pkgsrc
# should use the pkgsrc one for consistency.
+#
.if defined(USE_PKGSRC_GCC)
_USE_PKGSRC_GCC= yes
.endif
_COMPILERS= ccc gcc mipspro mipspro-ucode sunpro xlc
-_PSEUDO_COMPILERS= ccache distcc
+_PSEUDO_COMPILERS= ccache distcc f2c
.if defined(NOT_FOR_COMPILER) && !empty(NOT_FOR_COMPILER)
. for _compiler_ in ${_COMPILERS}
diff --git a/mk/compiler/ccc.mk b/mk/compiler/ccc.mk
index 395e74f9cec..7ae44d3d3a2 100644
--- a/mk/compiler/ccc.mk
+++ b/mk/compiler/ccc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: ccc.mk,v 1.6 2004/11/30 14:50:37 jlam Exp $
+# $NetBSD: ccc.mk,v 1.7 2005/01/12 15:32:01 jlam Exp $
.if !defined(COMPILER_CCC_MK)
COMPILER_CCC_MK= defined
@@ -84,4 +84,14 @@ ${_CCC_${_var_}}:
. endif
.endfor
+# Force the use of f2c-f77 for compiling Fortran.
+_CCC_USE_F2C= no
+FCPATH= /nonexistent
+.if !exists(${FCPATH})
+_CCC_USE_F2C= yes
+.endif
+.if !empty(_CCC_USE_F2C:M[yY][eE][sS])
+. include "../../mk/compiler/f2c.mk"
+.endif
+
.endif # COMPILER_CCC_MK
diff --git a/mk/compiler/f2c.mk b/mk/compiler/f2c.mk
new file mode 100644
index 00000000000..72228eb3bbf
--- /dev/null
+++ b/mk/compiler/f2c.mk
@@ -0,0 +1,93 @@
+# $NetBSD: f2c.mk,v 1.1 2005/01/12 15:32:01 jlam Exp $
+
+.if !defined(COMPILER_F2C_MK)
+COMPILER_F2C_MK= defined
+
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(PKGPATH:Mlang/f2c) || !empty(PKGPATH:Mdevel/patch) || \
+ !empty(PKGPATH:Mdevel/libtool-base)
+IGNORE_F2C= yes
+MAKEFLAGS+= IGNORE_F2C=yes
+.endif
+
+.if defined(IGNORE_F2C)
+_USE_F2C= NO
+.endif
+
+# LANGUAGES.<compiler> is the list of supported languages by the compiler.
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
+# requested by the package in USE_LANGUAGES.
+#
+LANGUAGES.f2c= fortran
+_LANGUAGES.f2c= # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.f2c+= ${LANGUAGES.f2c:M${_lang_}}
+.endfor
+.if empty(_LANGUAGES.f2c)
+_USE_F2C= NO
+.endif
+
+.if !defined(_USE_F2C)
+_USE_F2C= YES
+.endif
+
+.if !empty(_USE_F2C:M[yY][eE][sS])
+EVAL_PREFIX+= _F2CBASE=f2c
+_F2CBASE_DEFAULT= ${LOCALBASE}
+_F2CBASE?= ${LOCALBASE}
+
+_F2C_DIR= ${WRKDIR}/.f2c
+_F2C_VARS= # empty
+. if !empty(_LANGUAGES.f2c:Mfortran)
+PKG_FC?= ${FC}
+_F2C_VARS+= FC
+_F2C_FC:= ${_F2C_DIR}/bin/${PKG_FC:T}
+_ALIASES.FC+= f77 f2c-f77
+FCPATH= ${_F2CBASE}/bin/f2c-f77
+PKG_FC:= ${_F2C_FC}
+#
+# The f2c-f77 shell script invokes the C compiler, so ensure that it finds
+# the cc wrapper for proper transformations.
+#
+# XXX This shouldn't really be leaking into here, as it breaks encapsulation.
+# XXX It should really be handled within the wrapper framework.
+#
+_WRAP_ENV.FC= PATH="${WRAPPER_BINDIR}:${_WRAP_PATH}"; export PATH
+. endif
+
+# Prepend the path the to the compiler to the PATH
+. if !empty(_LANGUAGES.f2c)
+PREPEND_PATH+= ${_F2C_DIR}/bin
+. endif
+
+# Add the dependency on f2c.
+. if !empty(USE_BUILDLINK3:M[yY][eE][sS])
+. include "../../lang/f2c/buildlink3.mk"
+. else
+DEPENDS+= f2c>=20001205nb3:../../lang/f2c
+. endif
+
+. if defined(F2C_DIR) && !empty(F2C_DIR)
+BUILD_ENV+= F2C_DIR=${F2C_DIR:Q}
+. endif
+
+# Create symlinks for the compiler into ${WRKDIR}.
+. for _var_ in ${_F2C_VARS}
+. if !target(${_F2C_${_var_}})
+override-tools: ${_F2C_${_var_}}
+${_F2C_${_var_}}:
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${LN} -fs ${_F2CBASE}/bin/f2c-f77 ${.TARGET}
+. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ if [ ! -x "${_alias_}" ]; then \
+ ${LN} -fs ${_F2CBASE}/bin/f2c-f77 ${_alias_}; \
+ fi
+. endfor
+. endif
+. endfor
+.endif # _USE_F2C == "yes"
+
+.endif # COMPILER_F2C_MK
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 4099063f6bf..8939db1e9f5 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.77 2004/11/30 14:50:37 jlam Exp $
+# $NetBSD: gcc.mk,v 1.78 2005/01/12 15:32:01 jlam Exp $
.if !defined(COMPILER_GCC_MK)
COMPILER_GCC_MK= defined
@@ -436,4 +436,21 @@ ${_GCC_${_var_}}:
. endif
.endfor
+# On older NetBSD systems and where the Fortran compiler doesn't exist,
+# force the use of f2c-f77.
+#
+_GCC_USE_F2C= no
+.if !exists(${FCPATH})
+_GCC_USE_F2C= yes
+.else
+. for _pattern_ in 0.* 1.[0-4] 1.[0-4].*
+. if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*)
+_GCC_USE_F2C= yes
+. endif
+. endfor
+.endif
+.if !empty(_GCC_USE_F2C:M[yY][eE][sS])
+. include "../../mk/compiler/f2c.mk"
+.endif
+
.endif # COMPILER_GCC_MK
diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk
index 694a66c7544..1a483cc80a5 100644
--- a/mk/compiler/mipspro.mk
+++ b/mk/compiler/mipspro.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mipspro.mk,v 1.29 2004/11/30 14:50:37 jlam Exp $
+# $NetBSD: mipspro.mk,v 1.30 2005/01/12 15:32:01 jlam Exp $
.if !defined(COMPILER_MIPSPRO_MK)
COMPILER_MIPSPRO_MK= defined
@@ -95,4 +95,14 @@ CFLAGS+= ${MABIFLAG}
LDFLAGS+= ${MABIFLAG}
.endif
+# Force the use of f2c-f77 for compiling Fortran.
+_MIPSPRO_USE_F2C= no
+FCPATH= /nonexistent
+.if !exists(${FCPATH})
+_MIPSPRO_USE_F2C= yes
+.endif
+.if !empty(_MIPSPRO_USE_F2C:M[yY][eE][sS])
+. include "../../mk/compiler/f2c.mk"
+.endif
+
.endif # COMPILER_MIPSPRO_MK
diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk
index 85b0a0306d7..f979b6cb6c9 100644
--- a/mk/compiler/sunpro.mk
+++ b/mk/compiler/sunpro.mk
@@ -1,4 +1,4 @@
-# $NetBSD: sunpro.mk,v 1.25 2004/11/30 14:50:37 jlam Exp $
+# $NetBSD: sunpro.mk,v 1.26 2005/01/12 15:32:01 jlam Exp $
.if !defined(COMPILER_SUNPRO_MK)
COMPILER_SUNPRO_MK= defined
@@ -83,4 +83,14 @@ ${_SUNPRO_${_var_}}:
. endif
.endfor
+# Force the use of f2c-f77 for compiling Fortran.
+_SUNPRO_USE_F2C= no
+FCPATH= /nonexistent
+.if !exists(${FCPATH})
+_SUNPRO_USE_F2C= yes
+.endif
+.if !empty(_SUNPRO_USE_F2C:M[yY][eE][sS])
+. include "../../mk/compiler/f2c.mk"
+.endif
+
.endif # COMPILER_SUNPRO_MK
diff --git a/mk/compiler/xlc.mk b/mk/compiler/xlc.mk
index f23546f8606..9b0aa91f277 100644
--- a/mk/compiler/xlc.mk
+++ b/mk/compiler/xlc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: xlc.mk,v 1.7 2004/11/30 14:50:37 jlam Exp $
+# $NetBSD: xlc.mk,v 1.8 2005/01/12 15:32:01 jlam Exp $
.if !defined(COMPILER_XLC_MK)
COMPILER_XLC_MK= defined
@@ -78,4 +78,14 @@ ${_XLC_${_var_}}:
. endif
.endfor
+# Force the use of f2c-f77 for compiling Fortran.
+_XLC_USE_F2C= no
+FCPATH= /nonexistent
+.if !exists(${FCPATH})
+_XLC_USE_F2C= yes
+.endif
+.if !empty(_XLC_USE_F2C:M[yY][eE][sS])
+. include "../../mk/compiler/f2c.mk"
+.endif
+
.endif # COMPILER_XLC_MK
diff --git a/parallel/mpi-ch/Makefile b/parallel/mpi-ch/Makefile
index fa7e9b5ede6..737a348821d 100644
--- a/parallel/mpi-ch/Makefile
+++ b/parallel/mpi-ch/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2004/12/03 15:15:07 wiz Exp $
+# $NetBSD: Makefile,v 1.32 2005/01/12 15:32:01 jlam Exp $
DISTNAME= mpich-1.2.5.2
-PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= parallel
MASTER_SITES= ftp://ftp.mcs.anl.gov/pub/mpi/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} mpich-docs.tgz
@@ -20,7 +20,7 @@ INSTALL_TARGET= install-all
USE_PERL5= yes
HAS_CONFIGURE= yes
USE_X11= yes
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
MPI_RSH?= ssh
diff --git a/parallel/pvm3/Makefile b/parallel/pvm3/Makefile
index c2e7e0536c7..63457b7e23c 100644
--- a/parallel/pvm3/Makefile
+++ b/parallel/pvm3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2004/12/03 15:15:07 wiz Exp $
+# $NetBSD: Makefile,v 1.36 2005/01/12 15:32:01 jlam Exp $
DISTNAME= pvm3.4.5
PKGNAME= pvm-3.4.5
@@ -19,7 +19,7 @@ PVM_SSH?= ${LOCALBASE}/bin/ssh
WRKSRC= ${WRKDIR}/pvm3
USE_BUILDLINK3= yes
-USE_FORTRAN= yes
+USE_LANGUAGES= fortran
USE_X11= yes
USE_LIBTOOL= yes