2014-03-25 13:19:00 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Psqlodbc < Formula
|
|
|
|
homepage "http://www.postgresql.org/"
|
2014-10-10 01:45:23 +00:00
|
|
|
url "http://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-09.03.0300.tar.gz"
|
|
|
|
sha1 "0f41b4678b513aa70f14b03803af92a7abf1e179"
|
2014-10-10 01:43:23 +00:00
|
|
|
|
2014-08-22 18:04:07 +00:00
|
|
|
bottle do
|
2014-10-10 01:58:45 +00:00
|
|
|
cellar :any
|
|
|
|
sha1 "f24bdc4d51cd85e391be2e483e9c48858ee71d83" => :mavericks
|
|
|
|
sha1 "9b3f60310f063bb416ecaf32343b31b7f09b1445" => :mountain_lion
|
|
|
|
sha1 "6f463b33df349d2fe20bcb71ec340dc6f425dc36" => :lion
|
2014-08-22 18:04:07 +00:00
|
|
|
end
|
|
|
|
|
2014-03-25 13:19:00 +00:00
|
|
|
depends_on "openssl"
|
|
|
|
depends_on "unixodbc"
|
2014-10-10 01:43:23 +00:00
|
|
|
depends_on :postgresql
|
2014-03-25 13:19:00 +00:00
|
|
|
|
|
|
|
def install
|
2014-10-10 01:45:23 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--with-unixodbc=#{Formula["unixodbc"].prefix}"
|
2014-03-25 13:19:00 +00:00
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
output = `#{Formula['unixodbc'].bin}/dltest #{lib}/psqlodbcw.so`
|
|
|
|
assert_equal "SUCCESS: Loaded #{lib}/psqlodbcw.so\n", output
|
|
|
|
assert_equal 0, $?.exitstatus
|
|
|
|
end
|
|
|
|
end
|