aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/twemcache.rb
blob: a4aa8cdb0fda4ad69412c97c9fae4d6e89148f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'formula'

class Twemcache < Formula
  homepage 'https://github.com/twitter/twemcache'
  head 'https://github.com/twitter/twemcache.git'
  url "https://github.com/twitter/twemcache/archive/v2.5.3.tar.gz"
  sha256 '05371d9ed123e01286ea74d9bd1af892be548b84bb24da98118a67a1ec876845'

  option "enable-debug", "Debug mode with assertion panics enabled"

  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