aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJon Morehouse2014-01-12 12:53:13 -0800
committerMike McQuaid2014-01-13 09:34:40 +0000
commit3ec8966aae0c8ff2e52cef36fff63668ec8e4cca (patch)
treedc7af83f1457d0d00cf1ddbe3d00c7636d57732b /Library
parent588818d8470ad90bb97c79f8b45b08cd88878bea (diff)
downloadhomebrew-3ec8966aae0c8ff2e52cef36fff63668ec8e4cca.tar.bz2
gearman: add postgresql option
Closes #25852. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-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