aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/freetds.rb
diff options
context:
space:
mode:
authorEnderson Maia2012-05-25 12:58:52 -0300
committerAdam Vandenberg2012-06-07 20:52:58 -0700
commit1dba8b4d492172a8c948c1922452dcf03e633502 (patch)
tree2c9116161d6dd946913836fe4e898e00919a572a /Library/Formula/freetds.rb
parent6c6650c77a0b19c772139e77b87d2ba4c7a1ac78 (diff)
downloadhomebrew-1dba8b4d492172a8c948c1922452dcf03e633502.tar.bz2
freetds: add "--with-unixodbc"
Without this option, freetds will compile against other available ODBC, in Mac OS X for example, it will compile against native OS X iodbc installation. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/freetds.rb')
-rw-r--r--Library/Formula/freetds.rb20
1 files changed, 17 insertions, 3 deletions
diff --git a/Library/Formula/freetds.rb b/Library/Formula/freetds.rb
index 7d66972aa..174226e62 100644
--- a/Library/Formula/freetds.rb
+++ b/Library/Formula/freetds.rb
@@ -1,12 +1,26 @@
require 'formula'
class Freetds < Formula
- url 'http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.91.tar.gz'
homepage 'http://www.freetds.org/'
- md5 'b14db5823980a32f0643d1a84d3ec3ad'
+ url 'http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.91.tar.gz'
+ sha1 '3ab06c8e208e82197dc25d09ae353d9f3be7db52'
+
+ depends_on "unixodbc" if ARGV.include? "--with-unixodbc"
+
+ def options
+ [['--with-unixodbc', "Compile against unixODBC."]]
+ end
def install
- system "./configure", "--prefix=#{prefix}", "--with-tdsver=7.1", "--mandir=#{man}"
+ args = ["--prefix=#{prefix}",
+ "--with-tdsver=7.1",
+ "--mandir=#{man}"]
+
+ if ARGV.include? "--with-unixodbc"
+ args << "--with-unixodbc=#{Formula.factory('unixodbc').prefix}"
+ end
+
+ system "./configure", *args
system 'make'
ENV.j1 # Or fails to install on multi-core machines
system 'make install'