From bb89b25faa5ef0963593b9e0012817dcf7b66bf0 Mon Sep 17 00:00:00 2001 From: Joel Chippindale Date: Mon, 14 Dec 2009 17:15:00 +0000 Subject: Add ruby-odbc formula --- Library/Formula/ruby-odbc.rb | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Library/Formula/ruby-odbc.rb (limited to 'Library/Formula') diff --git a/Library/Formula/ruby-odbc.rb b/Library/Formula/ruby-odbc.rb new file mode 100644 index 000000000..05361fbb7 --- /dev/null +++ b/Library/Formula/ruby-odbc.rb @@ -0,0 +1,38 @@ +require 'formula' + +class RubyOdbc < Formula + url 'http://www.ch-werner.de/rubyodbc/ruby-odbc-0.9997.tar.gz' + homepage 'http://www.ch-werner.de/rubyodbc/' + md5 '36d21519795c3edc8bc63b1ec6682b99' + + depends_on 'unixodbc' + depends_on 'freetds' + + def install + system "ruby extconf.rb --enable-dlopen --with-odbc-dir=#{HOMEBREW_PREFIX}/lib" + + # extconf.rb assumes it will install ruby-odbc within a folder in your + # current ruby installation. + # + # The following modifications to the Makefile ensure that it is installed + # within your homebrew directories. + inreplace 'Makefile', /^prefix = .*$/, "prefix = #{prefix}" + inreplace 'Makefile', /^sitearchdir = .*$/, "sitearchdir = #{prefix}/lib" + + system 'make' + system 'make install' + end + + def caveats +<