couchdb: replace DATA patch with inreplace

Geocouch uses this formula to get the couchdb source, and this means we
cannot use a DATA patch here since it only exists for the executing
file.

Fixes Homebrew/homebrew#20073.
This commit is contained in:
Jack Nagel 2013-05-26 19:21:08 -05:00
parent 5d69d9de72
commit 7c574fa155

View file

@ -21,11 +21,14 @@ class Couchdb < Formula
depends_on 'erlang'
depends_on 'curl' if MacOS.version == :leopard
# couchdb 1.3.0 supports vendor names and versioning
# in the welcome message
def patches; DATA; end
def install
# couchdb 1.3.0 supports vendor names and versioning
# in the welcome message
inreplace 'etc/couchdb/default.ini.tpl.in' do |s|
s.gsub! '%package_author_name%', 'Homebrew'
s.gsub! '%version%', '%version%-1'
end
if build.devel? or build.head?
# workaround for the auto-generation of THANKS file which assumes
# a developer build environment incl access to git sha
@ -82,20 +85,3 @@ class Couchdb < Formula
EOS
end
end
__END__
diff --git i/etc/couchdb/default.ini.tpl.in w/etc/couchdb/default.ini.tpl.in
index 736d9cd..606e465 100644
--- i/etc/couchdb/default.ini.tpl.in
+++ w/etc/couchdb/default.ini.tpl.in
@@ -2,8 +2,8 @@
; Upgrading CouchDB will overwrite this file.
[vendor]
-name = %package_author_name%
-version = %version%
+name = Homebrew
+version = %version%-1
[couchdb]
database_dir = %localstatelibdir%