Commit Graph
40 Commits
Author SHA1 Message Date
Jack Nagel 0520c36eed Replace literal paths to ruby with RUBY_PATH 2013-04-06 13:10:12 -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
Simon Sigurdhsson 6bbb92f138 Doctor check for origin
Added checks on doctor.rb for:

* Missing git origin
* git origin not pointing at mxcl/homebrew

Tests use `git config --get remote.origin.url`.
Also added printout of origin to --config.rb.

Fixes #14399.
Closes #17117.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-01-17 17:18:15 -06:00
Jack Nagel ac86882a1e Better reporting for MacPorts/Fink installations
closes #15853.
2012-12-17 17:18:22 -06:00
Jack Nagel 2c1ad3ce38 Improve Xcode and CLT config reporting
We support three configurations: Xcode-only, CLT-only, and Xcode with
CLT. Our configuration output should correctly reflect this.

While MacOS::Xcode.version has to continue to return a guess if Xcode is
not installed in order to maintain backwards compatibility, this is an
implementation detail that we don't need to expose to the user. And it
makes `brew --config` output confusing.

So let's only print the "Xcode" line when an actual Xcode installation
is present. This makes it easy to quickly figure out which of the three
possible configurations the user is running.

Addresses #14941, more or less.
2012-12-12 23:33:29 -06:00
Max Howell c61daa969c Safer way to redirect puts to a file 2012-09-28 09:49:05 -04:00
Max Howell 29ea04e12b Only handle build-errors when it's a build-error
Refs #15164.
2012-09-28 09:37:38 -04:00
Jack Nagel 31fd1402e4 Restore X11 description to --config output
Oops.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-14 12:29:51 -05:00
Jack Nagel 85262a2b73 Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:56:25 -05:00
Adam Vandenberg c89beafa7e Remove fink/macports from verbose --config if they are not present. 2012-09-05 22:07:35 -07:00
Jack Nagel e209b35708 Improve brew --config responsiveness
Rather than build the whole output in a string, print each item as we
go. This gives the illusion of improved responsiveness by delaying the
expensive method calls until after the faster output.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-05 16:41:35 -05:00
Max Howell a8fadbfaee brew -c1 one line configuration summary
At your option: `brew --config -1`.
2012-08-31 15:48:48 -04:00
Jack Nagel fd53890110 --config: remove confusing XQuartz annotation
Apple's X11 is XQuartz, but this can be confusing, and is ultimately
unnecessary for debugging purposes.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-14 15:04:55 -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 96de6f072d Restore some things to failed install config dump
Closes #11091.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:27:19 -05:00
Jack Nagel ad4d524b2c Display compiler build numbers in config dump
But only display them if they are out of sync with the corresponding
Xcode version.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:26:10 -05:00
Jack Nagel ecae65f775 Always output X11 version and path in config dump
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:16:53 -05:00
Camillo Lugaresi 0a84bf674d Better describe X11 in brew --config 2012-07-01 12:20:47 -05:00
Jack Nagel 9aca25c32e config: omit Xcode path for CLT-only systems
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-26 12:20:04 -05:00
Jack Nagel b0cc25007a Clean up --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-26 00:02:42 -05:00
samueljohn 3c52a3050e Core change: XCode only install, with CLT or both
Allow XCode without the Command Line Tools to
work with homebrew, so it's not necessary
to register an Apple Dev ID and/or go to the
XCode prefs and download the CLT. Yay!

Further, this commit allows to use the CLT
solely (without the need for XCode).
Saves quite some megs.
(Some furmulae require xcodebuild)

Of course XCode together with the CLT is still
fine and has been tested on 10.7 and 10.6
with Xcode 4 and Xcode 3.

Only on Lion or above, tell the user about the options,
which are
- Xcode without CLT
- CLT without Xcode
- both (ok, it's not directly stated, but implicit)
So if no Xcode is found and we are on Lion or above,
we don't fail but check for the CLTs now.
For older Macs, the old message that Xcode is needed
and the installer should be run is still displayed.
If the CLT are not found but Xcode is, then we
print out about the experimental status of this setup.

Closes #10510.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-24 19:11:06 -07:00
Misty De Meo d727f8b7f3 Replace /usr/bin/ruby with full Framework path
Rationale: some users insist on replacing the /usr/bin/ruby symlink
to point to another ruby on their system, which may break homebrew.
Use the full Framework path instead, which is less likely to be tampered with.

This also reorganizes the brew --config checks to reflect the different path.

Fixes #12009.

Closes #12333.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-01 09:24:25 -05:00
Jack Nagel 2fb94e4d9b Use 'which' helper method more
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel c4b547a861 Fix typo in --config.rb
Closes #11183.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-24 12:11:37 -05:00
Max Howell 126cc9fa15 Concise --config output for build errors
Rationale, lets only pay attention to the output when it matters. Speeding up diagnosis.
2012-03-16 21:06:16 +00:00
Max Howell 63a8f466a5 Play nice with case-sensitive filesystems 2012-02-29 01:28:23 +00:00
Jack Nagel 4ab1f7ab8e Show real path to x11 in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-27 23:43:56 -06:00
samueljohn 1bf9a147e5 brew --config: properly handle empty which strings
Symptom: If no python/ruby/perl is in your path, then `which x`.chomp
returns an empty string and `unless ""` is still true.  So, N/A is never
displayed.  Instead, ruby's Pathname.new("").realpath returns the cwd.
(I consider this realpath behavior a ruby bug) Fix: use empty?

Closes #10027.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-08 14:41:55 -06:00
Adam Vandenberg 590c0df6ca Show which Perl, Python and Ruby are in the path. 2012-02-02 19:10:56 -08:00
Jack Nagel f05db25a8e Make MacOS.clang_build_version more useful
Let's choose the first \d{2,} as the build number, as it is the most
likely to indicate significant changes, and we need something to use for
comparison when selecting compilers.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-11 02:19:09 -06:00
Jack Nagel 14262d5891 config: prettify sha method
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-28 19:54:59 -06:00
Adam Vandenberg c40c779b53 Clean up --config 2011-12-21 10:47:44 -08:00
Adam Vandenberg 335e2ce358 brew-config: remove recommended compiler versions
The recommended compiler versions printed from `brew-config` are out
of date and misleading. The recommendation is always "Run the latest
version of Xcode available for your platform".
2011-11-25 17:34:47 -08:00
Jack Nagel cb7f7f2467 Display clang version in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:15:47 -06:00
Mike McQuaid 58b7a5edbe Create method for accessing Xcode version. 2011-05-18 17:04:00 +01:00
Adam Vandenberg b792d98ad8 remove whitespace 2011-03-26 10:19:45 -07:00
Max Howell 957528baf1 Don't throw if no gcc 4.0 installed 2011-03-12 11:55:05 -08:00
Max Howell 9afc85ad33 Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00