1630 Commits

Author SHA1 Message Date
Mike McQuaid
995186a72c Fix Ruby warnings.
Fixes Homebrew/homebrew#11966.
2012-05-01 20:45:17 +08:00
Mike McQuaid
ebe4e07fa3 Change versioned bottle syntax and fix issues.
Fixed Homebrew/homebrew#11562.
2012-04-24 18:53:45 +10:00
Mike McQuaid
11f382705c Add and correctly find erlang bottle.
Fixes Homebrew/homebrew#11780.
2012-04-24 18:53:33 +10:00
Mike McQuaid
d69620a55e Revert "Add and correctly find erlang bottle."
This reverts commit 146e253856eb3e27b6b7382734fd178c160c1beb.
2012-04-24 18:10:09 +10:00
Mike McQuaid
4138d30428 Revert "Change versioned bottle syntax and fix issues."
This reverts commit f80908bead8b620ebcc5cdde9de65e70598002b6.
2012-04-24 18:10:08 +10:00
Mike McQuaid
dcad1ae49f Add and correctly find erlang bottle. 2012-04-24 18:08:14 +10:00
Mike McQuaid
40370e05bd Change versioned bottle syntax and fix issues.
Fixed Homebrew/homebrew#11562.
2012-04-24 18:08:14 +10:00
Jack Nagel
9d172f85c6 ARGV: use include? for --HEAD
ARGV.build_head? will return true if the typo '-HEAD' is passed because
it uses flag? to detect the option. However, we only filter the exact
spelling of '--HEAD' in ARGV.filter_for_dependencies, and thus the HEAD
property is undesirably passed to deps during installation.

Since we never advertised '-H' as a valid short option for '--HEAD',
just use include? instead of flag?.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-10 21:53:01 -05:00
Misty De Meo
90400eceb1 make_relative_symlink: give more specific advice 2012-04-09 10:09:19 -05:00
Adam Vandenberg
bfbfdf03eb Show target path when empty 2012-03-30 23:02:43 -07:00
Adam Vandenberg
a0cb4e7c11 install: warn when passed no files
Rationale: we warn when inreplace makes no changes; this is a similar
sort of warning. We expected some list (probably via Dir) to include
some files, but none were found.

Either the list was wrong, or the install can now be omitted.
2012-03-30 22:36:45 -07:00
Max Howell
abfce0f6b2 Don't double print ln message in verbose mode
Refs Homebrew/homebrew#11091.
2012-03-22 09:33:41 +00:00
Jack Nagel
5dc15272d9 ENV: reset LD when switching compilers
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-21 12:22:22 -05:00
Jack Nagel
01c14f8775 ENV: normalize usage of "self" and "ENV"
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-21 12:22:22 -05:00
Max Howell
d145fd30b4 Be more helpful about how to resolve this issue 2012-03-19 14:19:56 +00:00
Max Howell
9ab1df5b68 If no formula but multiple kegs, advise resolution
In this case the user will simply have to delete all but one keg in order to use the command that uses ARGV.kegs.

Refs Homebrew/homebrew#11050.
2012-03-19 14:17:50 +00:00
Max Howell
c3370c48ce Better error when linking fails
Refs http://stackoverflow.com/questions/9762943

The system ln no longer outputs anything. Though the user can force its output with a --verbose of course. So in cases where it's not the usual of: not writable or existing file, we can ask the user to run with --verbose. I don't particularly like hiding its output, but it just confused the error IMO since it is creating a relative symlink the output was weird every time I've seen it in tickets.

I made a print wrapper so that the brew-link output doesn't get mucked up if an exception is thrown.
2012-03-19 00:28:38 +00:00
Jack Nagel
fe58c056d3 Explicitly set OBJC in the environment
Fixes Homebrew/homebrew#10951.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-16 16:36:17 -05:00
Max Howell
ee73c30aa5 Tap more than one formula from taps other than alt
Whoops.
2012-03-16 21:31:59 +00:00
Max Howell
4c02b2276b Taps can only have one directory of formula
Rationale: Let's not have duplicate-names. Insisting on only one directory lets the filesystem enforce this unique-naming criteria for us.

We special-case adamv/alt for now, until we remove it.
2012-03-16 21:06:17 +00:00
Max Howell
e6cb8cbee9 Pathname.atomic_write 2012-03-16 21:06:17 +00:00
Max Howell
765ae96180 Leave kegs keg-only if linking step fails
Rationale: well, it should always have been like this!

However now we are opening ourselves up to more-mixed installations of formula not maintained by us, it's important that
2012-03-16 21:06:16 +00:00
Max Howell
0c7e7ae437 brew tap and brew untap 2012-03-16 21:06:15 +00:00
Adam Vandenberg
5aa6aefa96 Allow multiple digits in GitHub version parts 2012-03-11 14:37:44 -07:00
Mike McQuaid
b86ead91ea Revert "Always build bottles universally."
This reverts commit 72a477f2734939d4c5805247588c4cdea69b5383.
2012-03-10 19:28:46 +13:00
Mike McQuaid
6d940a5bcc Always build bottles universally. 2012-03-10 18:11:12 +13:00
Mike McQuaid
552dcdc703 Move most bottle stuff to a bottles.rb file. 2012-03-10 18:10:40 +13:00
Mike McQuaid
4a306f32f4 Support bottles for non-Lion OSX versions. 2012-03-10 18:09:35 +13:00
Charlie Sharpsteen
275d22db9e ENV.rb: Set GCC-style CPU flags for GFortran
GFortran chokes when it is passed CPU flags specific to Clang. This change
ensures the environment variables `FCFLAGS` and `FFLAGS` contain the same CPU
flags that would be set for the GCC compiler.

