diff options
| author | Max Howell | 2010-01-19 12:31:47 +0000 |
|---|---|---|
| committer | Max Howell | 2010-01-19 12:31:47 +0000 |
| commit | 26a241f21ebec13d65b515e29403a15df76a262f (patch) | |
| tree | a495e5120d796ef84d4e24753f39c8e282761941 /Library | |
| parent | 51dd061f74359b862e475a044da5d1e518179e79 (diff) | |
| download | homebrew-26a241f21ebec13d65b515e29403a15df76a262f.tar.bz2 | |
Force Couchdb to find Spidermonkey and Erlang
If you install Homebrew somewhere that isn't /usr/local couchdb doesn't find its deps, so patch that.
See? Install to /usr/local!
Fixes #180. Closes #493.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/couchdb.rb | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/Library/Formula/couchdb.rb b/Library/Formula/couchdb.rb index ae363dec6..0c37d7459 100644 --- a/Library/Formula/couchdb.rb +++ b/Library/Formula/couchdb.rb @@ -9,18 +9,54 @@ class Couchdb <Formula depends_on 'icu4c' depends_on 'erlang' + def patches; DATA end + def install system "./configure", "--prefix=#{prefix}", "--localstatedir=#{var}", - "--sysconfdir=#{etc}", - "--with-erlang=#{HOMEBREW_PREFIX}/lib/erlang/usr/include" + "--sysconfdir=#{etc}" system "make" system "make install" - couchjs = "#{prefix}/lib/couchdb/bin/couchjs" - system "chmod 755 #{couchjs}" - + (prefix+"lib/couchdb/bin/couchjs").chmod 0755 (var+'lib'+'couchdb').mkpath (var+'log'+'couchdb').mkpath end end + + +# this patch because couchdb doesn't try to find where spidermonkey or erlang +# are installed it just adds a bunch of paths and hopes for the best. However +# for users who install Homebrew somewhere that is non standard, this breaks +__END__ +diff --git a/configure b/configure +index edb6438..472cd2c 100755 +--- a/configure ++++ b/configure +@@ -11240,10 +11240,7 @@ if test "${with_erlang+set}" = set; then : + + else + +- ERLANG_FLAGS="-I${libdir}/erlang/usr/include" +- ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/lib/erlang/usr/include" +- ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/local/lib/erlang/usr/include" +- ERLANG_FLAGS="$ERLANG_FLAGS -I/opt/local/lib/erlang/usr/include" ++ ERLANG_FLAGS="-I$(dirname $(dirname $(which erl)))/lib/erlang/usr/include" + + fi + +@@ -11257,13 +11257,7 @@ if test "${with_js_include+set}" = set; then : + + else + +- JS_FLAGS="-I/usr/include" +- JS_FLAGS="$JS_FLAGS -I/usr/include/js" +- JS_FLAGS="$JS_FLAGS -I/usr/include/mozjs" +- JS_FLAGS="$JS_FLAGS -I/usr/local/include" +- JS_FLAGS="$JS_FLAGS -I/opt/local/include" +- JS_FLAGS="$JS_FLAGS -I/usr/local/include/js" +- JS_FLAGS="$JS_FLAGS -I/opt/local/include/js" ++ JS_FLAGS="-I`js-config --includedir`/js" + + fi + |
