How can I describe alternative dependencies in a Homebrew formula? There are two different types that I think of.
1. Alternative packages
My formula may depend on a P or Q package, but it must have one of them. So I want either
depends_on 'P'
or
depends_on 'Q'
and I need at least one.
2. Alternative flags for the same package
My formula requires another package X to build, and it needs package X with one of the two flags A and B That is, I want either
depends_on 'X' => [:build, 'A']
or
depends_on 'X' => [:build, 'B']
and I need at least one.
Example
A specific example of the use of these alternative dependencies is a gcc dependent formula. There are several packages for gcc (for example, gcc4[3-9] ) that can be supported # 1 above. gcc has an enable-all-languages flag, which implies enable-java , so if a formula that requires gcj will use # 2 to indicate alternative flags.
gcc homebrew dependencies
Sean Leather Jan 14 '14 at 13:53 on 2014-01-14 13:53
source share