aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-29 16:06:06 -0500
committerJack Nagel2014-07-29 16:22:06 -0500
commit3f12ddbccd8416d4355e0fd0efa8f95bc1a7632f (patch)
tree0c4693b736fbe17872487215a6b73ae534b8cecf /Library/Homebrew/formula.rb
parente0c97177170f1238c53d0b9ecca8dd97bf74c03e (diff)
downloadbrew-3f12ddbccd8416d4355e0fd0efa8f95bc1a7632f.tar.bz2
Decouple DATA patches from the executing script
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index ecf5ec6ca..70f9af310 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -212,6 +212,8 @@ class Formula
# any e.g. configure options for this package
def options; [] end
+ # Deprecated
+ DATA = :DATA
def patches; {} end
# rarely, you don't want your library symlinked into the main prefix
@@ -577,6 +579,8 @@ class Formula
active_spec.add_legacy_patches(patches)
return if patchlist.empty?
+ active_spec.patches.grep(DATAPatch).each { |p| p.path = path }
+
active_spec.patches.select(&:external?).each do |patch|
patch.verify_download_integrity(patch.fetch)
end