Subject: Re: USE_FORTAN should be smarter
To: Jeremy C. Reed <>
From: Dan McMahill <>
List: tech-pkg
Date: 06/12/2004 00:48:34
On Fri, Jun 11, 2004 at 10:09:20AM -0700, Jeremy C. Reed wrote:
> I was going to build audio/libsamplerate, but it needed math/fftw2. It
> started to build f2c, but it failed due to missing lorder (maybe) and some
> ar issues.
> I saw that math/fftw/Makefile has USE_FORTAN defined.
> The mk/ just checks for /usr/bin/f77 and if NetBSD >= 1.5 it
> uses f77. If not it uses f2c-f77.
> I have gcc3-f77 installed. I manually made a symlink for a g77 in my path
> to the gcc3-f77's gcc3/bin/g77. But that was not good enough: it still
> wanted the f2c package.
> My workaround was to do:
>  .if defined(USE_FORTRAN)
> +.  if exists(${LOCALBASE}/gcc3/bin/g77)
> +PKG_FC?=               ${LOCALBASE}/gcc3/bin/g77
> +.  endif
>  .  if !exists(/usr/bin/f77)
>  PKG_FC?=               f2c-f77
>  .  endif
> Any comments on improving USE_FORTRAN before I send-pr this?
> I wonder if the framework should handle this?
Yes.  As the originator of USE_FORTRAN, I'd be happy to see it now
die in favor of USE_LANGUAGES+= fortran.  Unfortunately, I've not 
had time to get up to speed on the new stuff.