65 Commits

Author SHA1 Message Date
Misty De Meo
2476801613 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
8039d46e09 Xcode 4.6.1 is released
Closes Homebrew/homebrew#18481.
2013-03-14 22:58:55 -05:00
Shaun Jackman
258d70028f Portability fixes to run Homebrew on Linux systems
Closes Homebrew/homebrew#16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00
Mike McQuaid
98352b3b41 Don't run certain functions on non-MACOS. 2013-03-11 18:26:25 +00:00
Mike McQuaid
8f35793020 Support 32-bit 10.6 bottles.
Closes Homebrew/homebrew#17735.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01 17:49:09 +00:00
Mike McQuaid
20c0ddc401 Add non-/usr/local bottles support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01 17:49:09 +00:00
Mike McQuaid
161104cae7 Exclude all located superenv paths.
The previous fix only looked at the current Homebrew but we should
discard hits from other installations of Homebrew too.
2013-02-28 20:53:38 +00:00
Jack Nagel
c16ee6f300 Don't reinvent IndexError here 2013-02-10 21:02:27 -06:00
Jack Nagel
f227695465 superenv bin directory is under HOMEBREW_REPOSITORY 2013-02-07 13:33:04 -06:00
Jack Nagel
7fbeb0df3d MacOSVersion -> MacOS::Version 2013-02-07 12:39:54 -06:00
Jack Nagel
7178210a71 MacOS: cache calls to mdfind 2013-02-06 22:24:24 -06:00
Jack Nagel
7b93130a39 Don't call methods on xcrun_path if it's nil 2013-02-01 13:36:53 -06:00
Mike McQuaid
b1bc9ec809 Don't let xcrun find superenv tools.
Causes an infinite loop when trying to find e.g. missing gcc.

Closes Homebrew/homebrew#17426
References Homebrew/homebrew#17455
2013-01-31 21:48:28 -08:00
Mike McQuaid
b58077b3e8 Don't use underscores in (new) bottle filenames.
Closes Homebrew/homebrew#14270
2013-01-29 17:14:09 -08:00
Jack Nagel
35394ad584 Fix clang version detection on Xcode 4.6+ 2013-01-28 14:40:58 -06:00
Jack Nagel
246b60573f Fix compiler map key 2013-01-28 14:33:52 -06:00
Mike McQuaid
5b281ded58 Xcode 4.6 released.
Closes Homebrew/homebrew#17383. Closes Homebrew/homebrew#17384.
2013-01-28 12:13:08 -08:00
Jack Nagel
c2fd7856d2 Prevent repeated lookups of nil-valued keys 2013-01-08 10:21:28 -06:00
Jack Nagel
3dcce70a6a Better reporting for MacPorts/Fink installations
closes Homebrew/homebrew#15853.
2012-12-17 17:18:22 -06:00
Mike McQuaid
fe4e73db32 Fix stupid typo in bottle fix. 2012-12-12 00:47:02 +00:00
Mike McQuaid
584768b93f Disable bottle installation correctly on 10.6. 2012-12-11 23:39:43 +00:00
Jack Nagel
827e4f813f Don't print error message when dev_tools_path fails to find tools
This message is either (a) never printed because the tools are
installed, or (b) printed every time this method is called.

See Homebrew/homebrew#16119.

This code shouldn't be responsible for UX anyway, so just remove it and
let other parts of Homebrew be responsible for failing or declaring that
they need the developer tools.
2012-12-08 16:51:29 -06:00
Mike McQuaid
4b0e663c2c Improve bottle error messages.
On installation or creation of a bottle error out of the current
machine does not support bottles.

References Homebrew/homebrew#16291.
2012-12-04 12:06:02 +00:00
Jack Nagel
fa6cf55f58 Add Xcode 4.5.2 to standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-01 14:13:26 -05:00
Jack Nagel
73b7c52673 Reduce code footprint of standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 18:17:22 -05:00
Jack Nagel
f2b6ec0bfc Advise brew update before filing issues about compiler versions 2012-10-06 13:20:19 -05:00
Jack Nagel
736717cf24 Add Xcode 4.5.1 to compiler map
Closes Homebrew/homebrew#15282.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-03 22:14:03 -05:00
Misty De Meo
e8c372a315 Skip standard compilers check for unknown Xcode
Rescuing false on the StandardCompilers map meant that the doctor
check assumed that the compilers were incorrect, not merely
unknown.

