Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 May 2011 17:29:04 -0400
From:      Matthew Pounsett <matt@conundrum.com>
To:        freebsd-ports@FreeBSD.org
Subject:   Optional Patches
Message-ID:  <C9301CD1-D2C0-449A-BD85-8488FDC028B5@conundrum.com>

next in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C9301CD1-D2C0-449A-BD85-8488FDC028B5>