2618 Commits

Author SHA1 Message Date
Jack Nagel
ffd6e7f340 Fix typo in MacOS.sdk_path
/cc @adamv

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 18:14:30 -05:00
Max Howell
896ccc45f4 Actually cache Xcode.version if nil 2012-09-03 16:35:16 -04:00
Jack Nagel
eb3c0cd273 Don't error out with Xcode 4.5
c.f. Homebrew/homebrew#14603.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 15:15:39 -05:00
Max Howell
10aab9a672 superenv: More thorough scrubbing of -I & -L args
It's important that -I is scrubbed thoroughly as we add most of our important paths with -isystem and -I is handled *first*.

NOTE this indicates we should probably have used -I rather than -isystem, but too late to test all that now.

Also scrub -L for bad-paths thoroughly (evaluate realpath).
2012-09-03 15:12:32 -04:00
Max Howell
4febf938ae Put X11 last in the libpath and cpath
It was after HOMEBREW_PREFIX but not after everything else too.
2012-09-03 15:12:31 -04:00
Max Howell
fdadd7e9dd Fix linking against X11 cairo in preference to ours
Amateur mistake where I forgot that the system library path is read AFTER the -L library path, so /usr/local/lib was after /opt/X11/lib and the wrong cairo was used.

This only affects CLT /usr/local installs with XQuartz installed.

Fixes Homebrew/homebrew#14639.
2012-09-03 15:12:31 -04:00
Max Howell
c35f6cb9d5 Set CC and CXX with superenv (again)
It was dumb to have make call different compilers to configure depending on the `servile?` flag. This is not a route to reliability.

Instead now we set CC (formula that break if CC is set like Jack be damned, their build-systems are just plain broken and should not be supported). When cc is called we examine HOMEBREW_CC, otherwise we instantiate the tool that was called, just like the formula's build-system will expect.

Fixes Homebrew/homebrew#14659 (though the build fails later for me, with the same error for stdenv and superenv).
2012-09-03 15:12:31 -04:00
Max Howell
af06c75d72 Add NCLT SDK apache include directory to superenv
Fixes subversion compile issues for NCLT configurations with superenv, stdenv still broken (tough).
2012-09-03 15:12:30 -04:00
Max Howell
adc158412c Undent doesn't like paragraphing 2012-09-03 15:12:30 -04:00
Max Howell
feb77b2085 Prevent possible bug in build's optlink 2012-09-03 15:12:29 -04:00
Mike McQuaid
b7f50ebf3f Add script to convert formulae from MD5 to SHA1. 2012-09-03 11:20:07 -07:00
Mike McQuaid
0b3327b862 brew-audit: recommend SHA1 over MD5. 2012-09-03 11:20:07 -07:00
Mike McQuaid
a22e60ee8c brew-fetch: Return error code on unmatched hash. 2012-09-03 11:20:07 -07:00
Mike McQuaid
50fa018057 brew-test-bot: Only run brew-test if test defined. 2012-09-03 00:31:34 -07:00
Max Howell
88b1da7405 Remove -fopenmp *and* -lgomp
Apparently LLVM can use these, so only remove if clang.

Refs Homebrew/homebrew#14569.
2012-09-02 23:10:06 -04:00
Jack Nagel
b97c0919f8 Process requirements before keg-only deps under stdenv
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-02 14:41:19 -05:00
Stephan Zeissler
b49fa78f96 Change sdk detection to same syntax used elsewhere.
This wasn't working for me on leopard with ruby 1.9.2.

Closes Homebrew/homebrew#14636.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-09-02 11:05:03 -07:00
Max Howell
c36f79c79a bsdmake is *not* provided by Xcode/CLT
Fixes Homebrew/homebrew#14626.

