664 Commits

Author SHA1 Message Date
Jack Nagel
4b335eb2df Xcode-only path adjustments should be the same in both environments 2014-05-01 18:36:46 -05:00
Jack Nagel
71055aa073 Move xctoolchain_path to Xcode module, where it belongs 2014-05-01 18:36:46 -05:00
Misty De Meo
48cd833a15 Superenv: determine_optflags should return a string
This is saved in HOMEBREW_OPTFLAGS and later mutated by
ENV.universal_binary, so if this returns nil the sub will fail.
2014-04-30 08:21:54 -07:00
Mike McQuaid
116c2b06a8 ENV/shared: handle untapped e.g. gcc48 formula.
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-30 12:38:22 +01:00
Jack Nagel
259bbdf76c Drop obsolete compiler fallback in stdenv
This code originated in a slightly different form in 8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad:

8e88b22fd1/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-29 21:11:03 -05:00
Mike McQuaid
2c3b04fb26 ENV/shared: use homebrew/versions GCC if installed
Closes Homebrew/homebrew#28820.
2014-04-29 08:51:56 +01:00
Jack Nagel
b6a0b95380 Use MacOS.locate and delete wrong comment 2014-04-29 01:31:22 -05:00
Jack Nagel
0de7f98b58 Remove comment that no longer reflects adjacent code 2014-04-29 01:31:22 -05:00
Jack Nagel
bfde04ee17 We don't use -Qunused-arguments anymore 2014-04-29 00:11:54 -05:00
Jack Nagel
90c03ffc17 ENV.{cc,cxx} setters already set OBJC and OBJCXX 2014-04-29 00:09:07 -05:00
Jack Nagel
6a2fa253cd Make ENV.O4 a no-op
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-29 00:09:07 -05:00
Jack Nagel
bdee729a41 Yield absolute paths from find_formula 2014-04-25 18:58:16 -05:00
Mike McQuaid
55d277c335 Support core GCC formula as a GCC compiler.
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-23 08:10:48 +01:00
Mike McQuaid
593702c70b shared: don't warn about non-Apple compilers now. 2014-04-23 08:10:48 +01:00
Jack Nagel
6cdc76452b Only directories are candidates for superenv bin 2014-04-22 15:39:59 -05:00
Jack Nagel
722a5af4eb Simplify conditions for superenv activation
`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-22 15:37:34 -05:00
Jack Nagel
d3ab439b7c Rework make_relative_symlink error handling and move it into keg 2014-04-21 12:43:06 -05:00
Jack Nagel
dd8dc7a380 Remove obsolete DEVELOPER_DIR hacks
These days Homebrew refuses to do anything if the xcode-select path is
busted, so this workaround is unnecessary.
2014-04-20 16:33:41 -05:00
Jack Nagel
581e1b2c7e Use quiet_system to silence some useless warnings 2014-04-14 21:32:50 -05:00
Jack Nagel
4738974a78 Remove overzealous exceptions 2014-04-14 21:31:03 -05:00
Jack Nagel
260a351663 Recognize and extract xar files 2014-04-06 12:35:54 -05:00
Mike McQuaid
edef6508bd pathname: use ln_sf in install_symlink.
Closes Homebrew/homebrew#28136.
2014-04-06 18:12:02 +01:00
Jack Nagel
cb5da28b5c Handle untarred bzip2 files
Fixes Homebrew/homebrew#28187.
2014-04-06 11:33:50 -05:00
Jack Nagel
607605dd8f Use a case statement in Pathname#compression_type 2014-04-06 11:18:25 -05:00
Jack Nagel
d8bdcf84af Remove obsolete guards around canonical_name return value 2014-04-05 22:03:49 -05:00
Jack Nagel
ce1f598e98 Avoid realpath where it is not necessary
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-05 12:17:19 -05:00
Jack Nagel
dc3691eccd Clean up some concatentation inside interpolation 2014-04-04 22:02:48 -05:00
Jack Nagel
2110aa2379 0644 is not executable 2014-04-04 00:07:28 -05:00
Misty De Meo
0ec7e39287 Add ENV.refurbish_args helper
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-28 17:02:14 -07:00
Jack Nagel
4e918666d7 Return early so we can reduce nesting of conditionals 2014-03-27 18:42:19 -05:00
Jack Nagel
ed0be26c77 Fix overly defensive handling of src parameter in make_relative_symlink
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-27 17:54:07 -05:00
Misty De Meo
38e26ed929 extend/string: backport #rpartition 2014-03-27 10:14:08 -07:00
Jack Nagel
e9ee640024 Don't let broken symlinks halt linking 2014-03-27 09:35:10 -05:00
Jack Nagel
f6b5c83482 Fix conflicting symlink advice
Closes Homebrew/homebrew#27899.
2014-03-27 09:35:10 -05:00
Jack Nagel
e5fbc9c92e Fall back to Process.gid if we aren't a member of the file's group 2014-03-26 13:45:46 -05:00
Jack Nagel
03fca453c4 Put tempfile into binmode before writing 2014-03-26 13:45:46 -05:00
Jack Nagel
26fe9df9b2 Preserve permissions when using Pathname#atomic_write 2014-03-22 10:58:28 -05:00
Mike McQuaid
3b0eef09e9 Remove unnecessary swearing. 2014-03-22 10:14:20 +00:00
Jack Nagel
7f33a84ce6 Expand paths before making relative symlink
Fixes Homebrew/homebrew#27702.
Fixes Homebrew/homebrew#27704.
2014-03-19 15:57:39 -05:00
Jack Nagel
aa7ed10968 Make relative symlinks in Pathname#install_symlink
Closes Homebrew/homebrew#27672.
2014-03-18 19:03:25 -05:00
Jack Nagel
e0216d95af Prefer opt prefix over linked keg entry when picking active keg 2014-03-15 16:57:37 -05:00
Jack Nagel
3b3b782ba9 Add an extra sanity check 2014-03-15 16:56:51 -05:00
Jack Nagel
13f8c7ab95 Refactor ARGV.kegs 2014-03-15 16:56:40 -05:00
Jack Nagel
e236901e56 Use canonicalized name in NoSuchKegError message
cf. Homebrew/homebrew#22778.
2014-03-15 12:55:14 -05:00
Jack Nagel
a867cb4305 Use Formula#system and existing error handling in scons helper
Fixes Homebrew/homebrew#27553.
2014-03-14 16:41:57 -05:00
Jack Nagel
c7a54f8da1 Use ARGV.env 2014-03-13 16:37:11 -05:00
Jack Nagel
0f4f7aa271 Simplify ARGV.filter_for_dependencies 2014-03-13 15:59:54 -05:00
Jack Nagel
ce5e2aa65c Make debug an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
4d02849d43 Make verbose an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
908d2ba792 Make interactive an installer mode 2014-03-13 15:59:53 -05:00