Commit Graph
42 Commits
Author SHA1 Message Date
Jack Nagel 1ca93beebb 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 9ca734097e 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 60b8a5792b Advise brew update before filing issues about compiler versions 2012-10-06 13:20:19 -05:00
Jack Nagel 119f8fac51 Add Xcode 4.5.1 to compiler map
Closes #15282.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-03 22:14:03 -05:00
Misty De Meo f8b351bfd0 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 ebca0d9b9a Add Xcode 4.5 to StandardCompilers map
We now have several reports of compiler versions for the GM,
e.g. #14944.
2012-09-14 17:03:35 -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
Jack Nagel e8b62ad56f 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 cb1fea6ddd Don't error out with Xcode 4.5
c.f. #14603.

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

Closes #14636.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-09-02 11:05:03 -07:00
Max Howell bbe75d3efb 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 #14558.
2012-08-31 10:22:11 -04:00
Max Howell 59736fb537 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 f13ff169ba Use full paths to mdfind and pkgutil 2012-08-27 12:57:56 -04:00
Jack Nagel 1be1e61de7 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 18fb888ff3 Miscellaneous bottle code cleanup. 2012-08-25 13:08:46 -07:00
Jack Nagel 6c444e05e3 Simplify MacOS.locate
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-20 15:00:32 -05:00
Jack Nagel 94f61e599b 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 ce604c642d Deprecate MacOS.version? style methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:25:59 -05:00
Jack Nagel 822aeac407 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 db358b49a3 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 0afa6e2cfe 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 c653f9849b Add better named aliases for macos_version_or_newer? 2012-08-04 10:36:31 +01: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
Misty De Meo fc3adf98c4 xquartz_version: escape spaces for mdls 2012-07-31 10:54:25 -03:00
Misty De Meo ba10b456ae mdfind: Check if path is nil as well as empty 2012-07-31 00:14:52 -03:00
Misty De Meo 7fee581c28 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 e7d031fa42 mdfind: Handle multiple results
Turns out mdfind can return multiple results on the commandline, if
more than one app bundle matches.

Fixes #13789.
2012-07-30 23:20:05 -03:00
Jack Nagel aafc494677 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 #13623.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-27 02:40:44 -05:00
Jack Nagel 6d528e94bb Rename xctools_fucked?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:42 -05:00
Jack Nagel 16be488466 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 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 7c80aae844 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 9ef39e0f05 MacOS module cleanups
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Misty De Meo a957528943 Update Xcode checks for 10.8 2012-07-12 14:34:00 -05:00
Jack Nagel 7f9c606504 Fix 'or' precedence errors
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 15:42:28 -05:00
Camillo Lugaresi 44e39d8a40 add method to find XQuartz version 2012-07-01 12:12:44 -05:00
Camillo Lugaresi 63415cccae use XQuartz when present 2012-07-01 12:10:32 -05:00
Jack Nagel 344005f802 Clarify comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-30 14:10:03 -05:00
Jack Nagel 7384f4152b 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 f6d63ea8f8 Add mdfind method to MacOS module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-29 12:40:26 -05:00
Jack Nagel f1667d9c31 Organize compiler methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-28 14:12:50 -05:00
Adam Vandenberg 0c1fa22a9f Extract MacOS module to separate file 2012-06-27 12:09:57 -07:00