new port - different versions of the same file - advice needed

Sunpoet Hsieh sunpoet at
Fri Nov 5 14:17:00 UTC 2010

On Fri, Nov 5, 2010 at 6:26 PM, Anton Shterenlikht <mexas at> wrote:
> I'm trying to make a port of Slatec numerical libraries:
> This file contains the full sources:
> However, according to Netlib FAQ: ,
> I've got to replace 3 files in this archive by newer versions:
> *quote*
> The easiest to use versions of the routines r1mach, d1mach, and i1mach
> are located in the blas directory of Netlib. These versions of r1mach
> and d1mach attempt to determine machine characteristics automatically.
> The original versions of r1mach, d1mach, and i1mach,
> in the slatec/src directory, require a user to scan
> their source and to uncomment the statements specifying
> the constants for his particular machine. Constants for some
> architectures are not explicitly identified in the comments
> of r1mach, d1mach, and i1mach. For those architectures conforming
> to the IEEE floating-point standard, and most newer ones do,
> you can locate and uncomment the IEEE-conforming constants in the routines.
> *end quote*
> So I need to download,
> extract all files from it, and then overwrite d1mach.f, i1mach.f
> and r1mach.f by the Blas versions:
> What is the best way to achive this?
> many thanks
> anton


FYI, let me simplify your requirements:
1. source tarball and patch files are from different URLs.
2. patch files are not archived.

My suggestion is as follows: (I've not tested yet.)

PORTNAME=	slatec
		d1mach.f:mach i1mach.f:mach r1mach.f:mach

Then you could copy these three files from DISTDIR to the work directory.

	@cd ${DISTDIR}/ && ${CP} d1mach.f i1mach.f r1mach.f ${WRKSRC}/src/

Hope that helps.

  Sunpoet Po-Chuan Hsieh <sunpoet at> <sunpoet at>
          4096R/CC57E36B 8AD8 68F2 7D2B 0A10 7E9B 8CC0 DC44 247E CC57 E36B

More information about the freebsd-ports mailing list