Commit Graph
33 Commits
Author SHA1 Message Date
Jack Nagel fce53bc1f5 Avoid comparing MacOS.version to floats 2013-10-22 20:47:37 -05:00
Jack Nagel 3cba7d44c6 Rename MacOS to OS::Mac 2013-10-18 12:56:51 -05:00
Jack Nagel cc51ab41db Reimplement SoftwareSpec on top of Resource 2013-09-17 21:29:52 -05:00
Jack Nagel c0f5d3aa01 Rename HomebrewEnvExtension to Stdenv 2013-08-19 12:32:59 -05:00
Jack Nagel 366ac016bd Reorganize compat 2013-05-10 23:27:28 -05:00
Jack Nagel 9b7c228bdf Remove ancient global methods from compat 2013-05-10 23:27:27 -05:00
Jack Nagel 4386be0a19 Remove last use of deprecated Formula#recursive_deps
Fixes #19107.
2013-04-10 11:55:02 -05:00
Misty De Meo e7f66519dc Hardware: separate out CPU values into CPU module
* 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>
2013-03-23 13:40:18 -05:00
Jack Nagel ba38f0937b Move Formula.all to compat 2013-03-20 22:32:56 -05:00
Jack Nagel 31fd139e57 Simplify SoftwareSpec checksum methods
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.
2013-03-18 15:10:36 -05:00
Jack Nagel b95c11a8ec Reduce footprint of fails_with_llvm compat code 2013-03-18 13:29:33 -05:00
Jack Nagel 6f6c889a24 Fix fails_with_llvm compatibility
Fixes #18565.
2013-03-18 13:00:47 -05:00
Jack Nagel ee25d02d54 Silence "* interpreted as argument prefix" warnings 2013-02-18 12:13:34 -06:00
Jack Nagel 6fbb1798e6 Move MD5 deprecation warning into Pathname#md5
This way it will print when the verification takes place, making it a
bit more obvious which formula it refers to.
2013-02-01 21:53:11 -06:00
Jack Nagel 56a978ba1d Add md5 support to compatibility, with deprecation warning 2013-02-01 13:24:36 -06:00
Jack Nagel f97b4a9509 Dependency.expand_dependencies
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.
2013-01-26 12:14:46 -06:00
Jack Nagel ac86882a1e Better reporting for MacPorts/Fink installations
closes #15853.
2012-12-17 17:18:22 -06:00
Jack Nagel a5bdb57a40 Add deprecation warning to non-DSL fails_with_llvm
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:58 -05:00
Jack Nagel 6b8d25f2d2 Clean up MacOS version method usage
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>
2012-09-10 16:16:54 -05:00
Max Howell 3a9069d1f5 Add Version.slice to compat suite
Refs #14299.
2012-08-28 12:11:46 -04:00
Jack Nagel ce604c642d Deprecate MacOS.version? style methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:25:59 -05:00
Jack Nagel 524e42a7e1 Adjust XQuartz/X11 module naming scheme
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-06 00:39:06 -05:00
Jack Nagel 68b5fe1ca5 Move X11 machinery into MacOS::XQuartz namespace
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".
2012-08-01 00:31:38 -05:00
Jack Nagel 68fee2a11a Split Xcode and CLT methods into separate modules
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Jack Nagel 55bd6781dc Remove compat's implicit dependency on formula
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 20:32:49 -05:00
Jack Nagel cb94753b88 Introduce new formula specs 2012-07-04 22:47:32 -05:00
Charlie Sharpsteen 467fa7c921 std_cmake_args: Search for Frameworks last
Most Homebrew builds produce libraries, so CMake should give priority to
libraries when resolving dependencies.

Closes #12497.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-06-03 10:03:56 -07:00
Jack Nagel c0bbf60eaf Introduce std_cmake_args method
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>
2012-05-22 16:32:12 -05:00
Mike McQuaid 7e744df63d Improve Formula.resolve_alias warning. 2012-04-30 21:38:14 +08:00
Jack Nagel b36f59dd3c New fails_with infrastructure
- 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>
2012-04-01 12:39:59 -05:00
Jack Nagel 94c8e46236 Adjust compat's fails_with_llvm call
handle_llvm_failure was moved into FailsWithLLVM and renamed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-13 10:07:16 -05:00
Jack Nagel 49e2034c64 Move old ENV.use_foo? compiler methods to compat
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-03 23:01:28 -06:00
Max Howell eb447c8f61 Improve compatibility for old formula
Allow compatibility to be disabled with --no-compat or HOMEBREW_NO_COMPAT environment variable.
2011-08-02 12:22:58 +01:00