Also make proctools install do prefixes other than /usr/local.
2012-09-02 11:22:12 -04:00
Max Howell
2375f71e82 Add mig tool to superenv
Necessary because it otherwise calls actual cc after it does whatever it does. So we force it to call our cc.
2012-09-01 23:18:28 -04:00
Adam Vandenberg
31d70b5c33 Fix the name because adamv doesn't know what he's doing. 2012-09-01 19:01:56 -07:00
Adam Vandenberg
788b556a3e bless alanthing/homebrew-apachemod
Add external tap to default search path, and recommend it for packaging
Apache Modules.
2012-09-01 18:51:39 -07:00
Jack Nagel
8c55acacb4 brew list -v means verbose, not versions
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-01 13:28:30 -05:00
Adam Vandenberg
e0cff10be5 Update build failure message.
Have been seeing reports with only the config.log, so change this message.
2012-09-01 09:29:45 -07:00
Max Howell
fd0a5419a9 Blacklist graphviz: don't use superenv
Mysterious link errors due to two missing symbols are too mysterious for me. For now, blacklist.

Fixes Homebrew/homebrew#14566.
2012-09-01 00:27:52 -04:00
Max Howell
429226d562 Hack so that ENV['CFLAGS'] += "foo" always works
So many formula assume CFLAGS etc. are not nil. One fix would be to set them to "" but this would set them in the environment, and that could have consequences for build-scripts. This hack works but with a (hopefully) small caveat.

Fixes Homebrew/homebrew#14580.
2012-08-31 23:45:10 -04:00
Max Howell
75a0708865 superenv wrappers for c89 and c99
Fixes Homebrew/homebrew#14584.
2012-08-31 15:59:05 -04:00
Max Howell
3935a34048 brew -c1 one line configuration summary
At your option: `brew --config -1`.
2012-08-31 15:48:48 -04:00
Max Howell
8a9073fa42 Set VERBOSE and HOMEBREW_LOG in brew sh 2012-08-31 14:12:28 -04:00
Max Howell
30b53cf92a Cram GL headers and includes into superenv
Fixes Homebrew/homebrew#14554.

We justify doing this because pre 10.8 X11 came with GL for all Homebrew-capable systems and as such is a default that we'd prefer not to have to address.
2012-08-31 14:12:28 -04:00
Max Howell
139fcf189c Always make fuss
It's only visible if you specify -v or builds fail, so let's help people to diagnose superenv issues.
2012-08-31 13:29:46 -04:00
Max Howell
282313c68f Remove -fopenmp, fix pixman
Possibly this is not wise, but with -fopenmp -lgomp is automatically added by the toolchain, and I didn't have -lgomp.

Ideally we'd detect when this will work and then leave it in there.

/cc @sharpie @mikemcquaid @jacknagel
2012-08-31 13:29:46 -04:00
Max Howell
9b01e7cd28 Fixes Homebrew/homebrew#14594; superenv recursively finds X11 req 2012-08-31 13:29:46 -04:00
Max Howell
f6ded076df superenv fix for broken 10.8 apr-1-config
serf requires you to explicitly tell it where to find the supertool because otherwise it has a hardcoded /usr/bin/apr-1-config (:P), ctail however is sensible and searches the PATH so now it's as though we do nothing special in that formula. Nice.
2012-08-31 13:29:45 -04:00
Max Howell
ae17944e06 Raise if sdk_path is nil for nclt
This situation should be impossible now (in that, we should detect sdk_path provided we also detected nclt), so if it happens somehow raise in such a way that the user will be encouraged to report the bug.
2012-08-31 10:27:07 -04:00
Max Howell
6c6e82a721 Set VERBOSE if --verbose
You tend to get more useful build output this way, and (more importantly?), superenv itself only outputs certain things if VERBOSE is set.
2012-08-31 10:22:11 -04:00
Max Howell
2856a97ce3 Refs Homebrew/homebrew#14558. Try to find tools when xcrun fails. 2012-08-31 10:22:11 -04:00
Max Howell
b024554872 Remove plain "-O" 2012-08-31 10:22:11 -04:00
Max Howell
b98c4792d0 Doctor check for unlicensed Xcode
Checking the license text is probably the most future proofed method. Though for future reference other possible methods are listed in the below ticket.

