aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gearman.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Formula/gearman.rb b/Library/Formula/gearman.rb
index 7f7a76e0b..d029c71a9 100644
--- a/Library/Formula/gearman.rb
+++ b/Library/Formula/gearman.rb
@@ -6,17 +6,22 @@ class Gearman < Formula
sha1 '59ec305a4535451c3b51a21d2525e1c07770419d'
option 'with-mysql', 'Compile with MySQL persistent queue enabled'
+ option 'with-postgresql', 'Compile with Postgresql persistent queue enabled'
depends_on 'pkg-config' => :build
depends_on 'boost'
depends_on 'libevent'
depends_on 'ossp-uuid'
depends_on :mysql => :optional
+ depends_on :postgresql => :optional
def install
args = ["--prefix=#{prefix}"]
args << "--without-mysql" unless build.with? 'mysql'
-
+ if build.with? 'postgresql'
+ pg_config = "#{Formula.factory('postgresql').opt_prefix}/bin/pg_config"
+ args << "--with-postgresql=#{pg_config}"
+ end
system "./configure", *args
system "make install"
end