Subject: USE_FORTAN should be smarter
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 06/11/2004 10:09:20
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?

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links