Commit Graph
5506 Commits
Author SHA1 Message Date
Adam Vandenberg 1a44bacc7e Function to return a binary's Mach-O architectures
Added a utility method to get an array of architecture names for
a given executable.

This will be useful for, say, figuring out what Python was compiled for,
to know what to compile a C-based module as.

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

I added a test and made the function use `which` if the path provided is not
absolute. I considered allowing relative paths, but then it is possible for
the function to take eg. the svn binary from the current directory when you
meant the one in the path, and that could be a confusing bug.
2009-09-10 18:17:15 +01:00
Adam Vandenberg 9f79ad9db2 Display exit code when nonzero.
Brew fails if a tool (make, or whatever) doesn't return an exit code
of 0. This patch displays the non-zero code on failure, so we can
better diagnose what caused the build to fail (or if we need to add
that exit code as exception 'success code'.)
2009-09-10 18:17:15 +01:00
Max Howell 74675ef347 Handle $EDITOR with spaces
Fixes #40
2009-09-10 18:16:49 +01:00
Max Howell 248d7ef03b We should certainly have a Formula::share()
I removed this months back as I found it confusing, does it mean:

prefix+'share' or prefix+'share'+name()

But honestly, it's obvious, it's the former. It's the same as the other path
functions.
2009-09-10 17:21:14 +01:00
Étienne Barrié b820972433 Add support for SHA256 2009-09-07 16:10:50 +02:00
Étienne Barrié 754cd4760e Add test for SHA1 2009-09-07 15:26:43 +02:00
Max Howell f414bc8cce brew make' becomes brew create'
This is because I have observed two people confuse make with the "make" tool
and thus assume `brew make' is `brew install'.

`brew make' will be deprecated at 0.7, until then it shows a warning.
2009-09-07 01:34:40 +01:00
Max Howell 27263784d1 No spurious error due to Interrupt during curl
Only delete the file that is downloaded if an error occurs while downloading it.
2009-09-05 20:47:15 +01:00
Max Howell 2f5bcc935a Fix double newline after Interrupt
Seems to be an issue with Ruby system() call doing a double fork.
2009-09-05 20:46:07 +01:00
scoates e23a612c4d Use ENV[EDITOR] if possible
Defaulting to EDITOR, then checking for the mate command, and then using
vim as a last resort.

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

Plain brew edit still uses Textmate though because a client that
supported a project concept is required for that particular feature.
Patches for that welcome.
2009-09-05 19:10:56 +01:00
Max Howell 4d25f7bd13 Typo in usage
I patched the patch wrongly.
2009-09-05 16:22:06 +01:00
Andre Arko c853b5f332 `brew search' command
Example usage:
  brew search w  # formulae containing w
  brew search ^w # formulae starting with w

No parameters lists all packages.

Also adds puts_columns to util, and uses it for output.

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

I changed the command from 'available' to search because this is more similar
to how other tools call this function.

The short form is -S, which is the "pacman" tool equivalent.
2009-09-05 15:09:17 +01:00
Max Howell 3fb7c33397 ENV.no_optimization
For when we optimize too much and things seem to break. In my experience the
GCC optimizer is pretty safe nowadays, but at least this allows you to test
the hypothesis the optimization is breaking the build.
2009-09-05 14:38:38 +01:00
Max Howell c4e1abcad9 Don't trim ohai message in verbose mode 2009-09-05 14:35:26 +01:00
Max Howell b06eb7feff Cache ARGV calcs
Means unshift doesn't work, but well, that's almost a feature :P
2009-09-05 14:35:26 +01:00
Eloy Duran 53450d1436 watch_out_for_spill
New method which uses RubyCocoa with the FSEvents API from Rucola to watch if
files aren't installed outside the Homebrew prefix. Right now the paths being
watched are: /System, /usr, /etc, /sbin, /bin, and /Applications.
2009-09-05 14:35:15 +01:00
Adam Vandenberg a86775970f Nehalem supports SSE4.2
Signed Off By: Max Howell <max@methylblue.com>

I realised that -msse4.1 and -msse4.2 aren't supported by GCC 4.0, so I made
the brash decision that we require GCC 4.2. It comes with Xcode 3.1 so people
can upgrade if they have to.

Requiring a single compiler is better for us anyway -- less possible errors
and failures.

