mxcl/homebrew — pull request #9082 by mking (2011-12-11 00:53:53+00:00)
Title: ruby: Remove unrecognized option

I think we can remove the readline options, as `depends_on :readline` already takes care of this (by adding homebrew's readline to CPPFLAGS/LDFLAGS).

To verify, I did a brew install ruby with the new formula (from scratch: no ruby, readline from homebrew).

During the build (after "configuring readline"), I checked the source directory.

> cat /tmp/homebrew-ruby-1.9.3-p0-WOb7/ruby-1.9.3-p0/ext/readline/Makefile | egrep 'CPPFLAGS|ldflags'
CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
ldflags = -L. -L/usr/local/Cellar/readline/6.2.1/lib

After the build, I checked irb; irb works as expected.

Finally, I checked the output of otool:

> otool -L /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/x86_64-darwin11.2.0/readline.bundle
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/x86_64-darwin11.2.0/readline.bundle:
/usr/local/Cellar/ruby/1.9.3-p0/lib/libruby.1.9.1.dylib (compatibility version 1.9.1, current version 1.9.1)
/usr/local/Cellar/readline/6.2.1/lib/libreadline.6.2.dylib (compatibility version 6.0.0, current version 6.2.0)

The correct readline is linked.