aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
AgeCommit message (Collapse)Author
2012-03-09ENV.rb: Generalize method for setting CPU flagsCharlie Sharpsteen
All logic has been copied into a new method `set_cpu_flags` that accepts an additional argument, `flags`, which contains a list of environment variables for which the CPU flags are to be adjusted. `set_cpu_cflags` now recalls `set_cpu_flags` and passes `cflags_flags` as the first argument. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-09ENV.rb: Modifier methods accept lists of flagsCharlie Sharpsteen
`ENV` methods that modify environment variables, `prepend`, `append` and `remove`, can now accept lists of flags as well as a single flag. The list of flags affected by `append_to_cflags` and `remove_from_cflags` are now definied in a shortcut method `cc_flag_vars`. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-07If multiple kegs, default to formula kegMax Howell
If it exists, ARGV.kegs will return the Formula.prefix keg for each rack examined. So for ARGV=[wget, foo] and the following Cellar (wget/1.11, wget/1.12, foo/1.0) you'll get [wget/1.12, foo/1.0] from ARGV.kegs provided 1.12 is the formula version of wget.
2012-03-06Extend FileUtils rather than include itJack Nagel
Fixes #10729. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-06Pathname.stem knows about bottlesMax Howell
2012-03-06Proper single character switch handlingMax Howell
Includes a test. So now you can do `brew cleanup -ns` and it will work.
2012-03-06Don't require formula files for `brew rm --force`Max Howell
In fixing this I also made it so that ARGV.kegs will return the LinkedKeg if the symlink is set. Which is almost always is. This neatly avoids most multiple-kegs issues. Fixes #10685.
2012-03-05Move path utils out of formula.rbAdam Vandenberg
Make a new module for our FileUtils extensions and use that instead.
2012-02-27Set ACLOCAL_PATH so that things workMax Howell
This should mean all those formula that pass options to aclocal don't need to anymore, but I'm not risking changing them.
2012-02-26Fix IO redirection in ENV.xcrunJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-25inreplace: also warn on plain gsub! usageAdam Vandenberg
2012-02-25inreplace: warn if no substitutions were madeJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21ENV.rb: Set flags for Objective-CCharlie Sharpsteen
We set defaults for C and C++, might as well do the same for Objective-C and Objective-C++. Closes #10354.
2012-02-21Convert to Pathname if not Pathname as we need it to beMax Howell
2012-02-21Don't hang if xcode-select -print-path is "/"Max Howell
Introducing MacOS.xctools_fucked?. Refs #10293.
2012-02-21Remove -Qunused-arguments in ENV.enable_warningsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21Remove unused :force switchesJack Nagel
The :force behavior for ENV.gcc has been the default for some time, and was used to force vanilla gcc in case the gcc symlink pointed at llvm-gcc; for ENV.clang, this doesn't mattera as clang is just clang. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21Silence unused argument warnings from clangJack Nagel
The clang frontend ignores a number of options that are accepted by gcc and llvm-gcc. However, it produces a warning for each unused argument at each invocation, which can result in many lines of noise, e.g. clang: warning: argument unused during compilation: '-rdynamic' Since these arguments do not affect compilation, let's just silence the warnings by passing '-Qunused-arguments' to clang by default. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21ENV: clean up set_cpu_cflags a bitJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-19add ENV.O1Camillo Lugaresi
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-17Update return values of install and install_symlinkAdam Vandenberg
These now return an Array of all the target destinations. Previously, if a single argument was passed a single non- Array was returned. This behavior has been changed so that an Array is always returned even for a single argument. Updated the test. Hopefully this won't break any custom code out there.
2012-02-17This should be a regexAdam Vandenberg
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-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-16Unset CLICOLOR_FORCE in the build environmentJack Nagel
If we're going to unset GREP_OPTIONS we may as well unset this one too, as it causes similar issues. Recent autoconf unset both of these. Fixes #8165. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-16Find the dev tools, even with Xcode 4.3Max Howell
Fixes #9179.
2012-02-16Pre-refactor TidyMax Howell
2012-02-16Use -Os rather than -O3Max Howell
This was probably a stupid decision in the first place. Who wants lengthy compile times for debatable gain? Apple use Os in all Xcode projects, so I'm guessing its the best choice. Also I have long suspected the Image Magick performance issues Homebrew is supposedly susceptible to were because of O3.
2012-02-16Delete ENV[GREP_OPTIONS] and the related doctor checkMax Howell
Can break CMAKE builds.
2012-02-12ENV: fix typoJack Nagel
2012-02-12Pathname.install_symlinkAdam Vandenberg
2012-02-12Add ENV.cxxflagsJack Nagel
Useful when CXXFLAGS has diverged fom CFLAGS, e.g. via ENV.append, and also it is nice for CXX to have symmetry with CC. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-11Recognize dist suffixAdam Vandenberg
2012-02-10Pathname: silence install-info outputJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-09Allow multiple arguments to installAdam Vandenberg
2012-02-08this was out of balanceAdam Vandenberg
2012-02-08Pathname: support .tar.Z extensionAdam Vandenberg
2012-02-03don't complain if args are emptyAdam Vandenberg
2012-02-03Move old ENV.use_foo? compiler methods to compatJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01keg: handle the info directory file properlyNicolas Despres
If HOMEBREW_KEEP_INFO environment variable is set: - Do not symlink the info directory file (aka 'share/info/dir') otherwise it gets overwritten by next installed brew. - Install an entry in the directory for each linked info file when the brew is linked. - Uninstall the entry when the brew is unlinked. Closes #9700. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01Pathname: remove trailing spacesNicolas Despres
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-19Don't append an empty value to CFLAGSJack Nagel
Appending an empty string results in an extraneous space character. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-16Use more generic cflags when building bottles.Mike McQuaid
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16Add option for building bottles.Mike McQuaid
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16Don't try and use GCC on Xcode 4.2: it's gone Jim.Mike McQuaid
Closes #9622. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-14Fix libinet version detectionMax Howell
2012-01-12pathname: recognize ".cpio.*" double extensionsJack Nagel
Just a cosmetic nicety. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-11ENV.gcc: search HOMEBREW_PREFIX/bin for gcc-4.2Misty De Meo
Allow the use of a Homebrewed gcc-4.2 in order to support homebrew-alt's apple-gcc42 formula. This also removes the :force filtering for the gcc-4.2 check error. Closes #9384. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>