aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
AgeCommit message (Collapse)Author
2012-08-29Ensure mktemp cleans up after itselfMax Howell
Ignore interrupts.
2012-08-29superenv: build-environments that just workMax Howell
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-29Record HEAD SHA and date of installs in receiptMax Howell
2012-08-29Produce good error messages for bad tarballsMax Howell
2012-08-25Miscellaneous bottle code cleanup.Mike McQuaid
2012-08-25Fix ARGV and bottles circular dependency.Mike McQuaid
2012-08-25Move used_options and unused_options to ARGV.Mike McQuaid
2012-08-25Fix tests and NoMethodError with no X11 installed.Mike McQuaid
2012-08-23Compact whitespace when removing flagsJack Nagel
This prevents multiple calls to flag-modifying ENV methods from resulting in large amounts of consecutive spaces. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23Xcode-only: Clean up compiler flags. Use CPATH.samueljohn
- When using CPATH, we only need -isysroot and not the other -I spam. - LDFLAGS use -isysroot instead of -L Turns out that the linker also understands the -isysroot flag which behaves more natural (in the sense: "like the internal defaults `/usr/lib` etc.) than adding `-L$(SDKROOT). Especially for duplicates, the linker first searches through all `-L` dirs and then looks at the sysroot or internal defaults. This is what we want. - Pkg-config needs CC with CFLAGS passed to configure. Closes Homebrew/homebrew#14351. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-21Support ENV[VERBOSE]Max Howell
2012-08-18Add ARGV.ignore_deps?Jack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Deprecate MacOS.version? style methodsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Replace version strings with Version objectsJack Nagel
2012-08-18Move version detection to Version classJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-14Improve libiconv diagnostic and suggestionMax Howell
This is coming up a lot at the moment, so here is an attempt to be more helpful.
2012-08-13Don't fail if ENOENTMax Howell
2012-08-12Don't require the WHOLE of Homebrew from ARGV.rbMax Howell
This was slowing down every instantiation of brew significantly. Hopefully doesn't break anything that had become accustomed to not having to require 'formula' or 'keg'. /cc @mikemcquaid
2012-08-06Fix issues with writable? detection in brew doctorBrandon Black
Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
2012-08-06Adjust XQuartz/X11 module naming schemeJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-04Use LC_CTYPE rather than LANG for most specific ML sed fix.Mike McQuaid
Fix Homebrew/homebrew#11728, fix Homebrew/homebrew#12890, fix Homebrew/homebrew#13653, fix Homebrew/homebrew#13734, fix Homebrew/homebrew#13787, fix Homebrew/homebrew#13818, fix Homebrew/homebrew#13939.
2012-08-02Fix Mountain Lion sed by setting LANG.Mike McQuaid
It's also necessary to delete LC_ALL or it overrides the new LANG. LC_COLLATE is the problem variable but is affected by LANG and LC_ALL so just use them instead. Extends the fix made to geoip in dc955c. Fix Homebrew/homebrew#11728, fix Homebrew/homebrew#12890, fix Homebrew/homebrew#13653, fix Homebrew/homebrew#13734, fix Homebrew/homebrew#13787, fix Homebrew/homebrew#13818.
2012-08-01Move X11 machinery into MacOS::XQuartz namespaceJack Nagel
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-07-29Provide missing .pc files for 10.8Misty De Meo
10.8 no longer ships four .pc files which were included in previous versions, though it does still include the libraries which they pointed to. This commit provides copies of the .pc files for all of these, and prepends Library/Homebrew/pkgconfig to PKG_CONFIG_PATH on 10.8. The .pc files in question are: lib curl, lubexslt, libxml-2.0, libxslt Fixes Homebrew/homebrew#13673. Fixes Homebrew/homebrew#13627. Fixes Homebrew/homebrew#13652. Fixes Homebrew/homebrew#13482. Closes Homebrew/homebrew#13572. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-29Synchronize Keg#link and #unlink countsMisty De Meo
Keg#link would sometimes count a linked file when doing mkpath, even if the target directory already exists; #unlink would never count it. This meant that "brew ln" and "brew unlink" counts for the same keg could be out of sync with each other.
2012-07-25Use new Xcode moduleJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25Split Xcode and CLT methods into separate modulesJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-09ARGV: add .dry_run? methodMisty De Meo
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that '-n' is being used as a git-style dry-run in two commands. Closes Homebrew/homebrew#12898. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09link: add --force and --dry-run optionsMisty De Meo
`brew link` can now be made to delete any conflicting files using the --force argument. It also has a --dry-run option, similar to git clean -n, which will list any files which would be deleted without touching the filesystem. Closes Homebrew/homebrew#11811. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09ENV: remove -L from CFLAGS.samueljohn
SDK/usr/include and lib now appended instead of prepended. Prepending overwrote our precedence of HOMEBREW_PREFIX/include and lib. Closes Homebrew/homebrew#13292. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-07-05Decouple pathname from bottlesJack Nagel
Pathname is one of the basic building block classes in Homebrew, and as such it is preferrable that `require`ing it does not drag in other Homebrew code; thus avoiding circular dependency situations. Its dependency on bottles.rb gave it an implicit dependency on formula.rb, among other things. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Refactor checksummingJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01use XQuartz when presentCamillo Lugaresi
2012-06-27Fix Homebrew/homebrew#13012 properly and don't set the SDK if CLTsamueljohn
Undoing parts of the hot fix 78b9e8548e771a59e382e6f13339664ec5498391. The only thing missing was to check for `system "/usr/bin/xcrun -find make 1>/dev/null 2>&1"` and then it's safe to call locate. This commit restores the original functionality but without the risk for recursion and improves the logic of `MacOS.locate`. See below. To important changes in this commit: - For Xcode _and_ CLT: don't add the SDK and leave things as before. So if `MacOS.clt_installed?`, then no `SDKROOT` and `-L` and `-I` directories are set in `ENV.macosxsdk`. - Improved the logic for `MacOS.locate` for Xcode-only situations by assuring that the xcode-select path is correct. This is done by checking that `bin/make` exists and is executable. Otherwise it was possible to set xcode-select to an empty dir. This check is done in `MacOS.sdk_path` too. We are now able to use Xcode wherever it is and can work even, if xcode-select is set to invalid values. (Remember some users don't have sudo access and that is needed to fix xcode-select). Some minor whitespace fixes. Minor backtick fix in doctor.rb's printout. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-24Core change: XCode only install, with CLT or bothsamueljohn
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 Homebrew/homebrew#10510. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-15Improve Pathname#text_executable? regexpJack Nagel
file(1) does not allow leading whitespace on shebang lines, and there appears to be no restrictions on what characters follow '#!', either. While at it, fix an erroneous shebang test. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-10Add ARGV.build_stable?Adam Vandenberg
2012-06-03Handle EOF in Pathname#text_executable?Jack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30Pathname: add Mach-O moduleJack Nagel
The MachO module contains methods for learning about Mach-O binaries, and can be used where one might normally shell out to file(1). Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-03Don't unzip war filesAdam Vandenberg
2012-05-03Detect uncompressed tarsAdam Vandenberg
From a patch by @RuiPereira Closes Homebrew/homebrew#12011.
2012-05-03ENV.rb: Always return integers from make_jobsCharlie Sharpsteen
When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it returned a string. Now, the function always returns an integer. Fixes Homebrew/homebrew#12033.
2012-05-03Revert "ENV.rb: Always return integers from make_jobs"Charlie Sharpsteen
This reverts commit ea1a9e603abe3dab90bf5b157d2614cf58e2cc8e. Argh. Unrelated PySide changes slipped in.
2012-05-03ENV.rb: Always return integers from make_jobsCharlie Sharpsteen
When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it returned a string. Now, the function always returns an integer. Fixes Homebrew/homebrew#12033.
2012-05-02Extract detection of compression typesAdam Vandenberg
Separate out detecting compression types from uncompressing and staging.
2012-05-01Fix Ruby warnings.Mike McQuaid
Fixes Homebrew/homebrew#11966.
2012-04-24Change versioned bottle syntax and fix issues.Mike McQuaid
Fixed Homebrew/homebrew#11562.
2012-04-24Add and correctly find erlang bottle.Mike McQuaid
Fixes Homebrew/homebrew#11780.
2012-04-24Revert "Add and correctly find erlang bottle."Mike McQuaid
This reverts commit 146e253856eb3e27b6b7382734fd178c160c1beb.
2012-04-24Revert "Change versioned bottle syntax and fix issues."Mike McQuaid
This reverts commit f80908bead8b620ebcc5cdde9de65e70598002b6.