447 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Max Howell
2037b2373a Use less lengthy path to llvm binaries 2010-01-13 11:23:15 +00:00
Max Howell
700b20d665 Ensure we delete temp files
It's easy to code complete with Ruby, so lets. I love Ruby.
2010-01-13 11:23:15 +00:00
Max Howell
1ead7d380a Escape any spaces in path during strip step
Not using path.basename for mktemp due to risk of bugs due to incorrect escaping. But mainly, mktemp gives a unique name and this operation is procedural.
2010-01-13 11:23:15 +00:00
Max Howell
d8c3b3a80a Use full paths to strip, mktemp, cat and ls 2010-01-13 11:23:15 +00:00
Adam Vandenberg
e97c16f498 Fixes Homebrew/homebrew#433 2010-01-13 11:23:14 +00:00
Max Howell
d62fc63568 Formulary comments 2010-01-13 11:23:14 +00:00
Max Howell
5e20a29587 LICENCE is a common spelling too 2010-01-13 11:23:14 +00:00
Adam Vandenberg
446be8cdd7 Add Makefile var and multi-replace support inreplace. 2010-01-13 11:23:07 +00:00
Max Howell
5bcffbb5e3 Escape spaces for archs_for_command
Use inject for concision.

Rename to archs from arch as it returns an array.
2010-01-13 11:16:24 +00:00
Adam Vandenberg
24b6e9c721 Detect X11 when ENV.x11 is requested; dump in --config. 2010-01-11 11:36:35 -08:00
Max Howell
56351558b8 Check GitHub for issues relating to build failures
Uses the GitHub issue search API, so it's very neat and concise. However you can get false positives, so it's not 100% useful. Still I think it is more useful than before, which was, nothing.

A further issue is it depends on the ticket at GitHub using the formula's proper name. So we should ensure this as we can.

Finally, it does add a possibly large delay to clean exit after a build error. We may want to fiddle with timeouts if it becomes troublesome.
2010-01-06 23:38:07 +00:00