The cxxstdlib_check method currently only supports one value, so we can
just define the accompanying instance method when necessary. If we ever
add more options we can back it with a data structure.
Formulae from the "brewkit" era are no longer compatible with the
Formula class.
This file was (unintentionally) removed from the $LOAD_PATH quite
a while ago, and nobody has complained, so remove it.
* CPU functions now exist in Hardware::CPU
* Added compatibility functions in compat/hardware_compat.rb
* Names are less specific to Mac hardware, e.g. CPU.family instead of
Hardware.intel_family
* Hardware::CPU.family works for both Intel and PowerPC
* New helper methods on CPU, like .sse4? and .altivec?
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Reader methods for specific checksum types have been absent from the
Formula class for some time, so there isn't any reason to expose them in
SoftwareSpec, either.
Thus, these methods now only act as setters, and #checksum should be
used to access the constructed Checksum object.
Move Formula.expand_dependencies into the Dependency class, and extend
it to allow arbitrary filters to be applied when enumerating deps.
When supplied with a block, expand_dependencies will yield a [dependent,
dependency] pair for each dependency, allowing callers to filter out
dependencies that may not be applicable or useful in a given situation.
Deps can be skipped by simple calling Dependency.prune in the block,
e.g.:
Dependency.expand_dependencies do |f, dep|
Dependency.prune if dep.to_formula.installed?
end
The return value of the method is the filtered list.
If no block is supplied, a default filter that omits optional or
recommended deps based on what the dependent formula has requested is
applied.
Formula#recursive_dependencies is now implemented on top of this,
allowing FormulaInstaller to exact detailed control over what deps are
installed. `brew missing` and `brew upgrade` can learn to use this to
apply the installed options set when expanding dependencies.
Move Formula.expand_deps and Formula#recursive_deps into compat, because
these methods do not respect the new optional and recommended tags and
thus should no longer be used.
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.
"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.
The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
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".
Most Homebrew builds produce libraries, so CMake should give priority to
libraries when resolving dependencies.
ClosesHomebrew/homebrew#12497.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
This differs from the current std_cmake_parameters in that it returns an
array instead of a string. Doing so makes dealing with it in formulae
much more pleasant, and for new formula hackers, less surprising.
std_cmake_parameters is retained in compat to maintain compatibility
with external formulae.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- Formulae can now declare failures on any compiler.
- FailsWithLLVM and associated formula elements have been moved to
compat.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>