aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorconscell2014-03-25 22:19:00 +0900
committerAdam Vandenberg2014-04-09 10:35:09 -0700
commit14a4a12861c8c366f6e224bf8d593578165a2b18 (patch)
treed5228af22ce24502727dabaece1352251a20d6be /Library/Formula
parent885395f8d03955209f6d9298ddf0fc96dd78a223 (diff)
downloadhomebrew-14a4a12861c8c366f6e224bf8d593578165a2b18.tar.bz2
PostgreSQL ODBC driver 09.03.0210
Closes #27853. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/psqlodbc.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/Library/Formula/psqlodbc.rb b/Library/Formula/psqlodbc.rb
new file mode 100644
index 000000000..d55fcaa7d
--- /dev/null
+++ b/Library/Formula/psqlodbc.rb
@@ -0,0 +1,33 @@
+require "formula"
+
+class PostgresqlInstalled < Requirement
+ fatal true
+ default_formula "postgresql"
+
+ satisfy { which "pg_config" }
+end
+
+class Psqlodbc < Formula
+ homepage "http://www.postgresql.org/"
+ url "http://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-09.03.0210.tar.gz"
+ sha1 "e1eb147ef0452e1f7b0f9e102dacb5654a580dba"
+
+ depends_on "openssl"
+ depends_on "unixodbc"
+ depends_on PostgresqlInstalled
+
+ def install
+ args = ["--prefix=#{prefix}",
+ "--with-unixodbc=#{Formula['unixodbc'].prefix}"]
+
+ system "./configure", *args
+ 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