Formulae can still request gcc-4.0.1, but at least then those formulae still
only use a single compiler and not possibly two.
2009-09-04 18:54:43 +01:00
Bjørn Arild Mæland b539e96f08 Sort the output from brew install 2009-09-04 16:14:51 +01:00
Max Howell 2142e1823f Fixes #30 -- GCC can't create executables
The fix is to error out if GCC isn't installed, and to ensure we aren't
setting CC and CXX to something that doesn't exist.
2009-09-04 15:54:27 +01:00
Tom von Schwerdtner 6685200998 Plain Core Duo can't execute 64 bit code 2009-09-04 15:40:31 +01:00
Ben Alpert f71999e9bb Fix SSE support on Core 2 processors
DRY it off a bit.
2009-09-04 15:30:45 +01:00
Max Howell d3912b196c Fixes #32 -- Create directory, don't symlink perl5/site_perl 2009-09-03 23:17:02 +01:00
Max Howell 5c8c18870c Fix some "GCC cannot create executables"
This regards Issue #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 43f1c00d08 Closes #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
Erlend Finvåg b976fce418 Bash Completion formula 2009-09-03 18:02:26 +01:00
Julien BLANCHARD a996acfb02 NGinx formula
A HTTP and mail proxy server licensed under a 2-clause BSD-like license.
2009-09-03 17:36:22 +01:00
Ask Solem 41a046564f 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 7c1d09672a 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
Andre Arko 9f93a4f355 Oniguruma formula
Oniguruma is a regular expressions library. The characteristics of this
library is that different character encoding for every regular expression
object can be specified.
2009-09-03 13:05:01 +01:00
August Lilleaas c7df441d99 fish shell formula
fish is a user friendly command line shell for UNIX-like operating
systems such as Linux.
2009-09-03 00:47:47 +01:00
nmeans 07e58a91a2 Expat formula
Expat is an XML parser library written in C.
2009-09-03 00:38:28 +01:00
Ben Alpert ca2b962782 Install Antiword manpage 2009-09-02 23:48:06 +01:00
Adam Vandenberg 5607a70e6c Update Subersion to 1.6.5, add SSL support, turn off BDB support. 2009-09-02 23:48:06 +01:00
Max Howell b4259082b5 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 9feceae461 Fix apr formula by aliasing deparallelize to j1 2009-09-02 23:20:15 +01:00
Max Howell d43a1ba207 brew info FIX if git isn't installed 2009-09-02 15:44:10 +01:00
Max Howell d78bfe0ed7 Only time the build, not the download too 2009-09-02 15:44:10 +01:00
Max Howell e8236e18e9 Use std_cmake_parameters for yajl 2009-09-02 15:07:26 +01:00
Max Howell e478f92b0f Use my fork of playdar
My fork has a number of build fixes.
2009-09-02 15:07:26 +01:00
Max Howell 6bf2dcc5c1 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 ec0e3e0fbd 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
Joshua Peek fd23f331c8 Dnsmasq formula 2009-09-02 01:43:17 -05:00
Max Howell 365bfc8544 Tests for hw.model and brew.h.rb 2009-09-01 12:05:26 +01:00
Eloy Duran e52635ed56 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
Brett Porter e21d02747d Document how to start Dovecot 2009-09-01 11:50:43 +01:00
Brett Porter 8a62a76f39 GnuPG 1.4 formula
Doesn't build on 10.6 currently.
2009-09-01 11:50:39 +01:00
Brett Porter 4fbf210d06 Litmus formula
Litmus is a WebDAV server test suite, which aims to test whether a server is
compliant with the WebDAV protocol as specified in RFC2518.
2009-09-01 11:39:21 +01:00
Ben Alpert 83ac50cc58 XAR formula
The XAR project aims to provide an easily extensible archive format.
2009-09-01 11:35:23 +01:00
Ben Alpert 93b7e583b7 Antiword formula
Antiword is a free MS Word reader that converts the binary files into plain
text or Postscript.
2009-09-01 11:35:16 +01:00
Ben Alpert 11ccd3c722 GNU Ddrescue formula
GNU ddrescue is a data recovery tool. It copies data from one file or block
device (hard disc, cdrom, etc) to another, trying hard to rescue data in case
of read errors.
2009-09-01 11:15:36 +01:00