aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libsodium.rb
blob: 4ef8002dec9fc428be90cf2aeaf1a84a80aebdcc (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
require 'formula'

class Libsodium < Formula
  homepage 'https://github.com/jedisct1/libsodium/'
  url 'https://github.com/jedisct1/libsodium/releases/download/0.5.0/libsodium-0.5.0.tar.gz'
  sha256 '3ca0a0619199a2adb3449eb7f1bf6e1f4fb2ef8514da9133f7f043b8b5cdf9f0'

  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