6622 Commits

Author SHA1 Message Date
Andre Arko
c2f1a41bbc Add support for external ruby deps, and fix external deps system.
Kernel#system special-cases the first argument, so you have to
make the first argument the entire command to be invoked, and
subsequent arguments the actual arguments to that command. In
order to use the user's interpreter, the first argument must be
"/usr/bin/env <name>".

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-02-25 09:17:00 -08:00
Adam Vandenberg
080a7ee3dc brew --cache [formula]
This developer-oriented command lets you ask Homebrew what the cached
filename will be for a brew's tarball.
2010-02-24 11:15:12 -08:00
Max Howell
1149b082bb We need to set CC and CXX for many formula
Fixes Homebrew/homebrew#807; Fixes Homebrew/homebrew#808
2010-02-24 15:13:20 +00:00
Martin Kuehl
37189cbe34 Fix brew cleanup: don't bail out early
Running `brew cleanup` (with no arguments or multiple arguments) raises
an error and stops as soon as it finds any formula whose most recent
version is not installed.

With this change it will instead print a warning, then continue with the
next formula.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-02-20 22:59:24 -08:00
Max Howell
15e145709b Fix inreplace barfing over Pathnames
This fix should be fairly tolerant of types.
2010-02-20 02:07:51 +00:00
Max Howell
786775152e No longer compile with LLVM by default
Justification:
* LLVM is too immature, it often fails to compile, sometimes irreproducibly
* The performance of the resulting bytecode is often slower than the GCC
  equivalent (eg MySQL)

If you want to continue using LLVM you can. Set HOMEBREW_USE_LLVM or brew with
--use-llvm.

We also now use the default compiler for each platform. So GCC 4.2 on Snow and
GCC 4.0 on Leopard. This also means that new formula are more likely to just
work as many over complicated build systems get upset when you mix things up.

I also did a bunch more new research regarding compiler flags. We now set the
right -march for nehalem procs and don't add redundant flags like msse3 (which
is automatically applied for all the -march settings we use).

Reducing the number of cflags will improve the overall reliability of our
platform.
2010-02-19 17:50:23 +00:00
Max Howell
b48d46d4bc Allow inreplace to operate over arrays
I like that String.each is interchangeable with Array.each :)
2010-02-19 17:34:40 +00:00
Adam Vandenberg
0d73cbbc53 Add brew --cellar command.
The Cellar may not actually be "`brew --prefix`/Cellar".
We support the Cellar existing only in the repo but
not linked into the prefix, for installs that aren't
directly in /usr/local (or other chosen prefix.)
2010-02-18 13:29:28 -08:00
Max Howell
8cdb504b14 Fix Pathname.install for relative symlinks
If you have a bunch of symlinks and they all point at one file and you use Pathname.install on them all the error checking would fail if the file was moved before the symlinks because the symlinks would then point at a non existent file.
2010-02-18 17:16:02 +00:00
Max Howell
e0999078dc Fix GitHub tarball version detection 2010-02-18 11:59:29 +00:00
Graham Hughes
a4bd7c008d Don't merge flags in checkout-index
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-02-16 15:25:28 -08:00
Martin Kuehl
e3a9e961bf Fix brew cleanup: less pruning
Running `brew cleanup` (with no arguments or multiple arguments) will
run `brew prune` after _every_ cleaned formula, i.e. possibly after
every installed formula.

With this change it will instead only run `prune` after all formulae are
cleaned, and only when no arguments were given to `cleanup`.

Signed-off-by: Max Howell <max@methylblue.com>

Closes Homebrew/homebrew#743
2010-02-16 22:52:18 +00:00
Aleksandar Topuzović
2e3585872b Set correct LDFLAGS for universal binaries
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-02-13 17:21:42 -08:00
Max Howell
9a1af42a5e Fixes Homebrew/homebrew#571; brew update doesn't report "Already up-to-date" 2010-02-13 13:12:40 +00:00
Andre Arko
1a2c5160c5 Don't abort cleanup if formulae are missing 2010-02-11 17:05:38 -08:00
Adam Vandenberg
6671d6275d remove_make_var! should not leave an empty assignment 2010-02-09 09:21:25 -08:00
Adam Vandenberg
07adef4954 ENV.cxx was not retrieving proper ENV flag. 2010-02-08 14:23:01 -08:00
Adam Vandenberg
1a0f971a1c Merge branch 'F-zsync' of git://arthur.barton.de/homebrew-alex 2010-02-07 11:22:47 -08:00
Adam Vandenberg
3c47f7918b Add formula check for crufy SourceForge URLs. 2010-02-04 17:29:47 -08:00
Adam Vandenberg
a309403d8a Update test suite.
* Break single test case class into several test cases.
* Fix broken arch test.
* Make update tests optional (seem to only work for mxcl).
* Add more tests.
* Move fixtures to separate folder.
2010-02-02 09:08:10 -08:00
Adam Vandenberg
5474cf1a95 Let change_make_var! append to existing value.
To existing flag value can be specified with "\\1".
To append values to a flag, call with:
    s.change_make_var! "THE_FLAG", "\\1 more-flag-values"