Closes Homebrew/homebrew#14558.
2012-08-31 10:22:11 -04:00
Max Howell
1555436f70 MacOS.sdk_path is unlicensed Xcode aware
Now we should get an sdk_path, but tools like xcodebuild, xcode-select and xcrun will still error out. But at least more of Homebrew will work.

Also putting the Xcode 3 path finder last. We get bug reports because newer Xcodes are installed in parallel to older Xcodes. We want to find and use the newer Xcode's first. Xcode.prefix is pretty smart about that.

Refs Homebrew/homebrew#14558.
2012-08-31 10:22:11 -04:00
Max Howell
d39b7b6b99 brew --env puts HOMEBREW_SDKROOT 2012-08-31 10:22:10 -04:00
Max Howell
00df962b6f Consider superenv “servile” during configure
superenv defaults to servile mode. In servile mode:

* If 'gcc' is called, then 'gcc' is run (we ignore HOMEBREW_CC)
* CFLAGS (optimizations) are not applied
* ARGV is not mangled (TODO though we should apply fixes)
* -I and -L environment is still forcibly inserted.

This fixes, eg. jack which was still broken with stdenv. Jack was broken because we set CC in stdenv, and Jack has a stupid build-system. Unsetting CC allowed Jack to find and use the gcc tool it so demanded, but (previously) we would then substitute clang under its nose. The configure still failed. In servile mode (llvm-)gcc is used and Jack compiles.

In normal circumstances clang would then be inserted again during the make phase. But Jack uses the niche-wag build tool that we don't support for setting the O HOMEBREW_CCCFG flag that disables servile mode.
2012-08-31 10:22:10 -04:00
Max Howell
05c708b9fc Revert the user-PATH fix
User paths might have anything in them, anything can break builds.

Instead special case these two formula with the view to having an eventual DSL to allow injection of user paths into superenv. Certainly defaulting to off.
2012-08-31 10:22:10 -04:00
Max Howell
113ed85e8d More brew irb examples 2012-08-31 10:22:10 -04:00
Max Howell
04173d55c2 Hide --disable-debug from non verbose output also 2012-08-31 10:22:09 -04:00
Max Howell
e7c05f558b String.f convenience function for brew irb
eg. "ack".f
2012-08-30 22:54:45 -04:00
Jack Nagel
20fdc5cd2f Simplify brew outdated even further
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-30 20:39:46 -05:00
Max Howell
d4503b1202 Fixes Homebrew/homebrew#14542; ocaml superenv issues
This patch removes most of the settings for CC, CXX etc. because we are trying to be minimal. Then we force the compiler to Homebrew's choice underneath in superenv. We however leave LD because we prefer that build-systems use the c-compiler for linking, it generally works better (copiously tested), however when the build-system explicitly calls ld, we respect that. This gets around the ocaml bug in question, since somehow clang was crashing during link, but the ld tool itself (which is kind of clang, kind of llvm-gcc) is okay with this.

Also moved the setting of O (so that cc-args are refurbished) into a make wrapper. Not sure if this matter much, but seems more consistent.
2012-08-30 20:02:29 -04:00
Jack Nagel
a4ccf68602 superenv: look for pc files under prefix, not repository
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-30 16:08:24 -05:00
Max Howell
8f299d9779 Work for users who delete /usr/bin/ruby
Some people do insane things and are then surprised things break.

Fixes Homebrew/homebrew#14546.
2012-08-30 09:55:33 -04:00
Max Howell
ea12f340e7 Put user's PATHs at end of superenv PATH
Making sure to remove X11, should be safe if this order is kept.

Refs Homebrew/homebrew#14519.
Fixes Homebrew/homebrew#14544.
2012-08-30 09:45:33 -04:00