17988 Commits

Author SHA1 Message Date
Adam Vandenberg
3087888fb0 Rewrite of HOMEBREW_ folder locations
This rewrite attempts to sort out where the Prefix, Cellar, and
Repository are relative to the real and symlinked 'brew' command.

Also included is a --config option which dumps all of these variables.

Any top-level script must define a "BREW_FILE" that gives the path
to brew as it exists in the path. 'brew' itself just uses __FILE__ and
install.rb does a `which brew` (there may be a better way?)

The Prefix is always relative to the location of brew as it exists in
the path. Thus, whether or not /usr/local/bin/brew is a symlink or real
file, the Prefix is always /usr/local. If you have brew in some other
prefix, such as /nonstandard/bin/brew, then '/nonstandard/ will be
managed by brew instead.

The Repository, Cellar, and "Library/Homebrew" required code is always
found relative to the "real" path or brew. If brew is a real file in
/usr/local/bin/brew, then everything else will be found in /usr/local
and we'll expect a /usr/local/.git

Otherwise, we dereference brew's symlink and look for everything else
relative to that path instead.
2009-11-04 16:27:34 +00:00
Max Howell
ffe4f25d87 Marshal install.rb exceptions back to the parent process
Using an error pipe.

The use of ENV[HOMEBREW_ERROR_PIPE] feels wrong, but I wasn't sure how else to
proxy the file descriptor to the child process since the fork immediately
calls exec.
2009-10-24 16:20:58 +01:00
Max Howell
fc9ea77bb3 Better md5 mismatch exception 2009-10-24 16:20:11 +01:00
Max Howell
e289164adc Implement inreplace natively in Ruby
I found yet another instance where the escaping wasn't perfect, so got fed up and just did it in Ruby. I hope this works for all existing usage. It should.

The bonus here is that you can use RegExps now.
2009-10-23 19:22:51 +01:00
Max Howell
d967421c6e The tests need the actual optparse apparently 2009-10-23 19:22:51 +01:00
Alexander Solovyov
6ca096125d Fixes Homebrew/homebrew#97: add fake optparse.rb 2009-10-23 19:22:51 +01:00
Max Howell
e1995d60ef Call to_s on ohai parameters 2009-10-23 19:22:51 +01:00
Max Howell
ac277f5c22 Show backtrace during non fatal install steps if --debug 2009-10-23 19:22:51 +01:00
Max Howell
3570214d20 Allow multiple formula to symlink the same directory
During the link step, if the destination symlink already exists, unlink it, and create a directory instead, then relink the original contents. Then continue linking the formula in question.

Fixes Homebrew/homebrew#62
2009-10-23 19:22:07 +01:00
Max Howell
03f37bef79 ENV.m32 2009-10-23 19:20:16 +01:00
Max Howell
6de6bffd55 ENV.osx_10_5 2009-10-23 19:20:16 +01:00
Max Howell
79530df421 Remove mercurial and scons from the create blacklist
Blacklist wxwidgets, it's in /usr/X11/lib.
2009-10-23 19:20:16 +01:00
Max Howell
1fcd449c6e Show where we cached the download 2009-10-23 19:12:29 +01:00
Adam Vandenberg
e1d82cde79 Add separator param to ENV.append (to match prepend.) 2009-10-21 11:50:37 -07:00
Adam Vandenberg
eafba2261f Allow revisions on SVN checkouts. 2009-10-20 20:50:20 -07:00
Max Howell
3d36b01da3 Camelcase class names around the . from filenames
Eg. shell.fm -> ShellFm
2009-10-19 13:48:34 +01:00
Max Howell
595dbc5710 ENV.universal_binary
Note, we still don't support PPC, this builds a 32 bit, 64 bit binary.
2009-10-19 13:48:33 +01:00
Michael Stephens
9d290b4502 Add dependencies to 'brew info' output 2009-10-19 04:02:49 +01:00
Max Howell
92964742aa Allow svn+http:// urls 2009-10-19 04:02:49 +01:00
Max Howell
b81ea96ca2 Reimplemented HttpDownloadStrategy needs 4 parameters now 2009-10-19 04:02:48 +01:00
Max Howell
995c2d5a13 Remove assignment to unused temporary variable 2009-10-19 04:02:48 +01:00
Jannis Leidel
ef02031d7c Fix Homebrew/homebrew#52: Add ability to checkout a branch or tag.
GitDownloadStrategy and MercurialDownloadStrategy
now can be used like this:

  head 'git://server/repo.git', :branch => 'stable'
  head 'hg://server/repo/', :tag => '1.0.4'
2009-10-19 04:02:48 +01:00
Max Howell
53d6f617d7 Allow formula names with '+' in them
HFS+ handles the + fine. However the Ruby class name needs a s/+/x/g.

