Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Nov 2010 21:53:47 +0800
From:      Sunpoet Hsieh <sunpoet@sunpoet.net>
To:        Anton Shterenlikht <mexas@bristol.ac.uk>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: new port - different versions of the same file - advice needed
Message-ID:  <AANLkTi=zt3dXwivAWjb=GFVfWB=6tpq3LTcZt-Vt6qmM@mail.gmail.com>
In-Reply-To: <20101105102608.GA19572@mech-cluster241.men.bris.ac.uk>
References:  <20101105102608.GA19572@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 5, 2010 at 6:26 PM, Anton Shterenlikht <mexas@bristol.ac.uk> wr=
ote:
> I'm trying to make a port of Slatec numerical libraries:
> http://netlib.org/slatec/
>
> This file contains the full sources:
> http://netlib.org/slatec/slatec_src.tgz
>
> However, according to Netlib FAQ: http://netlib.org/misc/faq.html#2.17 ,
> 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 routine=
s.
> *end quote*
>
> So I need to download http://netlib.org/slatec/slatec_src.tgz,
> extract all files from it, and then overwrite d1mach.f, i1mach.f
> and r1mach.f by the Blas versions:
>
> http://netlib.org/blas/d1mach.f
> http://netlib.org/blas/i1mach.f
> http://netlib.org/blas/r1mach.f
>
> What is the best way to achive this?
>
> many thanks
> anton
>

Hi,

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=3D	slatec
MASTER_SITES=3D	http://netlib.org/slatec/ \
		http://netlib.org/blas/:mach
DISTFILES=3D	${PORTNAME}_src.tgz \
		d1mach.f:mach i1mach.f:mach r1mach.f:mach
EXTRACT_ONLY=3D	${PORTNAME}_src.tgz

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

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

Hope that helps.

Regards,
sunpoet
--=20
=C2=A0 Sunpoet Po-Chuan Hsieh <sunpoet at sunpoet.net> <sunpoet at FreeBSD.=
org>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4096R/CC57E36B 8AD8 68F2 7D2B 0A10 7E9B =
8CC0 DC44 247E CC57 E36B
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 http://people.FreeBSD.org/~sunpoet/pgpkeys.txt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=zt3dXwivAWjb=GFVfWB=6tpq3LTcZt-Vt6qmM>