29627 Commits

Author SHA1 Message Date
Max Howell
0543bbcccc Fixes Homebrew/homebrew#32 -- Create directory, don't symlink perl5/site_perl 2009-09-03 23:17:02 +01:00
Max Howell
a12569699e Fix some "GCC cannot create executables"
This regards Issue Homebrew/homebrew#30.

Turns out -march=native isn't supported by Apple's GCC, but while investigating it I found they'd back ported the -march=core2 option, so we win anyway.

Logic reverted to how it was yesterday.

I moved the gcc options stuff back to brewkit.rb as we manipulate the cflags more later and it seemed bad form to split the logic for this area over two files.

Additionally the brew command exits immediately on powerpc now. Brewkit doesn't throw as theoretically it is a useful library file for other projects.
2009-09-03 22:39:49 +01:00
Max Howell
18d9fbee98 Closes Homebrew/homebrew#27 (permissions to strict)
I went with 0555 as the permissions changing only occurs to bin, sbin and lib, so there shouldn't be any files in there for editing in general anyway.

Formulae can specify not to "clean" any particular file by reimplementing the skip_clean? function, in case some config file or what not ends up in there.

Also committing cosmetic fix to pretty_duration function.
2009-09-03 20:58:33 +01:00
Ask Solem
21df479f1b Thrift formula
Thrift is a software framework for scalable cross-language services
development. It combines a powerful software stack with a code generation
engine to build services that work efficiently and seamlessly between C++,
Java, Python, PHP, and Ruby. Thrift was developed at Facebook and released as
open source.
2009-09-03 16:34:35 +01:00
spicyj
ba8ba4c451 Improvements to build environment determination
Simplified hardware model testing.

Even smarter compiler option generation using sysctl and new GCC 4.2 features.

Get processor count from sysctl and thus remove our dependency on RubyCocoa.
2009-09-03 16:34:31 +01:00
Max Howell
5eb51cb766 If the download fails, delete the half-file
Otherwise next time it will assume the half-file is the whole file and fail
the md5 check.
2009-09-02 23:24:14 +01:00
Max Howell
ce3b7c9826 Fix apr formula by aliasing deparallelize to j1 2009-09-02 23:20:15 +01:00
Max Howell
4c09e3ef2b brew info FIX if git isn't installed 2009-09-02 15:44:10 +01:00
Max Howell
4f8c46d627 Only time the build, not the download too 2009-09-02 15:44:10 +01:00
Max Howell
422ec29363 Tests for Pathname+Yeast
I removed the rename and mv functions as when I wrote the tests I realised the function implied the pathname object would be updated to reflect the moved or renamed file. However that cannot be done. Also frankly I think writing it out in full makes clearer code.
2009-09-02 15:07:26 +01:00
Max Howell
fbda4b45d6 Build optimisations for 64 bit Snow Leopard
Specifying -v/--verbose shows the build environment before the build

MACOS_VERSION contains the floating point value of the OS X version

A test for some floating point assumptions I make
2009-09-02 15:07:18 +01:00
Max Howell
f6743bbfd7 Tests for hw.model and brew.h.rb 2009-09-01 12:05:26 +01:00
Eloy Duran
74f2dd7d38 Obtain hw.model from the sysctl tool
Saves building our own tool to do the same job!
2009-09-01 11:57:50 +01:00
Ben Alpert
b71b8e3972 Dict.org client formula
Added Formula::etc()

Added Pathname::write() convenience function which can write a string out to
the file it points too, raising if it would have to overwrite.
2009-09-01 11:15:25 +01:00
Max Howell
2ff0294e18 Foolish lack of backslash causes brew mk b0rkage 2009-08-31 22:05:42 +01:00
Max Howell
1e22bb4ee1 Use github.user for github history link
Discussion: d60fc4ba86d45255b0093303c45f6b1c2196fda2
2009-08-31 21:20:09 +01:00
Max Howell
5dd3708768 Use newer configure syntax as make template 2009-08-31 18:29:43 +01:00
Max Howell
84d034f9fb docs is an alias for doc sometimes apparently
We don't install documentation to save space. It seems pointless in this
modern age where the online docs are probably more up to date. However I do
believe this should be an option, defaulting to "don't install".
2009-08-31 18:23:41 +01:00
Christian Mayer
2a72c2fa0e If forked, open Github history of forked repository 2009-08-31 18:09:48 +01:00
Max Howell
4d63b87e0a Change license to BSD
I confirmed this change with all relevant contributors first.
2009-08-31 16:09:17 +01:00
Max Howell
145e33abdf Better cache names for accessory-formula
Because formula don't get named unless the brew kit instantiates them accessory formula were getting named "__UNKNOWN__". Which sucks.

