Commit Graph
93 Commits
Author SHA1 Message Date
Max Howell 73c7a3aa1b Optimise/simplify brew help
Be more useful by being more concise. I referenced dozens of other mature commands’ usage to figure out what to do here.

Also separated out the help into its own command for consistency.
2011-03-13 12:54:30 +00:00
Charlie Sharpsteen 287d8fba98 Add Fortran configuration to ENV.rb
This provides a uniform way for formulae to indicate a Fortran compiler
is required.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-12 13:29:58 -08:00
Adam Vandenberg 05d175d51f Use + instead of /. 2011-03-12 11:55:07 -08:00
Stephen Allred c19b32dfc4 Added --use-gcc flag.
This allows you to use llvm as your default compiler and keep the cc symlink
pointed at llvm, while allowing you to build forumla that requires the gcc.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-12 11:55:06 -08:00
Max Howell 167721c4ab MacOS.xcode_prefix
More robust code than before, and replaces all usage of `xcode-select -print-path`.
2011-03-12 11:55:04 -08:00
Max Howell 9f451154ea brew deps foo bar now gives the dependency intersection
Rationale: this is more useful than the union, and you can still easily get the union by running the command twice and concatenating the result.
2011-03-12 11:55:04 -08:00
Max Howell d3b41f29e1 Pathname.ensure_writable
Yields after chmoding (if necessary), once block is complete restores permissions.
2011-03-12 11:55:04 -08:00
Max Howell a28e4d89c5 Formula.resolve_alias to compatability.rb 2011-03-12 11:55:03 -08:00
Max Howell 5cd927b8b5 Some Cleanup 2011-03-12 11:55:03 -08:00
Adam Vandenberg 65f840fb06 Move string extensions 2011-03-12 11:55:03 -08:00
Adam Vandenberg 3eb2241464 Move some exceptions 2011-03-12 11:55:03 -08:00
Max Howell 9afc85ad33 Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00
Adam Vandenberg e8653066e2 Add ENV.cppflags shortcut 2011-01-22 10:07:08 -08:00
Lee Packham 657c8f9483 Correct the principle usage of principal principles ;)
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2010-11-21 13:20:12 +00:00
Adam Vandenberg d6f02b5a2c Allow underscore in github version numbers. 2010-11-07 11:25:20 -08:00
Michael Dippery 172eddd15e More .DS_Store ignoring
* Don't link .DS_Store files
* Don't list .DS_Store files in `brew info`

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-11-05 19:44:56 -07:00
Jamie Macey 030888b42f fix warnings: ambiguous first arg
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-30 14:47:44 -07:00
Adam Vandenberg 03fa983b5d Allow installation from URLs
This allows installation like:
    brew install http://example.com/something.rb

Based on an original patch by [dwalters].

Fixes #160
2010-10-30 14:23:01 -07:00
arlolra 314c54ff3e Handle dashed tags at github.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-28 21:19:42 -07:00
Michael Morgan 447fb2f640 extract undent test to test case
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-17 21:13:16 -07:00
Adam Vandenberg f67b79c3e1 Use classes instead of strings for exceptions 2010-10-17 17:21:21 -07:00
Adam Vandenberg b3d07ab721 Coerce ENV.append/prepend values to strings.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-05 13:41:38 -07:00
Adam Vandenberg dbd6de0d5d Move resolve_alias from ARGV to Formula
Also, call this function from a few places where the code was duplicated.
2010-09-29 21:55:44 -07:00
Max Howell f493853179 Pathname./ because it looks a lot better than + 2010-09-12 21:57:17 +01:00
Adam Vandenberg 1db9d0befb Document brew options 2010-09-08 05:27:09 -07:00
Adam Vandenberg 43e0f817f2 ENV.rb - style tweak 2010-09-07 10:09:22 -07:00
Adam Vandenberg d875855975 Add ENV.ldflags and use. 2010-09-06 11:48:21 -07:00
David Höppner 8538147cd2 Update help options 2010-09-04 12:48:37 +02:00
lukas bdd131a6a5 Fixed recognition of versions like 'foobar-4.50-beta' in Pathname#version
Sphinx currently has a download name 'http://sphinxsearch.com/downloads/sphinx-1.10-beta.tar.gz', which homebrew currently can't correctly identify - with a small change to the regex for 'foobar-4.5.0-beta1' (make that trailing number optional) - it works like a charm.

