Adding dependencies based on OPTIONS

Freddie Cash fcash-ml at
Tue Jul 27 14:54:09 PDT 2004

On July 27, 2004 09:33 pm, Freddie Cash wrote:
> On July 27, 2004 08:56 pm, Freddie Cash wrote:
> > Is there an easy way to add dependencies (LIB_DEPENDS in
> > particular) based on whether or not an option is selected via
> [snip]
> > Am I going about this the wrong way, or have I just misinterpreted
> > things?  Is there a way to get the ports framework to do this
> > automatically, or am I going to have to write a custom pre-build:
> > target to satisfy the dependencies and patching??

> Nevermind.  Figured that one out.  Confused my shell variable syntax
> with my make variable syntax meaning my .if defined() was never
> evaluating to true.

> Slightly different question:
> Now that I have the port downloading the extra patches if the AV
> option is chosen, how do I control the order that the patches are
> applied? All of the non-AV patches are named "patch-<filename>" and
> the AV patches are named "virus-patch-<filename>".  I though patches
> were applied in alphabetical order, but all the AV patches are being
> applied first, which won't work.  I need a way to force the normal
> patches (in the files/ directory) to be applied first, then the AV
> patches to be applied after.  Unfortunately, they both patch three of
> the same files.

Reading through, it appears the only way to reliably do this 
is to put *all* of the patches into PATCHFILES.  That way, they get 
applied in alphabetical order.  If I split the PATCHFILES into two, 
with the first one listing the regular patches that used to be under 
files/, and with the second one being wrapped in an .if defined 
statement, things should work correctly.  This is what I'm currently 

So far things appear to be working correctly.  Just waiting for ClamAV 
and libesmtp to finish installing so that I can check that things are 
working correctly.

If there is a better way, let me know.  :)
Freddie Cash, CCNT CCLP        Helpdesk / Network Support Tech.
School District 73             (250) 377-HELP [377-4357]
fcash-ml at

More information about the freebsd-ports mailing list