This isn't ideal for me as I made the naming use @name and @version to ensure unique naming. Now it is possible to have name clashes in the cache. So I need to solve it better at some point.
2009-08-30 16:11:44 +01:00
Max Howell
11c67fe0b4 Ruby 1.9 version style 2009-08-30 15:49:38 +01:00
Max Howell
a1d31fabad FIX GithubGistFormula (fixes Homebrew/homebrew#20) 2009-08-30 15:32:15 +01:00
Max Howell
65cb8ea09f brew unlink command
Closes Homebrew/homebrew#8
2009-08-29 21:07:26 +01:00
Adam Vandenberg
a67cf9bef2 Clarify --debug behavior.
Add a note that 'exit 1' will abort the installation in --debug mode.

Signed Off By: Max Howell <max@methylblue.com>

I ammended the text slightly and made the lines all 78 chars wide maximum.
2009-08-29 14:12:31 +01:00
Max Howell
5b6deb8845 Don't symlink directories into bin 2009-08-24 01:04:54 +01:00
Max Howell
2eec8180eb Playdar formula
Fix git download strategy
2009-08-24 01:04:54 +01:00
Max Howell
2b29e052fc reinreplace uses safe_system 2009-08-24 01:04:54 +01:00
Max Howell
4671526d70 Raise a SystemExit exception to prevent backtrace 2009-08-24 01:04:54 +01:00
Max Howell
f0c7e944bb Support optional HEAD builds for any formula
A formula can have just a @head url or the user can specify to install HEAD
with --head. We support subversion and git checkouts.

The version is set to HEAD for head builds.

Next step is making brew update handle these installs correctly.
2009-08-24 01:04:54 +01:00
Adam Vandenberg
4c2d4c8560 Add path for 'libexec'. 2009-08-24 01:04:53 +01:00
Max Howell
5144ac9e6a Suggest homepage in usage 2009-08-24 01:04:53 +01:00
Max Howell
b6ccdad53e Proper validation of Formula.name and version 2009-08-24 01:04:53 +01:00
Max Howell
c53e10f4aa FIX brew diy --set-version --set-name 2009-08-24 01:04:53 +01:00
Max Howell
72bde8c583 Move download strategies into their own file 2009-08-24 01:04:53 +01:00
Max Howell
f9d7b34945 Don't return a version that equals the basename
Return nil instead
2009-08-24 01:04:53 +01:00
Max Howell
c532d11e7a Refactor away AbstractFormula
We'd gotten to the stage where Formula was so lean, it was pointless to
separate it.
2009-08-24 01:04:48 +01:00
Max Howell
b115f26870 GitDownloadStrategy
Untested
2009-08-24 01:03:30 +01:00
Adam Vandenberg
57a86034a3 Support building from Subversion repositories
Adds a new DownloadStrategy that checks files out from Subversion to the
cache, then exports over to the temp folder for the build.

To use checkout with the svn:// protocol or reimplement download_strategy and
return SubversionDownloadStrategy.
2009-08-24 01:03:30 +01:00
Adam Vandenberg
0eaf4bbcd9 Factor out downloading from Formula
This patch adds a ArchiveDownloadStrategy that handles downloading
tarbarlls and decompressing them into the staging area ready for brewing.

Refactored safe_system and curl into utils.rb

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

Modifications to Adam's original patch:

I reverted objectification of checksum verification because I couldn't think
of any other download validation methods that might be useful to us in the
future, so allowing such flexibility had no advantages. If we ever need this
to be OO we can add it. But for now less complexity is preferable.

I removed the @svnurl class member. Instead download_strategy is autodetected
by examining the url. The user can override the download_strategy in case this
fails. Thus we already can easily add support for clones of git repositories.
2009-08-24 01:03:23 +01:00
Max Howell
65e1419ea9 Raise if installing a non-existent file 2009-08-21 18:26:50 +01:00
Adam Vandenberg
9bc60b80b6 Fix comment about ENV overrides 2009-08-21 14:40:26 +01:00
Adeel Ahmad Khan
1c55642645 Link binaries in sbin as well as bin.
Signed-off-by: Max Howell <max@methylblue.com>
2009-08-12 23:55:57 +08:00
Max Howell
140bfc5592 brew diy command
Automagically determines prefix to install to for DIY installations.

README amended.
2009-08-12 13:43:51 +01:00
Max Howell
355bfc1751 Pathname.version on directories ignores extname
Because directories don't have extensions.

Included test
2009-08-12 13:43:20 +01:00
Adam Vandenberg
7e723c107b Add note about xeon.
Signed-off-by: Max Howell <max@methylblue.com>
2009-08-12 05:42:58 +08:00
Max Howell
a2066af2fd Allow user to specify patch level
The default is p0, but if you return a Hash instead of an array from patches you can specify patch level. See the comment documentation.

Closes Homebrew/homebrew#10
2009-08-11 18:16:12 +01:00
Max Howell
90ea28f6ba Remove MacPorts and Fink from the build environment
Closes Homebrew/homebrew#13
2009-08-11 14:52:45 +01:00
Max Howell
ab9f59f227 More ARGV tests 2009-08-11 01:30:39 +01:00
Max Howell
d275ba9976 FIX formulae and kegs didn't always work
Strange that they did often enough for my tests to work.
2009-08-11 00:36:47 +01:00