In order to better support Xcode-only systems, where X11 libs and
executables live under /usr/X11 but headers live in the SDK, move the
x11_* helper methods into a new module.
This allows us to keep some of the CLT/Xcode-only and Apple X11/XQuartz
logic hidden from outside code, like ENV.x11.
Since Apple's X11 is actually XQuartz, name the module "MacOS::XQuartz".
conflicts_with is a thin wrapper around Requirement which simplifies
marking conflicts between formulae.
ClosesHomebrew/homebrew#13687.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
All versions of OS X prior to Lion shipped with some version of Open-MPI, but
without working compiler wrappers for Fortran. Homebrew currently has two
formulae that can supply this software: open-mpi and mpich2.
This commit adds a `MPIDependency` Requirement that can be passed one of four
values when constructed:
:cc, :cxx, :f90, :f77
This will ensure the `mpi<value>` compiler is available and working. For
example, if `depends_on MPIDependency.new(:cc, :f90)` is used, the Requirement
will search for working `mpicc` and `mpif90` wrappers.
If the required wrappers cannot be found, an error message will be displayed
that prompts the user to install one of the Homebrew formulae that provides
MPI.
For each language passed to a MPIDependency Requirement, environment variables
be will set that point to the compilers.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Because of some quirks in how formulae are loaded, DSL methods invoked
in the class definition are called multiple times. This results in, for
example, duplicate dependencies and requirements.
Code that iterates over requirements and takes some action for each can
thus repeat things that shouldn't be repeated, like appending to
environment variables.
Make DependencyCollector's external_deps a Set, and define eql? and hash
on Requirement to prevent these duplicates.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Rather than doing type introspection in build.rb, just define a method
to perform the necessary environment setup for Requirements.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Some times the module to import is different than the module to install
when dealing with external dependencies. This change allows an optional
import name to be specififed when it is different from the module name.
ClosesHomebrew/homebrew#11078.