aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/yasm.rb
blob: 6b010549f28a6245244368a209d74376e7a16c17 (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
35
36
require 'formula'

class Yasm < Formula
  homepage 'http://yasm.tortall.net/'
  url 'http://tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz'
  sha256 '768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31'

  head do
    url 'https://github.com/yasm/yasm.git'

    depends_on 'gettext'
    depends_on :autoconf
    depends_on :automake
  end

  depends_on :python => :optional
  depends_on 'Cython' => :python if build.with? 'python'

  def install
    # https://github.com/Homebrew/homebrew/pull/19593
    ENV.deparallelize
    args = %W[
      --disable-debug
      --prefix=#{prefix}
    ]

    if build.with? 'python'
      args << '--enable-python'
      args << '--enable-python-bindings'
    end

    system './autogen.sh' if build.head?
    system './configure', *args
    system 'make install'
  end
end