diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 1999-11-22 23:42:21 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 1999-11-22 23:42:21 +0000 |
commit | 2595a8be59344ea121e2d65125e5ba3d9d443b48 (patch) | |
tree | c72c3c0b135b754b92cf58a93c66cb9a49f3e095 /mk | |
parent | 64c71e4da3c0d7b3e21d3ec865208f9063006eb3 (diff) | |
download | pkgsrc-2595a8be59344ea121e2d65125e5ba3d9d443b48.tar.gz |
- Add USE_FORTRAN variable. In packages which need a fortran compiler to build,
USE_FORTRAN should be set in the package Makefile. The logic added by this
commit will choose a fortran compiler to use and set the correct dependency
rather than having this selection scattered across each package which needs
a fortran compiler.
- Add PKG_FC variable. By setting PKG_FC in /etc/mk.conf, users can force the
selection of which fortran compiler gets used by the package system. If not
specified, PKG_FC defaults to f2c-f77 on pre-1.4 systems that did not include
/usr/bin/f77. In addition PKG_FC defaults to f2c-f77 on newer systems since
f77 is still somewhat buggy. When /usr/bin/f77 becomes more stable, the
default should be changed from f2c-f77 to f77.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 1aeda74e7c1..5aa71777a89 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.370 1999/11/22 12:02:46 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.371 1999/11/22 23:42:21 dmcmahill Exp $ # # This file is in the public domain. # @@ -117,6 +117,23 @@ BUILD_DEFS+= KERBEROS DEPENDS+= perl-5.00404:${PKGSRCDIR}/lang/perl5 .endif +.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. +PKG_FC?= f2c-f77 +.if (${PKG_FC} == "f2c-f77") +BUILD_DEPENDS+= f2c-f77:${PKGSRCDIR}/lang/f2c +.endif +FC= ${PKG_FC} +F77= ${PKG_FC} +MAKE_ENV+= F77=${F77} +MAKE_ENV+= FC=${FC} +.endif + .if defined(INFO_FILES) USE_GTEXINFO= yes .endif |