aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libsodium.rb
blob: 021cc86e3824cbaccf97a55dcfc1d0b91783bc52 (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
31
32
33
34
require "formula"

class Libsodium < Formula
  homepage "https://github.com/jedisct1/libsodium/"
  url "https://github.com/jedisct1/libsodium/releases/download/1.0.1/libsodium-1.0.1.tar.gz"
  sha256 "c3090887a4ef9e2d63af1c1e77f5d5a0656fadb5105ebb9fb66a302210cb3af5"

  bottle do
    cellar :any
    sha1 "37715a34a7ee3af1b584d4ad1f7ae1561f414a04" => :yosemite
    sha1 "ae23cbaac10d5b77c89e8bc16ac3fbe5f0965633" => :mavericks
    sha1 "d80e8038aed95ccaf681317615346cb0255a52b9" => :mountain_lion
  end

  head do
    url "https://github.com/jedisct1/libsodium.git"

    depends_on "libtool" => :build
    depends_on "autoconf" => :build
    depends_on "automake" => :build
  end

  option :universal

  def install
    ENV.universal_binary if build.universal?
    system "./autogen.sh" if build.head?

    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make", "check"
    system "make", "install"
  end
end