From owner-freebsd-ports@FreeBSD.ORG Thu Feb 26 15:35:35 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2871A16A4CE for ; Thu, 26 Feb 2004 15:35:35 -0800 (PST) Received: from rdsnet.ro (unknown [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D90C43D2F for ; Thu, 26 Feb 2004 15:35:34 -0800 (PST) (envelope-from itetcu@apropo.ro) Received: (qmail 5803 invoked from network); 26 Feb 2004 23:35:32 -0000 Received: from unknown (HELO it.buh.cameradicommercio.ro) (81.196.25.19) by mail.rdsnet.ro with SMTP; 26 Feb 2004 23:35:32 -0000 Received: from it.buh.cameradicommercio.ro (localhost.buh.cameradicommercio.ro [127.0.0.1]) by it.buh.cameradicommercio.ro (Postfix) with SMTP id 8BF2744; Fri, 27 Feb 2004 01:37:30 +0200 (EET) Date: Fri, 27 Feb 2004 01:37:30 +0200 From: Ion-Mihai Tetcu To: Oliver Eikemeier Message-Id: <20040227013730.4dfaa33c@it.buh.cameradicommercio.ro> In-Reply-To: <403E77FB.60605@fillmore-labs.com> References: <20040226232358.71a31aa5@it.buh.cameradicommercio.ro> <20040226212536.GA7216@xor.obsecurity.org> <20040227001224.6eba2542@it.buh.cameradicommercio.ro> <403E77FB.60605@fillmore-labs.com> X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: ports@FreeBSD.ORG cc: Kris Kennaway Subject: Re: one or more patch files / optional patch ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2004 23:35:35 -0000 On Thu, 26 Feb 2004 23:49:31 +0100 Oliver Eikemeier wrote: > Ion-Mihai Tetcu wrote: > > > On Thu, 26 Feb 2004 13:25:36 -0800 > > Kris Kennaway wrote: > > > >>On Thu, Feb 26, 2004 at 11:23:58PM +0200, Ion-Mihai Tetcu wrote: > >> > >>>Hi, > >>> > >>>The Porters Handbook says "To make fixes and upgrades easier, you > >>>should avoid having more than one patch fix the same file"; I'm in > >>>the reverse situation, e.g. I have to patch 4 files for adding a > >>>feature to a port. It will only make sense to patch all the files > >or>>none. Should the patch be split in 4 files or not ? > >> > >>Yes, I think this is also documented in the porter's handbook. It's > >a>real pain in the ass to update patches when there's more than one > >>patch per file. > >> > >>>I also want to use OPTIONS to allow the user to choose if he wants > >>>this feature or not. How can I integrate this with patch target > >>>(e.g. having the patch in files/ but only applied if WITH_ is set) > >?> > >>EXTRA_PATCHES > > > > Thanks. > > > > That's what I thought, but I wasn't sure enough of my english. So I > > name them extrapatch-feature_name-file_name and they are applied > > only if I have them in EXTRA_PATCHES. OK, but what if there is a > > regular patch that applies to one of the files also modified by one > > of my extra_patches ? Since the "regular" patch is applied after the > > extras, will it still work ? I could include them in my patches, but > > I see no way in bsd.port.mk not to apply them. > > one way would be to do > > .if defined(WITH_A) > EXTRA_PATCHES+= extrapatch-path::file::with_a > .else > EXTRA_PATCHES+= extrapatch-path::file::without_a > .endif Yes, of course. Sorry, I'm after a share-holders meeting and my brain seems to have suffer some damages ;-/ -- IOnut Unregistered ;) FreeBSD user