2012-12-12 11:07:27 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Twemcache < Formula
|
|
|
|
homepage 'https://github.com/twitter/twemcache'
|
|
|
|
head 'https://github.com/twitter/twemcache.git'
|
2013-06-14 18:37:26 +00:00
|
|
|
url "https://github.com/twitter/twemcache/archive/v2.6.0.tar.gz"
|
|
|
|
sha256 '6e0e9361bda46bdaa577c7eed6cd829aeca442b2c3b4f84b250039c86027ce05'
|
2012-12-12 11:07:27 +00:00
|
|
|
|
|
|
|
option "enable-debug", "Debug mode with assertion panics enabled"
|
|
|
|
|
2013-11-13 17:01:29 +00:00
|
|
|
depends_on :autoconf
|
2012-12-12 11:07:27 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on 'libevent'
|
|
|
|
|
|
|
|
def install
|
|
|
|
# After the deprecation of GitHub Downloads, we don't have distribution
|
|
|
|
# downloads anymore. Everything is now a repository download from version
|
|
|
|
# tags.
|
|
|
|
system "autoreconf", "-ivf"
|
|
|
|
|
|
|
|
args = ["--prefix=#{prefix}"]
|
|
|
|
if build.include? "enable-debug"
|
|
|
|
ENV['CFLAGS'] += "-ggdb3 -O0"
|
|
|
|
args << "--enable-debug=full"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|