I acknowledge that supporting + will make it harder to port to certain other
filesystems. However that's your challenge! :D
2009-10-19 04:02:48 +01:00
Max Howell
6c2555b476 Allow --force for blacklisted formula names 2009-10-15 16:51:59 +01:00
Max Howell
1ead455b83 Blacklist brew create scons 2009-10-15 16:51:58 +01:00
Max Howell
8eb97a7db5 Put colors in Tty class
Changed format of Errors and Warnings slightly.
2009-10-15 16:51:58 +01:00
Max Howell
543a113712 Some subdirs and renames to aid homebrew n00bs
The classes better reflect their contents. I'm sure this change may be
contentious, but I am a sucker for trying to create source bases that are easy
to get to grips with and easy to navigate.

brewkit.rb is now a deprecated file.
2009-10-15 16:51:53 +01:00
Max Howell
73d0ee4358 Move verbose ARGV display to install.rb
This works better as it comes after any keg-only deps change ENV, but also it needs to happen after brewkit is required and that only happens in install now.
2009-10-15 16:48:07 +01:00
Max Howell
ca1a6492bc s/require 'brewkit'/require 'formula'/g
brewkit.rb changes ENV destructively, so lets not do that everytime a formula
is required. Now it's possible for other tools to require a formula
description without worrying about side-effects.
2009-10-15 16:48:03 +01:00
Max Howell
9802bb0e19 Introduce :provided_by_osx for keg_only? 2009-10-12 22:41:16 +01:00
Max Howell
b70a5da5eb Use explicit path to LLVM
Had a bug in channel where build script altered PATH for some reason and LLVM couldn't be found.
2009-10-12 14:31:21 +01:00
Max Howell
0406bcdac2 Revert copy pasta 2009-10-09 15:21:37 +01:00
Max Howell
32c2a562cb I believe in a world where unittests work with Ruby 1.8.6 2009-10-09 03:59:41 +01:00
Adam Vandenberg
1e5623c300 Add formula test that looks for commented-out template code. 2009-10-08 17:21:55 -07:00
Adam Vandenberg
5a48d297f2 Remove invalid copied comment. 2009-10-08 17:21:55 -07:00
Adam Vandenberg
82bbe5e074 Tweak version regex.
Enable tarballs named like "fceux-2.1.1.src.tar.bz2"
2009-10-08 17:21:55 -07:00
Max Howell
4c6e23c28f Determine LLVM location programmatically
Xcode can be installed anywhere, not just /Developer.
2009-10-09 00:09:05 +01:00
Max Howell
e2bed20d21 Revert "Set homepage in created scripts to frontmost Safari URL"
This reverts commit a1ed2cb19706e317d34f1a9f2efe8a2d2388afae.

The is running part of the Applescript didn't seem to prevent Safari getting
loaded when it wasn't running when used via osascript. It worked in
ScriptEditor! Honest!

Also we decided that it probably wouldn't work often enough anyway.

Discussion: a1ed2cb197
2009-10-09 00:09:05 +01:00
Max Howell
346e42d4b9 Set homepage in created scripts to frontmost Safari URL
A bit of fun with Applescript, for those of us who use Safari.
2009-10-04 20:15:33 +01:00
Tom von Schwerdtner
ef580e9541 Introduce ENV.O2 and use that for the postgresql build
Also only set ARCHFLAGS on non-Core Duo machines... though it seemed to build
fine even with it, it doenst make much sense to me... these changes are kind
of up for debate but it "works for me" this way...

Closes Homebrew/homebrew#75
2009-10-04 18:36:44 +01:00
Max Howell
f785369e54 Add to PKG_CONFIG_PATH for keg-only deps
Also prepending to these vars now too as for kegs that are duplicates of OS X libs, we need to give them the edge and put them first.
2009-10-03 16:16:02 +01:00
Max Howell
ceef7729e0 Modernise the GRC formula somewhat
This was one of the first ones I wrote, so it lacks some of our more recent touches.
2009-10-03 15:23:45 +01:00
Michael Stephens
65eac81ca9 GeoIP formula
GeoIP is a C library that enables the user to find geographical and
network information of an IP address.
2009-10-03 13:25:23 +01:00
Max Howell
c130cf3e71 HttpDownloadStrategy renamed CurlDownloadStrategy
Because people didn't realise it was actually curl and thus supports eg. ftp too.
2009-10-02 20:01:23 +01:00
Max Howell
5f0d2dc032 Formula.etc is now HOMEBREW_PREFIX/etc
You generally don't want to have to copy the configuration to a new directory when you upgrade.
2009-10-02 16:30:33 +01:00
Adam Vandenberg
e66364502d Add SourceForge pattern to SubversionDownloadStrategy 2009-10-01 10:23:02 -07:00
Adam Vandenberg
da565308ad Add -sources to the version recognizer. 2009-10-01 10:23:02 -07:00
Austin Ziegler
3c3902954b Set LD to CC
This is generally the right thing to do. It should fix more build problems than it hinders. Especially on Snow Leopard.

This fixes the pngcrush build.
2009-10-01 16:17:54 +01:00
Max Howell
64899bbbff Blacklist creation for some formula
We don't duplicate, so libxml and that are already provided by OS X. Mercurial is provided by easy_install.

I'm adding this to save people contributing stuff that we won;t accept. I hate disappointing people :(
2009-10-01 15:48:54 +01:00
Max Howell
5c33fdfb5b If an exception has newlines, render them well 2009-10-01 15:48:51 +01:00