From owner-freebsd-ports@FreeBSD.ORG Fri Nov 5 14:17:00 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48A7D106566B for ; Fri, 5 Nov 2010 14:17:00 +0000 (UTC) (envelope-from sunpoet@sunpoet.net) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0EFE88FC15 for ; Fri, 5 Nov 2010 14:16:59 +0000 (UTC) Received: by ywh2 with SMTP id 2so2280986ywh.13 for ; Fri, 05 Nov 2010 07:16:59 -0700 (PDT) Received: by 10.42.30.14 with SMTP id t14mr1263935icc.311.1288965248319; Fri, 05 Nov 2010 06:54:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.186.65 with HTTP; Fri, 5 Nov 2010 06:53:47 -0700 (PDT) In-Reply-To: <20101105102608.GA19572@mech-cluster241.men.bris.ac.uk> References: <20101105102608.GA19572@mech-cluster241.men.bris.ac.uk> From: Sunpoet Hsieh Date: Fri, 5 Nov 2010 21:53:47 +0800 Message-ID: To: Anton Shterenlikht Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports@freebsd.org Subject: Re: new port - different versions of the same file - advice needed X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2010 14:17:00 -0000 On Fri, Nov 5, 2010 at 6:26 PM, Anton Shterenlikht 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 =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