From owner-freebsd-sparc64@FreeBSD.ORG Thu Feb 26 18:06:32 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E33D16A4CE for ; Thu, 26 Feb 2004 18:06:32 -0800 (PST) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B529A43D31 for ; Thu, 26 Feb 2004 18:06:31 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i1R26Me0015907; Thu, 26 Feb 2004 21:06:22 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040226051055.GA85017@xor.obsecurity.org> References: <20040226051055.GA85017@xor.obsecurity.org> Date: Thu, 26 Feb 2004 21:06:21 -0500 To: Kris Kennaway From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: Ken Smith cc: freebsd-sparc64@freebsd.org cc: John Polstra Subject: Re: 64btt cvsup? X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2004 02:06:32 -0000 At 9:10 PM -0800 2/25/04, Kris Kennaway wrote: >On Thu, Feb 26, 2004, Garance A Drosihn wrote: > > > John wrote: > > > Figure out the ports-Makefile-fu to make the new patches > > > get applied only if the system has a recent enough > > > __FreeBSD_version. That ought to do it. > > >> I have no idea what ports-makefile-fu would be needed, but we >> haven't picked the value of __FreeBSD_version for this change yet, >> so I have the excuse that we couldn't really do this yet anyway. > >Ports don't usually apply patches conditionally on the version. >Instead, wherever possible the patch itself should contain the >conditionals, i.e. > >#if __FreeBSD_version >= 50210x >... >#endif Okay, after mulling over various comments, I came with the patch that's in: It is at: http://people.freebsd.org/~gad/time-64/port-ezm3.diff This is a patch to the port itself. Ie, you can: cd /usr/ports/lang/ezm3 patch -p0 < /tmp/port-ezm3.diff and do something like 'make patch'. This does not depend on __FreeBSD_version, and it should automatically detect whether ezm3 should be built for 32-bit or 64-bit time_t. This is done by adding an "extra patch" to the port, so it is determined at patch time, instead of at the (more desirable) build-time. It also prints out an informational message (in a pre-patch target) indicating which time_t ezm3 is being built for. These changes will only effect builds done on sparc64. I do not know who the proper person would be to do the actual commit of this, but I'm pretty sure it is not me! I can say that I have checked it, and it does work the way I wanted it to. Due to the way it works, it could be committed right now. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu