Skip to content

Commit

Permalink
libmemcached: add optional sasl support
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#26692.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
znarf authored and MikeMcQuaid committed Feb 24, 2014
1 parent 50eecfb commit 2c04764
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Formula/libmemcached.rb
Expand Up @@ -5,12 +5,24 @@ class Libmemcached < Formula
url 'https://launchpad.net/libmemcached/1.0/1.0.17/+download/libmemcached-1.0.17.tar.gz'
sha1 '1023bc8c738b1f5b8ea2cd16d709ec6b47c3efa8'

depends_on 'memcached'
option "with-sasl", "Build with sasl support"

if build.with? "sasl"
depends_on "memcached" => "enable-sasl"
else
depends_on "memcached"
end

def install
ENV.append_to_cflags "-undefined dynamic_lookup" if MacOS.version <= :leopard

system "./configure", "--prefix=#{prefix}"
args = ["--prefix=#{prefix}"]

if build.with? "sasl"
args << "--with-memcached-sasl=#{Formula.factory("memcached").bin}/memcached"
end

system "./configure", *args
system "make install"
end

Expand Down

0 comments on commit 2c04764

Please sign in to comment.