The same trick can be used to prepend or surround values as well.
2010-02-02 08:57:56 -08:00
David Höppner
d8b093f279 Bazaar download strategy 2010-02-02 13:43:44 +01:00
Adam Vandenberg
6d06b9a179 Create Download Strategy sooner in formula install code.
* Instantiate DownloadStrategy instance when creating a formula.
* Rename CurlDownloadStrategy member to clarify what it is for.
* Generate downloaded tarball name in initialize.
2010-02-01 12:50:16 -08:00
Adam Vandenberg
43dc7c9645 deps was missing from bash completion 2010-01-30 23:50:09 -08:00
Adam Vandenberg
fb8707df4e Remove spaces around make-style variables.
Removing the spaces around equals for make-style variables makes
the change_make_var! method compatible with shell scripts as well
as makefiles.
2010-01-30 22:48:44 -08:00
Adam Vandenberg
f9a0f3e80f Add gzip utility function. 2010-01-30 10:39:56 -08:00
Ben Bleything
e4b60cd3cd remove the nonexistant list --brewed flag from the help output.
Resolves mxcl/homebrew#158.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-01-29 23:48:46 -08:00
Max Howell
9851a75660 If keg only don't warn about s?bin not being in PATH
Fixes Homebrew/homebrew#488.
2010-01-18 09:12:48 +00:00
Max Howell
95fc24ecd1 Only try to cleanup directories 2010-01-18 08:36:29 +00:00
Max Howell
3bf6c5f9c9 Document brew cleanup 2010-01-18 08:36:10 +00:00
Max Howell
7762b23c53 prune after brew cleanup
Stale symlinks may exist, so we may as well fix them up at this juncture.
2010-01-18 08:34:11 +00:00
Max Howell
f88fbf1882 Don't cleanup if we can't tell which formula is for keeps
If the formula was updated and not yet installed, then cleanup would delete all kegs. Which is most likely not what the user wanted.

Ideally we'd do a version check to figure out which keg is newest. But we don't yet have a function that can determine with accuracy version order.
2010-01-18 08:34:11 +00:00
Max Howell
16132cab6b Use Ruby rather than external commands
`ls` could go wrong more than Pathname.children
2010-01-18 08:34:07 +00:00
Joshua Peek
248bc890f8 Unit test for brew cleanup 2010-01-18 08:27:55 +00:00
Joshua Peek
0d84f3ee17 Add cleanup command
* `brew cleanup foo` removes any unlinked foo kegs
* `brew cleanup` removes all unlinked kegs
2010-01-18 08:27:50 +00:00
Max Howell
4bfb7cf24d Don't require beer_events
RubyCocoa is a large dependency, and any large system can cause unexpected errors. In this case the user's system was badly setup and RubyCocoa caused a dynamic loader issue.

We don't use beer_events currently due to other bugs that occurred sporadically with its use. So requiring it is unnecessary. So lets save ourselves trouble.

Fixes Homebrew/homebrew#487
2010-01-17 20:56:24 +00:00
Max Howell
8a1b17e04b Stop raising during the raise ctor 2010-01-16 20:25:50 +00:00
Max Howell
614d243269 There's not enough payback for stripping libraries
It causes lots of bugs, for the sake of what is often just a few kilobytes.
2010-01-16 19:06:26 +00:00
Max Howell
b994905f18 Blacklist wxwidgets for creation 2010-01-16 15:40:14 +00:00
Adam Vandenberg
9dc39c391a Some bulletproofing for bash completion script.
Since Homebrew's Library doesn't have to be linked under prefix,
we need to do some extra work in the bash completion script to
support this configuration.

Added a "--repository" option to brew, and updated the completion
script to use paths relative to this location.
2010-01-16 15:33:32 +00:00
Adam Vandenberg
be842ee554 Fixes Homebrew/homebrew#168 - don't show multiple copies of the same dep. 2010-01-16 15:33:31 +00:00
Adam Vandenberg
0bc1127f54 Add recommended GCC & LLVM versions to --config. 2010-01-16 15:26:54 +00:00
Max Howell
d1355af66e Check for bad values of console_width
Fixes Homebrew/homebrew#453.
2010-01-16 13:12:38 +00:00
Florian Sowade
056851463e Added CMAKE_PREFIX_PATH to environment valriables
CMake ignores the CPPFLAGS and LDFLAGS environment variables. This makes sure CMake finds libraries when homebrew is not installed at /usr/local.

Signed-off-by: Max Howell <max@methylblue.com>

Fixes Homebrew/homebrew#242
2010-01-14 09:41:06 +00:00
Florian Sowade
fa2162ef62 Added CMake parameter to suppress warnings
The -Wno-dev CMake parameter suppresses warnings
meant for the developer, not the user.
2010-01-14 09:40:20 +00:00
Ash Berlin
5193d835a4 Improve error when no url given 2010-01-13 13:33:43 +00:00
Max Howell
df3cca94e1 Support Perl/CPAN external dependencies
WhoHas requires LWP::UserAgent.
2010-01-13 11:56:23 +00:00
Max Howell
9f871c9955 Adds: depends_on 'simplejson' => :python
So far we only added python, but we can add more.

Fixes Homebrew/homebrew#401
2010-01-13 11:23:15 +00:00
Max Howell
df79d74e13 Add quiet_system
Same as Kernel.system, but prints no output.
2010-01-13 11:23:15 +00:00
Max Howell
0a27f041d0 Print quotes around executed arguments with spaces
Eg: ['foo', 'bar la'] -> "foo 'bar la'"
2010-01-13 11:23:15 +00:00