70 Commits

Author SHA1 Message Date
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
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
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
4c6e23c28f Determine LLVM location programmatically
Xcode can be installed anywhere, not just /Developer.
2009-10-09 00:09:05 +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
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
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
Adam Vandenberg
e4a32736cd Add CPPFLAG for ncurses flag under 10.6. 2009-09-30 18:04:04 +01:00
Adam Vandenberg
14b3ea887a Add option to downgrade from LLVM to gcc.
Signed-off-by: Max Howell <max@methylblue.com>

I added ENV tests.
2009-09-29 15:45:48 +01:00
Max Howell
5abe20b410 ENV.O3 -- for when O4 takes forever
Which makes me wonder if it's worth it? Oh well, you can't find these things
out without experimentation.
2009-09-29 14:23:00 +01:00
Max Howell
d2943b9526 Default to LLVM on Snow Leopard
On Leopard you can enable it by defining the environment variable:

    HOMEBREW_USE_LLVM

I didn't enable it on Leopard by default because it doesn't get as much testing, and I don't want to rock the boat. On Snow Leopard people are forigiving of issues because it is new and many compiles fail anyway. And if you installed Snow Leopard you *want* the cutting edge.

Closes Homebrew/homebrew#29
2009-09-25 18:06:37 +01:00
Piotr Usewicz
4ed3834be0 Add full version and build numbers to user agent
Signed-off-by: Max Howell <max@methylblue.com>

I adapted it slightly based on the user agent that Safari gives.
2009-09-25 01:24:05 +01:00
Max Howell
44a1fa418e Use full paths to all system utilities
Otherwise you run the risk of not running the exact version / make of the utility you planned.

Fixes Homebrew/homebrew#48

Really we need to do this formula too, so I guess a make and cmake function are on the way…
2009-09-24 18:26:24 +01:00
Max Howell
034fc40ae1 Remove Fink and Macports from the PATH earlier
References issue Homebrew/homebrew#48
2009-09-24 18:26:24 +01:00
Adam Vandenberg
36bb590e82 Rename :libpng to :x11 and alias. 2009-09-21 20:55:41 -07:00
Max Howell
7f56fe2532 ENV.cc; returns the compiler we use 2009-09-21 23:50:57 +01:00
Max Howell
01b85d8521 Automatically add keg_only? deps to relevent ENV
Eg gettext gets added into LDFLAGS, INCLUDE and that. I hope I got everything
that is typical. Prolly not. But we'll find out.

Made readline keg_only because the BSD version is provided by OS X, and I
don't want bug reports that are tricky to solve due to unexpected differences
between the two.
2009-09-21 20:23:09 +01:00
Max Howell
ee2b521ca8 Solving the GNU GetText issues
GNU GetText breaks eg. Ruby 1.9 builds, and some other formula I have been building too. But it is required by eg. glib. So to solve this we are going to by default not symlink gettext into the Homebrew prefix.

Formula that depend on GetText will have the gettext paths added to the brewing environment automatically. Neat.
2009-09-17 22:01:27 +01:00
Joshua Peek
acd913593a Clear CDPATH to avoid make issues that depend on changing directories 2009-09-14 20:33:47 +01:00
Max Howell
3f11c4ab1f Escape $ inreplace 'after' parameter 2009-09-14 20:33:46 +01:00
Joshua Peek
111a75d262 Add llvm switch to ENV 2009-09-10 18:17:15 +01:00
Max Howell
a2cd3367a8 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
Adam Vandenberg
ef88db9d38 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
Max Howell
d11165cd97 Fixes Homebrew/homebrew#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
4d940628cc Plain Core Duo can't execute 64 bit code 2009-09-04 15:40:31 +01:00
Ben Alpert
c6d98678ac Fix SSE support on Core 2 processors
DRY it off a bit.
2009-09-04 15:30:45 +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
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
ce3b7c9826 Fix apr formula by aliasing deparallelize to j1 2009-09-02 23:20:15 +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
4d63b87e0a Change license to BSD
I confirmed this change with all relevant contributors first.
2009-08-31 16:09:17 +01:00
Max Howell
2b29e052fc reinreplace uses safe_system 2009-08-24 01:04:54 +01:00
Max Howell
72bde8c583 Move download strategies into their own file 2009-08-24 01:04:53 +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
0f0f775ea9 Escape / in before inreplace too 2009-08-10 23:32:13 +01:00
Max Howell
bae67c110f Fix inreplace and yajl formula 2009-08-10 18:12:16 +01:00
Max Howell
7653d48443 ENV.libpng
libpng and that are in the X11 formula
2009-08-10 18:12:16 +01:00
Max Howell
dccc2b1923 Apply new ENV capabilities to all existing Formulae 2009-08-10 18:11:22 +01:00
Max Howell
5a396fd8b4 Extend ENV to make tweaking the build environment easier
eg. ENV.libpng or ENV.deparallelize
2009-08-10 16:48:21 +01:00
Max Howell
a5ca752658 Refactor and clean up code 2009-08-01 18:10:20 +01:00
Max Howell
7cb9c31f3e Determine best optimization flags for host
We call sysctl to determine which exact Mac model we are running on and
optimize as well as possible.
2009-07-31 16:06:14 +01:00
Max Howell
9b19f194cc Refactor $foo into HOMEBREW_FOO
CONSTANTS are the far saner choice for these important parameters.

Split env up so I can redefine the CONSTANTS in unittest.rb.
2009-07-31 04:59:02 +01:00
Max Howell
822a30e39d Fix inreplace when using ' or other RegExp symbols
Evidence that using perl from the cli for in-replace is stupid :P

Had to use $'' to allow escaping of ' in bash strings.

Wasn't escaping regexp symbols as well, so it was amazing this worked at all!
2009-07-27 16:20:48 +01:00
Max Howell
7ebe8084ec Enforce 10.5 as minimum OSX SDK framework to use 2009-07-27 16:18:17 +01:00
Max Howell
fb5aefd4a0 Refactor--object orientate where sensible 2009-07-24 23:57:54 +01:00
Max Howell
5eb9d6519d Fix ack formula 2009-07-23 04:12:25 +01:00
Max Howell
34955880d5 Fix issues with Pathname.install and arrays 2009-07-23 01:14:22 +01:00
Max Howell
32281b7a7f Fix hard link dissociation bug
strip unlinks the file first, breaking hard links, so we detect instances where we are about to strip a file with many linkages and prevent it.

This fixes the libexec non executable bug in the git package.

Took me a long time to figure out what was wrong! :P
2009-07-22 20:28:42 +01:00
Max Howell
17968f51c4 Support gloox version style 2009-07-10 03:11:05 +01:00