autodetecting dependencies

Stephen Montgomery-Smith stephen at
Tue Apr 10 02:27:20 UTC 2012

So suppose we are building port A.  It turns out that the configure in 
port A autodetects whether package B is present or not.  It will build 
either way.  But if built with package B, it will not operate without it.

So suppose I build port A on machine X which has package B installed. 
Then I create a package from A, and copy the package to machine Y. 
Machine Y does not have package B installed, and so when package A is 
installed, it doesn't work on machine Y.

What are the accepted ways of handling this?

1.  Don't worry about it.  tinderbox builds will never build port A in 
the presence of package B.

2.  Have the Makefile of port A detect whether package B is installed, 
and if it is then add B as a dependency of A.

3.  Cripple the configure in port A so that it doesn't autodetect for 
package B.  (Sometimes this can be done using a suitable CONFIGURE_ARGS, 
but not in my particular situation.)

I prefer the answer (1).  But I am interested in other people's 
opinions.  One problem with (2) or (3) is that the creator of the port 
might never find out which packages could be autodetected by port A's 
configure without performing an exhaustive search of the source code of A.

Thanks, Stephen

More information about the freebsd-ports mailing list