Adding dependencies based on OPTIONS

Freddie Cash fcash-ml at
Tue Jul 27 13:56:45 PDT 2004

Is there an easy way to add dependencies (LIB_DEPENDS in particular) 
based on whether or not an option is selected via OPTIONS??

I'm looking at adding virus scanning to the DansGuardian port.  There 
are two methods I can think of for doing this:  create a new port that 
includes the AV support, or add it as an option to the existing port.  
The AV support requires that the clamav and esmtp ports are installed 
first, and that about a dozen extra patches are applied to the DG 

I'm not sure how to go about specificing the LIB_DEPENDS (or if that is 
even the correct DEPENDS to use?), or how to specify using the 
aditional patches.

I've toyed with EXTRA_PATCHES and PATCHFILES, using OPTIONS, and 
LIB_DEPENDS, but I can't get the port to pick up the LIB_DEPENDS.

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??

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