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
Jack Nagel
e73f869d84
Remove outdated comment
2013-06-14 10:34:20 -05:00
Jack Nagel
381255adec
Assign this inline
2013-06-14 10:34:19 -05:00
Jack Nagel
3252f9a2c9
Delete rather than assign nil
2013-06-14 10:34:19 -05:00
Jack Nagel
723f7ed111
Simplify nested conditional
2013-06-14 10:34:19 -05:00
Jack Nagel
4e4a5af731
Use has_key? rather than accessing the value
2013-06-14 10:34:18 -05:00
Jack Nagel
020a505970
Rename single-letter variable
2013-06-14 10:34:18 -05:00
Jack Nagel
a458555ccb
Make flag lists into constants
2013-06-14 10:34:18 -05:00
Jack Nagel
7d6371cd19
ENV: clean up set_cpu_flags and set_cpu_cflags usage
2013-06-14 10:34:18 -05:00
Jack Nagel
50db35e5d3
Use Hardware::CPU module
2013-06-14 10:34:17 -05:00
Adam Vandenberg
a60eed48bc
Remove adamv-alt references.
...
Closes Homebrew/homebrew#20364 .
2013-06-09 07:32:06 -07:00
Misty De Meo
c9c5e56363
Add :ld64 dependency
...
This allows formulae which won't build with Tiger's ld to conditionally
request a dependency on the ld64 formula. This modifies the build
environment appropriately, and will only be active on Tiger.
2013-06-08 19:10:38 -05:00
Adam Vandenberg
aff66c3b86
Sniff for non-tarred gzips
...
Don't try to untar non-tarred gzips.
2013-06-08 15:37:32 -07:00
Jack Nagel
80745a97e2
Add Enumerable#group_by
2013-06-08 12:23:14 -05:00
Jack Nagel
159b9d8e2d
Move oldest_cpu to Hardware
2013-06-06 16:02:27 -05:00
Samuel John
4dac954cdb
ENV.userpaths! Hotfix to prefer brewed stuff
...
The depends_on 'nose' => :python
tests fails even if people did `pip install nose`
with their brewed pythons because during
the tests the PATH is set up such that
/usr/bin comes before HOMEBRE_PREFIX/bin.
This is a hot fix. Proper fix need resorting
the PATH.
2013-06-04 22:33:24 +02:00
Jack Nagel
b97b013fce
Extract attr_rw from Formula for reuse
...
Closes Homebrew/homebrew#20239 .
2013-06-04 11:06:18 -05:00
Jack Nagel
41af459205
Require hardware where it is needed
2013-06-01 19:38:48 -05:00
Jack Nagel
c9ce32d0f1
Simplify implementation of ARGV.flag? and .switch?
2013-05-20 22:34:54 -05:00