Date: Fri, 5 Nov 2010 16:44:43 +0000 From: Anton Shterenlikht <mexas@bristol.ac.uk> To: Sunpoet Hsieh <sunpoet@sunpoet.net> Cc: Anton Shterenlikht <mexas@bristol.ac.uk>, freebsd-ports@freebsd.org Subject: Re: new port - different versions of the same file - advice needed Message-ID: <20101105164443.GA68775@mech-cluster241.men.bris.ac.uk> In-Reply-To: <AANLkTi=zt3dXwivAWjb=GFVfWB=6tpq3LTcZt-Vt6qmM@mail.gmail.com> References: <20101105102608.GA19572@mech-cluster241.men.bris.ac.uk> <AANLkTi=zt3dXwivAWjb=GFVfWB=6tpq3LTcZt-Vt6qmM@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 05, 2010 at 09:53:47PM +0800, Sunpoet Hsieh wrote: > On Fri, Nov 5, 2010 at 6:26 PM, Anton Shterenlikht <mexas@bristol.ac.uk> wrote: > > 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 routines. > > *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= slatec > MASTER_SITES= http://netlib.org/slatec/ \ > http://netlib.org/blas/:mach > DISTFILES= ${PORTNAME}_src.tgz \ > d1mach.f:mach i1mach.f:mach r1mach.f:mach > EXTRACT_ONLY= ${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 thanks, this works well. -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101105164443.GA68775>