How can I describe alternative dependencies in a Homebrew formula? There are two different kinds I'm thinking of.
1. Alternative packages
My formula can depend on package P or Q, 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 for building, and it needs a package X with one of 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 where these alternative dependencies would be useful is a formula depending on gcc. There are multiple packages for gcc (e.g. gcc4[3-9]), which could be supported by #1 above. gcc has a flag enable-all-languages which implies enable-java, so if a formula that requires gcj would use #2 to specify the alternative flags.