Erik Trulsson ertr1013 at
Mon May 22 07:58:26 PDT 2006

On Mon, May 22, 2006 at 09:43:20AM -0500, Jim Pirzyk wrote:
> Hash: SHA1
> I am trying to write a Makefile for a software package that needs
> another package built with a non default OPTION set.  How do I
> do this?  Specifically, I need krb5 built with the KRB5_KRB4_COMPAT
> set to YES (it is defaulted to NO).  I currently have this:
> .if defined(WITH_SNK)
> BUILD_DEPENDS= ${LOCALBASE}/include/kerberosIV/des.h:${PORTSDIR}/ 
> security/krb5
> .endif
> But when krb5 gets installed, the KRB5_KRB4_COMPAT is not set
> to yes, and des.h does not get installed.
> How is this to be done?  the Porters handbook is unclear in this.
> I also have tried to set the ':target' part of BUILD_DEPENDS to
> - -DKRB5_KRB4_COMPAT=YES, but that did not work either.

I don't think there is any way to do that, especially not if the port you
depend on already is installed without the non-default option set, since the
options used for building a port is usually not stored anywhere, so it is
normally not possible to determine if the installed port was compiled with
the necessary options set or not.

The only way I can think of to handle this situation is to create
a slave-port for the port you depend on that has the desired options set,
and then depend on this slave-port instead.

<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at

More information about the freebsd-ports mailing list