aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
AgeCommit message (Collapse)Author
2014-06-20Use multiple argument form of systemJack Nagel
2014-06-09Stop joining symbols to pathnamesJack Nagel
Ruby 2.2's native Pathname#/ accepts only string-like objects.
2014-06-09Use opt shortcut methodsJack Nagel
2014-05-03Remove executable bit from build.rbJack Nagel
- the executed script is the formula file, build.rb is a library - ruby is invoked directly, so it wouldn't need to be executable anyway
2014-04-05Avoid realpath where it is not necessaryJack Nagel
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so only resolving one symlink should suffice, and make it clear what path we are actually interested in.
2014-03-13Use ARGV.envJack Nagel
2014-03-13Allow the debugger to work from inside staged resourcesJack Nagel
References Homebrew/homebrew#23263. Closes Homebrew/homebrew#27445.
2014-03-03Prefer Formula#name method over Formula#to_sJack Nagel
2014-03-03Skip dependency expansion completely when ignore_deps? is trueJack Nagel
2014-02-02C++ stdlibs: issue warning, don't fail the buildMisty De Meo
2014-02-02C++ stdlib check: don't check executables for depsMisty De Meo
This avoids some possible false positives, as happens with, e.g., qt4.
2013-12-09Ensure option names are consistent for default formula requirementsJack Nagel
2013-12-02Don't mutate deps collection when expanding requirementsJack Nagel
Fixes Homebrew/homebrew-science#213.
2013-11-29Revert "FormulaInstaller: flush before closing writes."Jack Nagel
This reverts commit 5ce8f7a3a494e1d8e812369301fd4c4a05a7d9b7.
2013-11-26FormulaInstaller: flush before closing writes.Mike McQuaid
This seems to help the problem with `brew install -v` sometimes truncating output. Closes Homebrew/homebrew#24666.
2013-11-13Prevent deps of build-time deps from leaking into the build environmentJack Nagel
When decided what dependencies should be part of the build environment (and have appropriate entries added to variables like PKG_CONFIG_PATH), we select the entire dependency tree except for (1) inactive optional and recommended deps (2) indirect build-time deps (i.e., build-time deps of other deps) There is a third category that sould be excluded: dependencies of direct build-time deps. These are irrelevant to the build, and including them can cause unexpected linkages.
2013-10-26Move stdlib tracking postinstallMisty De Meo
This moves stdlib tracking after the install completes, which allows the tracking to have access to the actual stdlib in use. This unfortunately means that builds can error out *after* a build, resulting in wasted time; however, it reduces false positives, and the overall user experience is still likely to be better this way.
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 Homebrew/homebrew#19857.
2013-05-25build: expand dependencies only onceJack Nagel
Closes Homebrew/homebrew#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 Homebrew/homebrew#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 Homebrew/homebrew#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 Homebrew/homebrew#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 Homebrew/homebrew#10435.