30 Commits

Author SHA1 Message Date
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
Jack Nagel
4dde88b6d3 Un-break MacOS.sdk_path
MacOS.sdk_path is meant to return the SDK path that matches the version
argument, so store the result in a hash.

Fixes Homebrew/homebrew#13623.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-27 02:40:44 -05:00
Jack Nagel
74839417ea Rename xctools_fucked?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:42 -05:00
Jack Nagel
a784d2e045 Move Xcode and CLT modules to a new file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:41 -05:00
Jack Nagel
62482504a9 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
02f48dd7d8 MacOS: avoid checking clt_version in clt_installed?
Checking "not clt_version.empty?" is unnecessary if we are also checking
that dev_tools_path is /usr/bin.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Jack Nagel
0b1d759c2c MacOS module cleanups
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Misty De Meo
3696180fd7 Update Xcode checks for 10.8 2012-07-12 14:34:00 -05:00
Jack Nagel
577fe6d72b Fix 'or' precedence errors
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 15:42:28 -05:00
Camillo Lugaresi
65567eb55f add method to find XQuartz version 2012-07-01 12:12:44 -05:00
Camillo Lugaresi
a07085df2d use XQuartz when present 2012-07-01 12:10:32 -05:00
Jack Nagel
17e7b7eaa4 Clarify comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-30 14:10:03 -05:00
Jack Nagel
cfe58531ee Address some style issues in MacOS module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-30 14:01:07 -05:00
Jack Nagel
8f6ee31004 Add mdfind method to MacOS module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-29 12:40:26 -05:00
Jack Nagel
f2e076e5cc Organize compiler methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-28 14:12:50 -05:00
Adam Vandenberg
0bb95960e6 Extract MacOS module to separate file 2012-06-27 12:09:57 -07:00