Setting a KNOB/OPTION in BUILD_DEPENDS

michael johnson ahze at ahze.net
Mon May 22 07:55:10 PDT 2006


On 5/22/06, Jim Pirzyk <pirzyk at freebsd.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> 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)
> KRB5_KRB4_COMPAT=       YES
> 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.


You can do a couple of things, The best would be probably
make a slave port from krb5 that defines KRB5_KRB4_COMPAT
and then make your port depend on the krb5 slave port.
Or you could depend on %%KRB4%%bin/krb524init since it's only
installed if KRB5_KRB4_COMPAT is defined and print a message
in pre-XXX if it's not found but krb5 is installed.

For an example take a look at graphics/evince and how it depends
on graphics/djvulibre or graphics/djvulibre-nox11 and how djvulibre[-nox11]
work.

Cheers,
Michael


- - JimP
>
> - --- @(#) $Id: dot.signature,v 1.14 2004/02/03 02:46:26 pirzyk Exp $
>      __o  pirzyk at uiuc.edu --------------------------- jim at pirzyk.org
>   _'\<,_  Systems Management Group, CITES
> (*)/ (*) University of Illinois at Urbana-Champaign
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (Darwin)
>
> iD8DBQFEcc4N2EYx0U4j2soRAhNZAKCq1zvoybwHWWi+6Katusw1EBnF6ACfakPM
> g/dISJqQ6oidRMxldfAYvh8=
> =Vtvb
> -----END PGP SIGNATURE-----
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
>


More information about the freebsd-ports mailing list