Jack Nagel
930cf4c768
Add accessor for HOMEBREW_CC
2014-05-18 14:34:31 -05:00
Jack Nagel
ff9bbe941b
ENV.cc= and ENV.cxx= are private
2014-05-18 14:34:31 -05:00
Jack Nagel
9e8d419070
Use a case statement
2014-05-18 14:23:45 -05:00
Jack Nagel
858da0063d
Allow disabling arch flag filtering
...
Closes Homebrew/homebrew#17352 .
2014-05-14 00:00:59 -05:00
Jack Nagel
230161c1de
Use a case statement
2014-05-13 16:23:12 -05:00
Jack Nagel
cb873d0833
Check value of compiler rather than HOMEBREW_CC
2014-05-13 16:22:57 -05:00
Jack Nagel
2716ed6d26
Make cc=/cxx= set HOMEBREW_CC in superenv
2014-05-13 16:20:30 -05:00
Jack Nagel
c03483b6a8
Remove legacy ENV accessor hack
2014-05-13 12:50:30 -05:00
Jack Nagel
278d9dfdb4
self, not ENV
2014-05-13 12:48:27 -05:00
Jack Nagel
deb65a959d
Use a case statement
2014-05-13 12:14:51 -05:00
Jack Nagel
002cb64774
Make sure the path arrays only contain strings
2014-05-13 12:14:51 -05:00
Jack Nagel
9fc5a543d5
No need to augment path on Xcode-only 10.9
2014-05-13 11:28:44 -05:00
Jack Nagel
43d9640cb6
Move method to prepare for future changes
2014-05-13 11:28:44 -05:00
Jack Nagel
ff25f7ecf7
Future-proof this conditional
2014-05-13 11:26:21 -05:00
Jack Nagel
ff9191eca2
clean up X11 conditionals
2014-05-12 11:45:50 -05:00
Jack Nagel
5f94742afb
Ensure HOMEBREW_ARCHFLAGS is always a string
2014-05-10 16:54:30 -05:00
Jack Nagel
089af6627a
Always use stub tools in /usr/bin on 10.9
2014-05-08 17:24:48 -05:00
Mike McQuaid
8c426e8207
ENV/shared: fix gcc versions edge case.
2014-05-06 22:17:59 +01:00
Mike McQuaid
2fb6d2fdbe
ENV/std: use full paths to gcc versions.
...
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-06 16:45:50 +01:00
Mike McQuaid
c92a16e2ce
shared: refactor gcc_version_formula.
...
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-06 16:45:50 +01:00
Mike McQuaid
1b0647d747
shared: don't use Formula.factory unnecessarily.
...
Instead check if the path exists by using opt.
2014-05-06 16:45:50 +01:00
Jack Nagel
68da1e7765
Add a method_defined? guard for Pathname#/
...
This was added to the stdlib in 391fc2eeec
.
2014-05-05 15:30:28 -05:00
Alexey Muranov
911206eae6
Use #+ instead of #join to define Pathname#/
...
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-05 15:27:34 -05:00
Jack Nagel
61dd796f25
Suppress a warning on Ruby 2.1+
2014-05-03 15:03:22 -05:00
Baptiste Fontaine
74e4fdfce2
Fix for String#undent
...
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-02 19:50:27 -07:00
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