port dependencies with port options
vmagerya at gmail.com
Fri Apr 20 10:30:06 UTC 2012
Chris Inacio wrote:
> I wanted to add an option to multiple ports - that is easy. But, those
> ports have a dependency relationship, and I only want the last node in the
> port dependency graph to build with that option if the requisite ports have
> In real terms:
> net/spread <- net/libfixbuf <- net-mgmt/yaf
> I added a SPREAD option to net/libfixbuf & to net-mgmt/yaf. net-mgmt/yaf
> can only build a Spread version if libfixbuf was built with a Spread
> Question 1) How do you construct such that if a user goes into
> net-mgmt/yaf chooses Spread and fixbuf isn't already installed, it builds
> fixbuf with the spread option?
> Question 2) How do you ensure that if fixbuf is already installed, it has
> the Spread option enabled, or disallow/error the Yaf Spread option?
One way to do this is to create a separate port net/libfixbuf-spread
that either installs separate libfixbuf-spread.so or just conflicts with
net/libfixbuf, and then make net-mgmt/yaf depend on that if SPREAD
option is on.
More information about the freebsd-ports