Conditionnal patches in ${PATCHDIR}

Gabor Kovesdan gabor at FreeBSD.org
Fri Dec 15 04:40:24 PST 2006


Jeremie Le Hen schrieb:
> Hi,
>
> (Please Cc: me in your replies.)
>
> I would like to apply a patch against a port conditionally, though I
> don't want to use ${PATCHFILES} because IIUC, this requires the patch
> to be stored remotely.
>
> My problem is that all files matching ${PATCHDIR}/patch-* are
> automatically applied.
>
> I tried to "fork" the port using ${MASTERDIR} and store my patch
> only in the forked port tree, but only patches in
> ${MASTERDIR}/${PATCHDIR} are applied, and patches in
> ${.CURDIR}/${PATCHDIR} are ignored.
>
> I didn't use to create ports, any advice would be welcome.
> Thank you very much.
> Best regards,
>   
You can call the conditional patches extrapatch-* and add them to the 
EXTRA_PATCHES macro, like

if defined(FOO)
EXTRA_PATCHES+=   ${FILESDIR}/extrapatch-foo.c
.endif

See e.g. mail/courier.

Cheers,
Gabor


More information about the freebsd-ports mailing list