aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
AgeCommit message (Collapse)Author
2013-10-06build: fix typoMisty De Meo
2013-10-06Track the OS's default C++ stdlibMisty De Meo
2013-10-06Only track C++ stdlibs for C++ codeMisty De Meo
After a formula is built, scan all mach-o files for dynamic links to see if any of them point to a C++ stdlib (libc++ or libstdc++). If one of them is linked, record that information in the formula's tab. This replaces the old behaviour where all files were assumed to be C++ code, and stdlibs were always tracked regardless of whether they were actually linked against. This also modifies the way that tabs are written - now tabs are written with the stdlib field null, and values are only written if an stdlib is detected.
2013-09-17Move CompilerSelector logic into build env setupMisty De Meo
This moves the CompilerSelector fails_with logic into the build environment setup, making the compiler selection available before performing actions that depends on knowing what the compiler is, e.g. setting up PATH. ENV.setup_build_environment now optionally takes a Formula argument to provide the information necessary to do the fails_with, and the new ENV.validate_cc! extracts the fails_with logic from Build.install.
2013-09-01Check dependencies for a compatible C++ stdlibMisty De Meo
There are now a few possible C++ standard libraries a given build could be using, with subtle incompatibilities and possibility of breakage when mixed. This makes sure that the dependency chain was compiled in a compatible manner. Fortunately all of the Apple compilers use the same libstdc++, and we don't yet support building with libc++, so this will primarily only nag users trying to use GNU gcc who already have software installed with Apple compilers. Future TODOs: * Add general support for building with libc++ (compatibility checking already handled here) * Possibly track formulae which actually build C++ bindings, so that users aren't bothered by spurious nagging re: interpreted languages, pure-C software, etc.
2013-09-01Tab: track C++ stdlib in useMisty De Meo
There are subtle incompatibilities between Apple's libstdc++ and the libstdc++ used by the various GNU GCC formulae. In addition, we'll likely also be supporting libc++ in the future, and that's also incompatible with the other stdlibs. Tracking it in the tab lets us make sure that dependencies are all built against the same stdlib to avoid subtle breakage.
2013-09-01Move Tab creation into build processMisty De Meo
The parent process doesn't have access to the selected compiler, which will be important in the next commit. Fortunately the child process already has a filtered and massaged ARGV, so it has enough information to build the tab itself.
2013-08-19Move common stuff to extend/ENV.rbJack Nagel
2013-08-19Make Superenv activation explicitJack Nagel
2013-07-22Handle optional build-time deps correctlyJack Nagel
2013-06-12Remove unused variableJack Nagel
2013-06-10Cast deps to formula before passing them to superenvJack Nagel
Dependency names retain the "tap prefix", e.g. the "homebrew/dupes" part of "homebrew/dupes/zlib". However formula objects do not, and this is desired because we do not record the tap name as part of the installation prefix. So we need to ensure the correct dep names are passed to superenv, otherwise it will not add the correct directories to various environment variables.
2013-06-03Allow explicit conversion of requirements to depsJack Nagel
Fixes #19857.
2013-05-25build: expand dependencies only onceJack Nagel
Closes #20081.
2013-05-25build: expand requirements only onceJack Nagel
2013-05-25build: make deps an attribute of BuildJack Nagel
2013-05-25build: move build methods into a classJack Nagel
2013-05-20CompilerSelector: raise when no compatible compilerMisty De Meo
This replaces the old behaviour of falling back to the original compiler with no messaging. Fixes #19170. Fixes mistydemeo/tigerbrew#45.
2013-05-20build: use ARGV.interactive? instead of .flag?Jack Nagel
2013-04-02Isolate compiler selector testsJack Nagel
2013-03-16Decouple CompilerSelector from ENVJack Nagel
2013-03-12Switch compilers when no build is specifiedJack Nagel
Given the current state of OS X compilers, the original fails_with behavior is becoming less useful, mostly resulting in build failures each time the compiler is updated. So make the following changes: When a build is specified, we retain the old behavior: switch compilers if the available compiler is <= the build, don't switch if it is > the build. When no build is specified, unconditionally switch compilers, and don't output the advice message. This allows us to mark formulae as perpetually failing, avoiding the need to update formulae each time a new compiler build is made available. As a bonus, this makes the logic much easier to reason about. Closes #18175.
2013-03-09Rename these collections for clarityJack Nagel
2013-03-02Save a subshell hereJack Nagel
2013-02-09build: ignore non-explicit build-time dependenciesJack Nagel
Given the following dependency tree: foo bar (bottled) baz (build-time only) We skip installing baz because it is a build-time dependency of something that is bottled. However, during the build of foo, this filter is not applied because the dependent-dep relationship is not considered at this stage. If baz wasn't installed prior to this build, fixopt(baz) will fail. Further, build-time deps are tightly coupled to the formula they are specified by, and we shouldn't rely on them coming from dependencies several levels down. Fixes #17697.
2013-01-31build: accept X11 proxies as X11 depsJack Nagel
2013-01-26Replace usages of recursive_deps with recursive_dependenciesJack Nagel
2013-01-21build: reorganize #install for readabilityJack Nagel
2013-01-09Set userpaths before processing requirement ENV modificationsJack Nagel
2012-12-26Allow requirements to specify env optionsJack Nagel
2012-11-11Teach Pathname how to scan for metafilesAdam Vandenberg
2012-11-11Use a class for FORMULA_META_FILESAdam Vandenberg
* lets more text types get picked up * better filter for `brew list`
2012-10-28debrew: formula debugging for homebrewCamillo Lugaresi
A new feature for easing the pain of working with complex formulas, or formulas for large packages. When running brew in debug mode (-d), if an exception propagates outside the formula's install method, you now get a menu which lets you return to the point where the exception was raised and perfom several useful actions, such as: - printing a backtrace - entering IRB to examine the context and test ruby code - entering the debugger (if ruby-debug is available) - entering a shell - ignoring the exception or proceeding with the raise as normal Signed-off-by: Max Howell <mxcl@me.com> * Fixed conflict in build.rb. * Removed old debug handling in Formula.brew. Closes #10435.
2012-10-23Make --ignore-dependencies work againAdam Vandenberg
2012-09-25Clean up and improve build-error output and logsMax Howell
All logs are now stored from each command executed in Formula.install. Error output is truncated to five lines in an attempt to not overwhelm the user and to encourage users to read the error output and report the bug properly. Maybe we can get that figure up from 70% to 90%.
2012-09-24Fix fixopt and fixopt error handlingMax Howell
The Keg constructor was throwing because we were returning a relative path, and the error-handler was just returning a string rather than raising a string. Worrying because a lot of opts have not been fixed and I thought this was essential for depending on keg-only formula nowadays. Refs #15077.
2012-09-24Attempt to fix opt-paths for all depsMax Howell
Since we changed superenv to set a PATH without /usr/local, all deps need to have opt paths. Fixes #15077.
2012-09-23superenv: Remove HOMEBREW_PREFIX/bin from PATHMax Howell
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect. I want to go further and only add include paths etc. for dependencies, I have done some work on this, but I fear it may be impossible. If an include path is eg. /usr/local/lib/foo/include, is it possible to know if this path is bad? Not always AFAICT.
2012-09-14Support env :std, :userpathsAdam Vandenberg
Closes #14654.
2012-09-13Install plists in FormulaInstaller, not build.rbMax Howell
Build rb should only build!
2012-09-13ghc requires std-envMax Howell
Because it builds a tool (cabal) that uses the same env that built it to build stuff.
2012-09-13Auctex needs user path; Fixes #14699Max Howell
2012-09-13Apply userpaths after superenv-setupMax Howell
Fixes #14701. Stupid mistake.
2012-09-09Fix code that chmods metafilesAdam Vandenberg
2012-09-09Install plists by defaultAdam Vandenberg
2012-09-03Prevent possible bug in build's optlinkMax Howell
2012-09-02Process requirements before keg-only deps under stdenvJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-01Blacklist graphviz: don't use superenvMax Howell
Mysterious link errors due to two missing symbols are too mysterious for me. For now, blacklist. Fixes #14566.
2012-08-31Fixes #14594; superenv recursively finds X11 reqMax Howell
2012-08-31Revert the user-PATH fixMax Howell
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.