Signed-off-by: David Höppner <0xffea@gmail.com>
2010-08-27 17:53:06 +02:00
Adam Vandenberg 760c1182c9 Move method back to Pathname. 2010-08-15 17:17:26 -07:00
Adam Vandenberg 11edd05630 Tweak ARGV.usage 2010-08-11 21:15:59 -07:00
Adam Vandenberg f6f1af5790 ENV.rb - add ENV.cflags 2010-08-10 08:30:11 -07:00
Adam Vandenberg be381089e0 ENV.rb - style cleanups 2010-08-10 07:58:08 -07:00
Adam Vandenberg ac900b8d21 Remove redundent line and reword comments slightly. 2010-08-09 21:03:29 -07:00
Brent Fitzgerald 3d89258d5d Changing the magic &:downcase back to regular block.
Fixes #2089

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

(This is needed for 10.5 support.)
2010-08-08 18:26:13 -07:00
Adam Vandenberg e719d94b48 Move Pathname.starts_with? into Pathname 2010-08-08 09:13:27 -07:00
Adam Vandenberg 9313c3ce0d Resolve aliases in 'brew edit'. 2010-08-07 22:15:29 -07:00
Adam Vandenberg cdf768bc32 Put /usr/X11/bin in PATH when requesting X11. 2010-08-07 18:08:52 -07:00
Adam Vandenberg 0bf7b75255 ARGV - rename method that conflicts with optparse
optparse adds an "options" method to ARGV, and so does Homebrew.
Rename this method (and remove optparse blocking script) so that
Homebrew plays nicer with external Ruby software.

This fixes the issue where "gem install thin" would break
"brew server", for instance.
2010-08-07 18:08:51 -07:00
Max Howell 12e1baf8c3 Resolve aliases in ARGV extension.
* This allows most brew commands to automatically accept aliases.
2010-08-07 18:08:49 -07:00
Adam Vandenberg 64e026a550 Add Pathname.resolved_path 2010-07-25 12:07:35 -07:00
Adam Vandenberg 511d309374 Add ARGV.build_head? and use it.
This allows both "--HEAD" and "-H" to be used consistently, which was the
intention in the first place.
2010-07-16 09:09:39 -07:00
Adam Vandenberg a286ae958d Usage should mention manpage. 2010-07-09 12:16:06 -07:00
Adam Vandenberg 2dadd63190 Move method from ObserverPathnameExtension to extend/Pathname
* This method is generally useful, even without the Observer extensions.
2010-07-08 22:41:50 -07:00
Adam Vandenberg eab7053dda Add debian style names to version checker. 2010-07-06 13:17:50 -07:00
Adam Vandenberg 7220273b91 Pathname - fix RC version detection. 2010-07-04 14:10:04 -07:00
Adam Vandenberg 562fc5caac Update Pathname version checks.
* allow capital 'RC'
* allow 'stable' suffix
2010-07-04 11:02:54 -07:00
Brett Cannon 6d89ebb66b Fix LLVM compilation under OS X 10.6 where cflags was not being defined.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>

* Unshare code between ENV.llvm and ENV.setup_build_environment
2010-06-18 16:32:19 -07:00
Chris Hoffman 74c092fc35 Refactor llvm compiler selection so formula can use it
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-06-17 09:39:55 -07:00
Chris Hoffman fb490ae87d Fix exception when installing with --use-llvm
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-06-17 09:39:41 -07:00