Skip to content

Commit

Permalink
freetds: add "--with-unixodbc"
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
endersonmaia authored and adamv committed Jun 8, 2012
1 parent 6c6650c commit 1dba8b4
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Library/Formula/freetds.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 1dba8b4

Please sign in to comment.