Optional patching

Pav Lucistnik pav at FreeBSD.org
Wed Dec 19 07:56:25 PST 2007


On Wed, 19 Dec 2007 09:53:15 -0600, Paul Schmehl wrote

> wondering if I can use OPTIONS to make this patch optional if the 
> system is 64 bit, but I'm not sure what the syntax would be inside 
> the if statement.
> 
> .if defined(WITH_64BIT)
> do-patch: patchname
> .endif
> 
> I assume the patch would have to be in the filesdir but could not be 
> named "patch-foo" or it would always be applied, correct?

Correct. Place it in files/ and use something like:

.if defined(WITH_ELPATCHO)
EXTRA_PATCHES+= extra-patch
.endif

--
Pav Lucistnik <pav at oook.cz>
              <pav at FreeBSD.org>



More information about the freebsd-ports mailing list