diff options
| author | Max Howell | 2009-09-16 17:08:32 +0100 |
|---|---|---|
| committer | Max Howell | 2009-09-16 17:08:32 +0100 |
| commit | c71d4ad2bc0a5e29afb9e36d688405c8ce6cd81c (patch) | |
| tree | a23fd0abeae7e3d9b664cbb5261cc09aa873c336 /Library | |
| parent | aafbdcc115d0254010dc63897db8bd7a0c9c5d8e (diff) | |
| download | brew-c71d4ad2bc0a5e29afb9e36d688405c8ce6cd81c.tar.bz2 | |
Default to patch level 1
Having gone through our patches it's clear that p1 is more standard.
Also fixed a bug where returning DATA outside of an array would fail to patch.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index bf7e55865..cd095f05e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -116,7 +116,7 @@ class Formula # } # The final option is to return DATA, then put a diff after __END__ and you # can still return a Hash with DATA as the value for a patch level key. - def patches; [] end + def patches; end # reimplement and specify dependencies def deps; end # sometimes the clean process breaks things, return true to skip anything @@ -254,12 +254,12 @@ private end def patch - return if patches.empty? + return if patches.nil? ohai "Patching" if not patches.kind_of? Hash # We assume -p0 - patch_defns = { :p0 => patches } + patch_defns = { :p1 => patches } else patch_defns = patches end @@ -267,6 +267,9 @@ private patch_list=[] n=0 patch_defns.each do |arg, urls| + # DATA.each does each line, which doesn't work so great + urls = [urls] unless urls.kind_of? Array + urls.each do |url| p = {:filename => '%03d-homebrew.diff' % n+=1, :compression => false} |
