From owner-freebsd-ports@FreeBSD.ORG Wed May 18 21:29:48 2011 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 ED059106566C for ; Wed, 18 May 2011 21:29:48 +0000 (UTC) (envelope-from matt@conundrum.com) Received: from coke.conundrum.com (coke.conundrum.com [216.235.9.139]) by mx1.freebsd.org (Postfix) with ESMTP id B97868FC08 for ; Wed, 18 May 2011 21:29:48 +0000 (UTC) Received: from bawls.conundrum.com (bawls.corp.conundrum.com [216.235.8.92] (may be forged)) by coke.conundrum.com (8.13.1/8.12.6) with ESMTP id p4ILT9i3052184; Wed, 18 May 2011 17:29:09 -0400 (EDT) (envelope-from matt@conundrum.com) Received: from [216.235.10.34] ([216.235.10.34]) (authenticated bits=0) by bawls.conundrum.com (8.14.3/8.14.3) with ESMTP id p4ILTJO8053992; Wed, 18 May 2011 17:29:19 -0400 (EDT) (envelope-from matt@conundrum.com) From: Matthew Pounsett Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Wed, 18 May 2011 17:29:04 -0400 To: freebsd-ports@FreeBSD.org Message-Id: Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Cc: Subject: Optional Patches 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: Wed, 18 May 2011 21:29:49 -0000 I posted the other day about an issue I was having working around a = distribution CGI when adding a patch to a port. Thanks to a suggestion = from Matthew Seaman that problem is solved, but I seem to have bumped up = against another. It seems that I can't find a way to make applying the = patch optional, which was the original intent. I've added a new option (call it 'FOO') to the OPTIONS definition, and = I'm attempting to add something like this directly below MASTER_SITES = near the top of the Makefile: .if defined(FOO) PATCH_SITES=3D http://location.site.com/path/ PATCHFILES=3D port-${PORTVERSION}.patch PATCH_DIST_STRIP=3D -p1 .endif The option shows up when the config target is run, but ports doesn't do = anything with the patch info. If I remove or comment-out the .if and = .endif surrounding the above block, then ports finds and applies the = patch perfectly, so I know the patching info itself is correct. I've tried placing the block in various places around the Makefile, on = the off chance that there's an issue with ordering, but that hasn't = solved the problem either. I've done a quick grep through the ports tree looking for instances of = PATCH_SITES appearing shortly after an .if defined but nothing has = cropped up that I can crib from. Does anyone know what the problem is? Is what I'm attempting just not = possible? Thanks, Matt