aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
AgeCommit message (Collapse)Author
2014-05-13Use a case statementJack Nagel
2014-05-13Make sure the path arrays only contain stringsJack Nagel
2014-05-13No need to augment path on Xcode-only 10.9Jack Nagel
2014-05-13Move method to prepare for future changesJack Nagel
2014-05-13Future-proof this conditionalJack Nagel
2014-05-12clean up X11 conditionalsJack Nagel
2014-05-10Ensure HOMEBREW_ARCHFLAGS is always a stringJack Nagel
2014-05-08Always use stub tools in /usr/bin on 10.9Jack Nagel
2014-05-06ENV/shared: fix gcc versions edge case.Mike McQuaid
2014-05-06ENV/std: use full paths to gcc versions.Mike McQuaid
This is consistent with how e.g. `gcc-4.2` is handled. This means e.g. `ghc` can find `gcc-4.8` at runtime. Fixes Homebrew/homebrew#28934.
2014-05-06shared: refactor gcc_version_formula.Mike McQuaid
Avoid throwing unnecessary exceptions by checking for paths existing and creating formulae as late as possible. Additionally use instance variables for some caching.
2014-05-06shared: don't use Formula.factory unnecessarily.Mike McQuaid
Instead check if the path exists by using opt.
2014-05-05Add a method_defined? guard for Pathname#/Jack Nagel
This was added to the stdlib in https://github.com/ruby/ruby/commit/391fc2eeecfc2f0d0f851b0c27ba02e041fe2cd9.
2014-05-05Use #+ instead of #join to define Pathname#/Alexey Muranov
See also https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/45826/diff/ext/pathname/lib/pathname.rb Closes Homebrew/homebrew#28972. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-03Suppress a warning on Ruby 2.1+Jack Nagel
2014-05-02Fix for String#undentBaptiste Fontaine
Without it, String#undent would fail on unindented strings, e.g.: "foo".undent NoMethodError: undefined method `length' for nil:NilClass` Closes Homebrew/homebrew#28873. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-05-01Xcode-only path adjustments should be the same in both environmentsJack Nagel
2014-05-01Move xctoolchain_path to Xcode module, where it belongsJack Nagel
2014-04-30Superenv: determine_optflags should return a stringMisty De Meo
This is saved in HOMEBREW_OPTFLAGS and later mutated by ENV.universal_binary, so if this returns nil the sub will fail.
2014-04-30ENV/shared: handle untapped e.g. gcc48 formula.Mike McQuaid
In this case we need to handle the throwing on an exception when attempting to initialize the gcc48 Formula object. This initialization should be unnecessary if the core GCC is already installed and rescued if not.
2014-04-29Drop obsolete compiler fallback in stdenvJack Nagel
This code originated in a slightly different form in 8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad: https://github.com/Homebrew/homebrew/blob/8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad/Library/Homebrew/extend/ENV.rb#L30-L32 Back then, MacOS.default_compiler could return nil, which meant ENV.compiler could do the same. This code was carried forward as the surrounding code changed. At this point it should be unreachable.
2014-04-29ENV/shared: use homebrew/versions GCC if installedMike McQuaid
Closes Homebrew/homebrew#28820.
2014-04-29Use MacOS.locate and delete wrong commentJack Nagel
2014-04-29Remove comment that no longer reflects adjacent codeJack Nagel
2014-04-29We don't use -Qunused-arguments anymoreJack Nagel
2014-04-29ENV.{cc,cxx} setters already set OBJC and OBJCXXJack Nagel
2014-04-29Make ENV.O4 a no-opJack Nagel
On older Apple compilers "-O4" is known to cause build errors. On recent clang, it's the same as "-O3" and you have to pass "-O3 -flto" to get the old behavior.
2014-04-25Yield absolute paths from find_formulaJack Nagel
2014-04-23Support core GCC formula as a GCC compiler.Mike McQuaid
It is activated by the same mechanism as the Homebrew/versions compilers which now check if the GCC formula uses the same, correct version. References Homebrew/homebrew#28418.
2014-04-23shared: don't warn about non-Apple compilers now.Mike McQuaid
2014-04-22Only directories are candidates for superenv binJack Nagel
2014-04-22Simplify conditions for superenv activationJack Nagel
`MacOS::Xcode.without_clt? && MacOS.sdk_path.nil?` should never be true. In its earliest form, this would raise a bare RuntimeError in an effort to have the bug reported. Later, it was changed to silently disable superenv. But we don't want to do that. If there's a bug, or the user's system is misconfigured, we want to know, so that we can fix the bug, or the user can fix their system. So let's remove the condition.
2014-04-21Rework make_relative_symlink error handling and move it into kegJack Nagel
2014-04-20Remove obsolete DEVELOPER_DIR hacksJack Nagel
These days Homebrew refuses to do anything if the xcode-select path is busted, so this workaround is unnecessary.
2014-04-14Use quiet_system to silence some useless warningsJack Nagel
2014-04-14Remove overzealous exceptionsJack Nagel
2014-04-06Recognize and extract xar filesJack Nagel
2014-04-06pathname: use ln_sf in install_symlink.Mike McQuaid
Closes Homebrew/homebrew#28136.
2014-04-06Handle untarred bzip2 filesJack Nagel
Fixes Homebrew/homebrew#28187.
2014-04-06Use a case statement in Pathname#compression_typeJack Nagel
2014-04-05Remove obsolete guards around canonical_name return valueJack Nagel
2014-04-05Avoid realpath where it is not necessaryJack Nagel
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so only resolving one symlink should suffice, and make it clear what path we are actually interested in.
2014-04-04Clean up some concatentation inside interpolationJack Nagel
2014-04-040644 is not executableJack Nagel
2014-03-28Add ENV.refurbish_args helperMisty De Meo
Rationale: our arg refurbishment is normally only turned on when called via the `make` wrapper, for compatibility reasons. However, there are numberous places we'd like this to be turned on elsewhere, like software that builds via `python setup.py` where bad flags from the system python can be pulled in. This helper appends 'O' to CCCFG, which enables refurbishment for all calls of the compiler shims.
2014-03-27Return early so we can reduce nesting of conditionalsJack Nagel
2014-03-27Fix overly defensive handling of src parameter in make_relative_symlinkJack Nagel
This method is for internal use only. It is unsuitable for use in formulae, which should use install_symlink to create relative symlinks. Thus callers are required to pass a Pathname, not a string, and we can remove this conditional. Further, if src is not absolute, then src.relative_path_from(dirname) will fail. All callers currently pass absolute pathnames. Therefore we don't need to call expand_path when printing it.
2014-03-27extend/string: backport #rpartitionMisty De Meo
2014-03-27Don't let broken symlinks halt linkingJack Nagel
2014-03-27Fix conflicting symlink adviceJack Nagel
Closes Homebrew/homebrew#27899.