It turned out that the fix is very easy to apply. Only thing you need to do is to open the couchdb.rb file (in /usr/local/Library/Formula) and do the following:
- remove the depends_on 'erlang' line
- edit the call to the configure script so the line --with-erlang points to your erlang installation (mine is in /usr/local/lib/erlang).
Here's the patch:
10d9
< depends_on 'erlang'
16c15
< "--with-erlang=#{HOMEBREW_PREFIX}/lib/erlang/usr/include"
---
> "--with-erlang=/usr/local/lib/erlang/usr/include/"
Now do brew install couchdb and make something wonderful. Don't forget to let me know about it!