Jack Nagel
2cb8c443e4
ENV: use cflags setter
2013-08-30 18:42:12 -05:00
Jack Nagel
cc37943267
ENV: use cc accessor
2013-08-30 18:42:12 -05:00
Jack Nagel
aa79e21ba4
ENV: add cc and cxx setters
2013-08-30 18:42:12 -05:00
Jack Nagel
4bee5db66d
Simplify handling custom FCFLAGS
2013-08-30 16:42:04 -05:00
Jack Nagel
43bd5d44c2
Remove PATH hack from ENV.fortran
2013-08-30 16:30:34 -05:00
Misty De Meo
7e1af4b7d5
Unify compiler selection logic
...
This unifies the logic for selecting a compiler between superenv and
stdenv. A variation of superenv's `determine_cc`, which now returns a
symbol, has been moved into the shared ENV extension. Stdenv uses the
result of this directly (as it's always used symbols), while superenv
translates that back into a compiler string.
This also has the effect of disabling HOMEBREW_USE_(gcc|llvm|clang) in
stdenv, which have already been marked as deprecated for some time, and
enables the HOMEBREW_CC= environment variable syntax from superenv in
stdenv.
2013-08-30 07:52:13 -07:00
Misty De Meo
221bb2419f
Add --cc= syntax for selecting compilers
2013-08-30 07:52:12 -07:00
Jack Nagel
fb50be432a
Remove default values from ENV.{cc,cxx}
...
Closes Homebrew/homebrew#22138 .
2013-08-29 19:22:36 -05:00
Misty De Meo
c58d707158
Allow building bottles with custom architectures
...
This allows overriding the "oldest CPU" behaviour - for instance, to
build Intel bottles for a newer CPU than Core 2, to build a PPC bottle
with or without Altivec on the same computer, etc.
2013-08-28 20:21:06 -07:00
Jack Nagel
77056dc5cd
Simplify condition
2013-08-26 22:11:29 -05:00
Jack Nagel
9e8638ea35
Only perform coercion to string once in ENV.{append,prepend}
2013-08-26 15:03:37 -05:00
Misty De Meo
f0bf64e1e9
superenv: support PPC bottles
...
Allows for building bottles on PPC both with and without Altivec.
This is currently not active but will be enabled once superenv is
stable on Leopard.
2013-08-25 14:51:48 -07:00
Jack Nagel
84369dd949
Always pass -headerpad_max_install_names to the linker
...
We use install_name_tool pretty liberally, so we need to take steps to
ensure libraries and executables are always linked with this flag.
Closes Homebrew/homebrew#20233 .
Fixes Homebrew/homebrew#17984 .
Fixes Homebrew/homebrew#22078 .
2013-08-23 11:36:03 -05:00
Misty De Meo
3cf3fa7d8f
superenv: fix CC value for ENV.gcc
...
'gcc' could refer to anything of llvm-gcc, clang, or gcc-4.0 on
various Xcode versions.
2013-08-22 22:42:54 -07:00
Jack Nagel
4a3dac82ef
Use ENV.prepend_path
2013-08-19 17:21:13 -05:00
Jack Nagel
ea8f51256b
Use ENV.append_path
2013-08-19 17:21:13 -05:00
Jack Nagel
b672b44cf9
Add ENV.append_path
2013-08-19 17:21:13 -05:00
Jack Nagel
b8bac2ba53
Fix typo
2013-08-19 14:07:14 -05:00
Amos Wenger
52ace99f14
Use File::PATH_SEPARATOR globally instead of ':'
...
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.
The main places the magic constant ':' was being used were:
- the $PATH environment variable
- CMAKE-related environment variables
- pkg-config related environment variables
Closes Homebrew/homebrew#21921 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00
Jack Nagel
cec8d74239
Remove ENV.expand_xcrun
...
This method is currently unused and after inspecting the git history, it
appears it may never have been used at all.
2013-08-19 12:34:14 -05:00
Jack Nagel
e0574b854e
More robust implementation of ENV.with_build_environment
2013-08-19 12:32:59 -05:00
Jack Nagel
dd9c269c69
Rename HomebrewEnvExtension to Stdenv
2013-08-19 12:32:59 -05:00
Jack Nagel
9a5b15bb61
Move common ENV methods to a shared module
2013-08-19 12:32:59 -05:00
Jack Nagel
cc18f5e0c4
Move superenv.rb to extend/ENV/super.rb
2013-08-19 12:32:59 -05:00
Jack Nagel
ce31c16a14
Reference self, not ENV, in ENV.fortran
2013-08-19 12:32:58 -05:00
Jack Nagel
d09e23c8b1
Move extra stdenv setup to extended callback
2013-08-19 12:32:57 -05:00
Jack Nagel
eebc04ec9b
Move common stuff to extend/ENV.rb
2013-08-19 12:32:57 -05:00
Jack Nagel
e998132406
This is a backreference, not an embedded NUL
2013-08-16 20:50:20 -05:00
Misty De Meo
1333b8d666
ENV.universal_binary: use as_arch_flags
2013-08-15 23:04:26 -07:00
Misty De Meo
ef1f2b4a79
Add Hardware::CPU.arch_(32|64)_bit
...
This replaces hardcoding of i386/x86_64 all over the code.
2013-08-15 22:46:55 -07:00
Adam Vandenberg
7c1671667f
pathname: remove unused return values
...
Return value was used only by one test, rewrote test to know expected value.
2013-08-13 20:41:08 -07:00
Jack Nagel
22365f2f6d
Improve checksum perf by providing an output buffer
2013-08-13 15:40:48 -05:00
Jack Nagel
966e82663f
Make usage of ObserverPathnameExtension more obvious
...
Remove use of globals.
Closes Homebrew/homebrew#21795 .
2013-08-10 19:02:00 -05:00
Adam Vandenberg
20986e3ff5
ENV: add usage note to ncurses_define
2013-08-05 14:47:02 -07:00
Jack Nagel
1fb4cd501b
Pathname#write: don't check ARGV.force?
...
Closes Homebrew/homebrew#21390 .
2013-07-22 21:26:42 -05:00
Phil Smith
9942bcc21e
typo
...
Closes Homebrew/homebrew#21385 .
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-07-22 11:24:40 -07:00
Jack Nagel
8e0158b4d7
Add String#end_with?
...
I'm tired of not remembering if start_with?/end_with? are portable, so
just add them both if they're not defined.
2013-07-19 22:32:57 -05:00
Jack Nagel
b1e5f5ee81
Fix String#start_with? implementation
...
It is supposed to accept a variable number of prefixes, and also to
check if they are convertible to strings. This matches behavior
documented in RubySpec.
2013-07-19 22:31:07 -05:00
Adam Vandenberg
d8d6b254f7
add ARGV.value
2013-07-17 06:58:10 -07:00
Jack Nagel
528e750f7b
Handle NULs in link targets in Pathname#resolved_path_exists?
...
Fixes Homebrew/homebrew#19475 .
Fixes Homebrew/homebrew#21184 .
2013-07-13 16:56:43 -05:00
Jack Nagel
38c1d25036
Remove unreachable branch in ENV.fortran
...
Now that this is handled by a Requirement with a default formula, this
code cannot be triggered under normal circumstances.
The advice given has now been moved to the Formula Cookbook on the wiki.
2013-07-11 13:03:25 -05:00
Jack Nagel
b5d9025d22
Don't use install_p directly
2013-07-06 11:29:33 -05:00
Mike McQuaid
c3b7628726
ARGV: filter build-bottle from dependencies.
...
Fixes Homebrew/homebrew#20682 .
2013-06-26 19:25:39 +01:00
Adam Vandenberg
aafe2f20d0
Add Fortran ENV helpers
2013-06-24 07:38:25 -07:00
Mike McQuaid
fc708b9dfb
ARGV: ensure ? methods return truth values.
2013-06-22 11:13:59 +01:00
Jack Nagel
7cdf400762
Splatted parameter is always an array
2013-06-20 16:22:55 -05:00
Jack Nagel
5539c97191
Fix another constant reference
2013-06-14 11:49:00 -05:00
Jack Nagel
a463398a8b
Fix constant reference
2013-06-14 11:09:53 -05:00
Jack Nagel
eee5a09202
Favor compound if over compound unless
2013-06-14 10:34:20 -05:00
Jack Nagel
9427704176
Use ||= instead of unless
2013-06-14 10:34:20 -05:00