Instead, skip the check and return nil for unknown Xcode; nil
should be interpreted as "dunno", instead of "true" or "false",
and the doctor check no longer prints on nil.
2012-09-14 17:11:51 -05:00
Misty De Meo
50efa98638 Add Xcode 4.5 to StandardCompilers map
We now have several reports of compiler versions for the GM,
e.g. Homebrew/homebrew#14944.
2012-09-14 17:03:35 -05:00
Jack Nagel
59d5a246e7 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
Jack Nagel
ffd6e7f340 Fix typo in MacOS.sdk_path
/cc @adamv

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 18:14:30 -05:00
Jack Nagel
eb3c0cd273 Don't error out with Xcode 4.5
c.f. Homebrew/homebrew#14603.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 15:15:39 -05:00
Stephan Zeissler
b49fa78f96 Change sdk detection to same syntax used elsewhere.
This wasn't working for me on leopard with ruby 1.9.2.

Closes Homebrew/homebrew#14636.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-09-02 11:05:03 -07:00
Max Howell
1555436f70 MacOS.sdk_path is unlicensed Xcode aware
Now we should get an sdk_path, but tools like xcodebuild, xcode-select and xcrun will still error out. But at least more of Homebrew will work.

Also putting the Xcode 3 path finder last. We get bug reports because newer Xcodes are installed in parallel to older Xcodes. We want to find and use the newer Xcode's first. Xcode.prefix is pretty smart about that.

Refs Homebrew/homebrew#14558.
2012-08-31 10:22:11 -04:00
Max Howell
65d195dcaa superenv: build-environments that just work
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds.
2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools.

Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't.

The previous ENV-system is still available when --env=std is specified.

superenv applies to Xcode >= 4.3 only currently.
2012-08-29 12:41:34 -04:00
Max Howell
0509406069 Use full paths to mdfind and pkgutil 2012-08-27 12:57:56 -04:00
Jack Nagel
757b73e9a9 Ask the user for help if MacOS.compilers_standard? fails
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-26 13:57:23 -05:00
Mike McQuaid
67f78074f9 Miscellaneous bottle code cleanup. 2012-08-25 13:08:46 -07:00
Jack Nagel
8a9a1d5b00 Simplify MacOS.locate
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-20 15:00:32 -05:00
Jack Nagel
f471c3e99f MacOS.dev_tools_path: return nil if not found
This matches the semantics of other path methods, such as Xcode.prefix.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-20 15:00:32 -05:00
Jack Nagel
166a9ba0ed Deprecate MacOS.version? style methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:25:59 -05:00
Jack Nagel
b8231fc5f3 Add custom comparator for MacOS.version
This will allow us to do comparisons like

  if MacOS.version >= :lion

and hopefully deprecate the MacOS.<name>? family of methods, which are
counterinitutive.
2012-08-18 11:13:54 -05:00
Jack Nagel
1a8d535721 Add Xcode 4.4.1 to standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-17 22:38:32 -05:00
Misty De Meo
d58fc0c2e4 dev_tools_path: Don't trust exit status of xcrun
A user on IRC was getting strange results from MacOS.dev_tools_path.
It turns out that xcrun's exit status is not always reliable - if
xcrun is a shim and not able to locate the real xcrun, it will exit
0 despite not actually doing what it was asked. Instead check to see
if the stout is empty.
2012-08-09 16:33:49 -05:00
Mike McQuaid
cdc987286a Add better named aliases for macos_version_or_newer? 2012-08-04 10:36:31 +01:00
Jack Nagel
148617bc11 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
Misty De Meo
1a48dbc967 xquartz_version: escape spaces for mdls 2012-07-31 10:54:25 -03:00
Misty De Meo
fcbee28447 mdfind: Check if path is nil as well as empty 2012-07-31 00:14:52 -03:00
Misty De Meo
9af7e25e03 mdfind: don't strip
Since we're splitting on newlines, stripping shouldn't be necessary.
2012-07-30 23:36:00 -03:00
Misty De Meo
2056e24a12 mdfind: Handle multiple results
Turns out mdfind can return multiple results on the commandline, if
more than one app bundle matches.

Fixes Homebrew/homebrew#13789.
2012-07-30 23:20:05 -03:00