diff options
| author | Mike McQuaid | 2013-01-27 19:22:56 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2013-01-29 17:14:11 -0800 |
| commit | 91ccb2136823d5e4e8864c8ebc541bf1d614af52 (patch) | |
| tree | 992f6d7c3353a55ffe85512e02ff3d57581a2fb8 /Library | |
| parent | 3318b08a2e40146a375b4f09d7362d3af667f9d5 (diff) | |
| download | homebrew-91ccb2136823d5e4e8864c8ebc541bf1d614af52.tar.bz2 | |
Add pour_bottle? method to Formula.
Allows a formula to selectively disable bottle pouring.
e.g. the default Boost bottle does not work with a brewed Python.
Fixes #17142
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/boost.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/bottles.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb index 10fe901d6..aea7d0444 100644 --- a/Library/Formula/boost.rb +++ b/Library/Formula/boost.rb @@ -51,6 +51,10 @@ class Boost < Formula cause "Dropped arguments to functions when linking with boost" end + def pour_bottle? + false + end + # Patch boost/config/stdlib/libcpp.hpp to fix the constexpr bug reported under Boost 1.52 in Ticket # 7671. This patch can be removed when upstream release an updated version including the fix. def patches diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 2be2e12d7..88cfc5830 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -15,6 +15,7 @@ def install_bottle? f and f.downloader.local_bottle_path not ARGV.build_from_source? \ and MacOS.bottles_supported? \ + and f.pour_bottle? \ and f.build.used_options.empty? \ and bottle_current?(f) end diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index cc16820ef..37f394ce9 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -162,6 +162,13 @@ class Formula @downloader.cached_location end + # Can be overridden to selectively disable bottles from formulae. + # Defaults to true so overridden version does not have to check if bottles + # are supported. + def pour_bottle? + true + end + # tell the user about any caveats regarding this package, return a string def caveats; nil end |
