586 Commits

Author SHA1 Message Date
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
Jack Nagel
aa5c023b76 Add ARGV.env 2014-03-13 15:59:53 -05:00
Jack Nagel
9bc8d0820e Reduce the number of things that trigger ARGV.build_from_source?
The newly generalized bottle implementation removes the need to
defensively check for --devel, --HEAD, and others in this method.
2014-03-10 14:56:02 -05:00
Jack Nagel
42e60f7c59 Make build_bottle an explicit installer mode 2014-03-10 14:56:01 -05:00
Jack Nagel
ce93c75f11 Remove "--fresh" option from installer
Turns out that this doesn't really work at all. `brew install` _never_
reuses options in the first place, and using this option with `brew
upgrade` results in some nasty corner cases in passing options to
dependencies.
2014-03-08 19:08:47 -06:00
Misty De Meo
53a2558473 Symbol#to_proc: fix with arrays of arrays
Previously, with nested arrays, the Symbol#to_proc would iterate over
the first item in the nested array instead of the array itself, e.g.:

[[1,2], [3,4]].map(&:first) #=>
	NoMethodError: undefined method `first' for 1:Fixnum
2014-03-08 10:37:58 -08:00
Mike McQuaid
f155b0570e Revert "ENV: request no byte code Python when bottling."
This reverts commit b603c96276cf7fe1417d2355eebc47fb15da0b8c.
2014-03-08 00:04:30 +00:00
Mike McQuaid
536430e0ae ENV: request no byte code Python when bottling. 2014-03-02 02:08:59 +00:00
Adam Vandenberg
88565ac3d4 move scons helper to fileutils 2014-02-28 07:20:52 -08:00
Jack Nagel
c72f9a469d Add an xcodebuild helper and deprecate system "xcodebuild"
In the future we can remove the ENV munging branch from Formula#system.

Closes Homebrew/homebrew#27081.
2014-02-27 21:53:21 -06:00
cadrpear
f43bb0c292 Fix building universal binaries on 32-bit CPUs
[jn: style, update comment]

Closes Homebrew/homebrew#25728.
Fixes Homebrew/homebrew#26834.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-02-19 14:15:03 -05:00
Jack Nagel
a1d2aa0f69 Stop exporting HOMEBREW_VERBOSE to build environment
This flag no longer affects the output of the compiler wrappers, since
everything is buffered by the build process rather than each individual
tool.

Additionally, this is a user-facing knob that affects ARGV.verbose?, and
the combination of these two issues broke the --quieter feature.
2014-02-18 21:46:26 -05:00
Jack Nagel
ca0eff67fa Inline static exception text to remove a rescue 2014-02-18 13:27:35 -05:00
Misty De Meo
e225aea902 ARGV.help?: anchor to end of string
Fixes Homebrew/homebrew#26735.
2014-02-14 16:23:38 -08:00
Mike McQuaid
eabe9dc6d0 brew: check for --help and friends in more of ARGV
Let's check for e.g. --help anywhere in the ARGV array rather than just
the first value to avoid brew upgrade --help causing problems.

Closes Homebrew/homebrew#26675.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-02-14 18:32:56 +00:00
Jack Nagel
8d5f0d8bb3 Delete unused method 2014-02-12 14:28:26 -05:00
Adam Vandenberg
ae69fa25cc Revert "Recognize --head as an alias for --HEAD"
This reverts commit c32ab0a35a2dfa9b593f759ef0ae8b7af077b0b7.

There are other hard-coded uses of HEAD, in build_options for instance.
These all need to be fixed before enabling this.
2014-02-11 21:25:26 -08:00
Misty De Meo
b1c0380b7b Recognize --head as an alias for --HEAD
Homebrew currently recognizes "--head" during the install process, but
rather than actually fetch HEAD it just nags the user to use the
correct option.	Since we recognize the spelling anyway, this just
promotes the lowercase version to an official alias.

Closes Homebrew/homebrew#26555.
2014-02-09 15:44:49 -08:00
Camillo Lugaresi
cbd14fde1e Correctly find Homebrew-installed fortran
Fixes Homebrew/homebrew#26338.
Closes Homebrew/homebrew#26352.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-02-02 14:13:53 -05:00
Misty De Meo
b7781c4571 Revert "Add python superenv wrapper"
This reverts commit 90e22e389c539b25fe7864645bfe5e2a9ce7452f.
2014-01-27 20:46:04 -08:00
Misty De Meo
ee76cf75af Add python superenv wrapper
Closes Homebrew/homebrew#26140.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2014-01-26 10:55:49 -08:00
Jack Nagel
8f89db4882 Fix typo 2014-01-11 21:28:25 -06:00
Mike McQuaid
cdbc7c9e53 Pathname: add methods to write env scripts. 2014-01-04 13:19:20 +00:00
Mike McQuaid
996c7bd7d1 ENV: add method to prepend and create a PATH. 2014-01-04 13:19:20 +00:00
Misty De Meo
51d8270abd ENV.gcc: remove raise
This raise happened in no other ENV methods, and isn't really necessary
since fails_with guards against this method actually being called unless
gcc-4.2 is actually installed.
2014-01-04 01:22:04 -08:00
Misty De Meo
d7a6161751 Recommit ENV changes 2014-01-04 01:20:56 -08:00
Mike McQuaid
3cf2cc853d Revert "stdenv: fix self.cc check"
This reverts commit 0e1d52c0d3945ae0ac69383c7734e425b7fbf8f1.
2014-01-04 09:14:28 +00:00
Mike McQuaid
1dcf726a59 Revert "stdenv: set correct compiler symbol for gcc 4.0"
This reverts commit f4dc5614953b3b90acc28c83262d56587b0616b1.
2014-01-04 09:14:25 +00:00
Misty De Meo
bdd2e71b3a stdenv: set correct compiler symbol for gcc 4.0 2014-01-03 19:13:35 -08:00