Fixes Homebrew/homebrew#10424.
Fixes Homebrew/homebrew#10744.

Closes Homebrew/homebrew#10774.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-09 12:14:08 -08:00
Charlie Sharpsteen
55d4f48746 ENV.rb: Generalize method for setting CPU flags
All logic has been copied into a new method `set_cpu_flags` that accepts an
additional argument, `flags`, which contains a list of environment variables
for which the CPU flags are to be adjusted.

`set_cpu_cflags` now recalls `set_cpu_flags` and passes `cflags_flags` as the
first argument.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-09 12:14:05 -08:00
Charlie Sharpsteen
1805e87529 ENV.rb: Modifier methods accept lists of flags
`ENV` methods that modify environment variables, `prepend`, `append` and
`remove`, can now accept lists of flags as well as a single flag.

The list of flags affected by `append_to_cflags` and `remove_from_cflags` are
now definied in a shortcut method `cc_flag_vars`.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-09 12:14:04 -08:00
Max Howell
735b6337a1 If multiple kegs, default to formula keg
If it exists, ARGV.kegs will return the Formula.prefix keg for each rack examined.

So for ARGV=[wget, foo] and the following Cellar (wget/1.11, wget/1.12, foo/1.0) you'll get [wget/1.12, foo/1.0] from ARGV.kegs provided 1.12 is the formula version of wget.
2012-03-07 12:33:47 +00:00
Jack Nagel
67c3f1b2b4 Extend FileUtils rather than include it
Fixes Homebrew/homebrew#10729.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-06 19:23:51 -06:00
Max Howell
1b4b8a722e Pathname.stem knows about bottles 2012-03-06 20:28:06 +00:00
Max Howell
b63ec18564 Proper single character switch handling
Includes a test. So now you can do `brew cleanup -ns` and it will work.
2012-03-06 20:28:06 +00:00
Max Howell
6868bf0d6e Don't require formula files for brew rm --force
In fixing this I also made it so that ARGV.kegs will return the LinkedKeg if the symlink is set. Which is almost always is. This neatly avoids most multiple-kegs issues.

Fixes Homebrew/homebrew#10685.
2012-03-06 13:47:31 +00:00
Adam Vandenberg
1b372d7840 Move path utils out of formula.rb
Make a new module for our FileUtils extensions and use that instead.
2012-03-05 21:14:39 -08:00
Max Howell
f3d177a99b Set ACLOCAL_PATH so that things work
This should mean all those formula that pass options to aclocal don't need to anymore, but I'm not risking changing them.
2012-02-27 04:06:39 +00:00
Jack Nagel
5d58792c5e Fix IO redirection in ENV.xcrun
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-26 15:01:01 -06:00
Adam Vandenberg
42d44053ef inreplace: also warn on plain gsub! usage 2012-02-25 22:41:20 -06:00
Jack Nagel
a3edec8b88 inreplace: warn if no substitutions were made
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-25 22:37:29 -06:00
Charlie Sharpsteen
c0299ad19b ENV.rb: Set flags for Objective-C
We set defaults for C and C++, might as well do the same for Objective-C and
Objective-C++.

Closes Homebrew/homebrew#10354.
2012-02-21 21:34:48 -08:00
Max Howell
bb6816dc4a Convert to Pathname if not Pathname as we need it to be 2012-02-21 12:45:45 +00:00
Max Howell
61a8bd9ca0 Don't hang if xcode-select -print-path is "/"
Introducing MacOS.xctools_fucked?.

Refs Homebrew/homebrew#10293.
2012-02-21 10:33:03 +00:00
Jack Nagel
a7ade739dc Remove -Qunused-arguments in ENV.enable_warnings
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:41:47 -06:00
Jack Nagel
f295661ca6 Remove unused :force switches
The :force behavior for ENV.gcc has been the default for some time, and
was used to force vanilla gcc in case the gcc symlink pointed at
llvm-gcc; for ENV.clang, this doesn't mattera as clang is just clang.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:22:27 -06:00
Jack Nagel
f8e3e806f9 Silence unused argument warnings from clang
The clang frontend ignores a number of options that are accepted by gcc
and llvm-gcc. However, it produces a warning for each unused argument at
each invocation, which can result in many lines of noise, e.g.

   clang: warning: argument unused during compilation: '-rdynamic'

Since these arguments do not affect compilation, let's just silence the
warnings by passing '-Qunused-arguments' to clang by default.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:22:17 -06:00
Jack Nagel
78d4fda6d6 ENV: clean up set_cpu_cflags a bit
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:20:29 -06:00
Camillo Lugaresi
5ef84730d0 add ENV.O1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-19 11:45:15 -08:00
Adam Vandenberg
847a2732ee Update return values of install and install_symlink
These now return an Array of all the target destinations.
Previously, if a single argument was passed a single non-
Array was returned.

This behavior has been changed so that an Array is always returned
even for a single argument.

Updated the test.

Hopefully this won't break any custom code out there.
2012-02-17 23:07:16 -08:00