aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
AgeCommit message (Collapse)Author
2012-03-16xcode_version works for Xcode 4.3 without CLIToolsMax Howell
Also correct heinous error when I put `case nil` in the code. Also outputs "dunno" if we really can't figure it out. I think this is safe.
2012-03-10Move most bottle stuff to a bottles.rb file.Mike McQuaid
2012-03-10Support bottles for non-Lion OSX versions.Mike McQuaid
2012-03-06add which methodAdam Vandenberg
2012-02-26Make xcode_version work with CLI4.3XMax Howell
Closes Homebrew/homebrew#10460.
2012-02-25inreplace: warn if no substitutions were madeJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21Yield to the inevitableAdam Vandenberg
2012-02-21Don't hang if xcode-select -print-path is "/"Max Howell
Introducing MacOS.xctools_fucked?. Refs Homebrew/homebrew#10293.
2012-02-20Don't hang if xcode-select is set to "/"Max Howell
2012-02-18OTT handling for various Xcode-4.3/CLI-Tools edge casesMax Howell
Also xcrun can only exist at /usr/bin/xcrun. Most of these edges are non-buildable environments, but I didn't know that when writing it, so it may as well stay, since it still does make brew --env more correct.
2012-02-17Find xcrun if user doesn't ever install Xcode 4.3 helper toolsMax Howell
2012-02-17Fix some default_cc behaviorMax Howell
Fixes Homebrew/homebrew#10245. Fixes Homebrew/homebrew#10248.
2012-02-17Work with Xcode 4.3 if user didn't install helper toolsMax Howell
We ask Spotlight to find Xcode and use that path, neat right?
2012-02-16Use xcrun; Ensure clang is the default compiler with Xcode 4.3Max Howell
Using xcrun as a proxy to execute the compiler tools is per its design. This means you can't treat ENV['CC'] as a path anymore, but I think I found the cases this was being expected and corrected them. It was not proper anyway to assume the variable was a path, it can be anything. Like a proxy. Like xcrun. Also more thoroughly clear ENV.
2012-02-16Fix default_ccMax Howell
Dumb logic error. Also same one in MacOS.compiler. Am I getting old? Also it returns a string and not a float.
2012-02-16Find the dev tools, even with Xcode 4.3Max Howell
Fixes Homebrew/homebrew#9179.
2012-02-16Support Xcode 4.3 xcode-select being wrongMax Howell
I installed Xcode 4.3 and xcode-select is wrong, so this will fix it for most users.
2012-02-10Be gentle when stdout is not a ttyJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-29Bottles should care about cellar and prefixMike McQuaid
2012-01-29Bottles should care about cellar path not prefix.Mike McQuaid
Closes Homebrew/homebrew#9844.
2012-01-26Strip escaping from queryKonstantin Shabanov
Regexp#source retains escape sequences as is, so searching for formulae like 'pure-ftpd' doesn't work. Closes Homebrew/homebrew#9597. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-16Add option for building bottles.Mike McQuaid
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-13search: return results while parsingMisty De Meo
Instead of returning a full list of results after parsing, yield and print each result as it's found for a snappier user experience. Closes Homebrew/homebrew#9576. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-13search: use v2 APIMisty De Meo
The v3 API currently lacks a search feature. Use the v2 API instead for much faster pull request filtering. Closes Homebrew/homebrew#9592. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-11search: return matches from open pull requestsJack Nagel
When search can't find any local results, hit the GitHub API and search the titles of pending pull requests. This will help people find the many proposed formulae and prevent them from wasting time duplicating them. Closes Homebrew/homebrew#9018. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-11Make MacOS.clang_build_version more usefulJack Nagel
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>
2011-12-30Only show gcc build if it's really gccJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-16Enable 'brew edit' for non-Textmate editors.Adam Vandenberg
2011-12-16utils: fix clang build regexJack Nagel
This has to be able to match things like "211.10.1" so let's stop using fixed lengths. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08Introduce HOMEBREW_CURL_VERBOSEJack Nagel
When investigating issues, one might want to see exactly what curl is doing behind the scenes. Setting HOMEBREW_CURL_VERBOSE will cause the '--verbose' flag to be passed to all invocations of curl. Prompted by Homebrew/homebrew#8992. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25Utils: update gcc version detection logicMisty De Meo
Homebrew was attempting to check the version of gcc-4.0 and gcc-4.2 even if they don't exist, causing `doctor` and `--config` to throw nasty errors. Also fixes the broken missing gcc-4.2 detection, which was confusing Xcode 4.2 users. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-25Detect 2-digit clang build versionsMisty De Meo
Xcode 3.2.6's build of clang is 77, which wasn't being matched by the clang_build_version regexp. Closes Homebrew/homebrew#8796. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25Add utility methods to determine clang versionJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25Parse `compiler --version` instead of -vJack Nagel
For GCC and LLVM-GCC, '-v' is not a synonym for --version. When run without any other options or arguments, it gives similar output, but it is better to just parse the (terser) --version output. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19Only try mirrors for CurlDownloadStrategiesMax Howell
Also adjust output text slightly for prettiness. A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
2011-09-19exceptions.rb: Add DownloadErrorCharlie Sharpsteen
`DownloadError` is an exception that download stratigies can throw to indicate that a fetch was incomplete due to a failure in communication. The `curl` method in `utils.rb` has been upgraded to throw a `DownloadError` if something bad happens to `curl` execution.
2011-09-06If LLVM isn't installed then fails_with_llvm? is trueMax Howell
This makes sense, I assure you. Fixes Homebrew/homebrew#7458.
2011-09-06MacOS.default_compiler should return something alwaysMax Howell
Even though we are just guessing if it doesn't correspond to any of the others…
2011-09-05Check even more carefully for xcode_versionMax Howell
Refs Homebrew/homebrew#7236, though honestly I just think @dsarch hasn't updated.
2011-09-05Use proper issue URLMax Howell
2011-09-04Don't look for llvm-gcc in xcode_prefixMax Howell
Look in /usr/bin because all versions of Xcode install it to /usr/bin now and this allows us to support Xcode-less installs of Apple's developer tools.
2011-09-02Guess Xcode version if `xcodebuild` doesn't existMax Howell
2011-08-31Default to LLVM for Xcodes that default to LLVMMax Howell
2011-08-31Don't point user at issues that are probably unrelatedMax Howell
2011-08-26Use curl with --insecure when on OS X < 10.6Max Howell
The SSL certificates on this old version of OS X are outdated and who knows if Apple will fix them. Fixes Homebrew/homebrew#6103.
2011-08-24HOMEBREW_CURL_ARGS so that tests can be more silentMax Howell
2011-08-24oh1 stdout display functionMax Howell
2011-07-27Add MacOS.lion? for MACOS_VERSION == 10.7Samuel Cochran
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-05-18Create method for accessing Xcode version.Mike McQuaid
2011-04-26No really, fix llvm_build_version and xcode_prefixAdam Vandenberg