aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/vowpal-wabbit.rb
blob: 267b4f7f6962b6b1ddf109955531c3d94938b304 (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 VowpalWabbit < Formula
  homepage 'https://github.com/JohnLangford/vowpal_wabbit'
  url 'https://github.com/JohnLangford/vowpal_wabbit/archive/v7.3.tar.gz'
  sha1 'aa33edcfa8264bdb45c0770b8784cb7ddcdc80e1'

  head do
    url 'https://github.com/JohnLangford/vowpal_wabbit.git'

    depends_on :autoconf
    depends_on :automake
    depends_on :libtool
  end

  depends_on 'boost' => :build

  def install
    if build.head?
      inreplace 'autogen.sh' do |s|
        s.gsub! '/usr/share/aclocal', "#{HOMEBREW_PREFIX}/share/aclocal"
      end
      system "./autogen.sh"
    end

    system "./configure", "--prefix=#{prefix}"
    system "make"
    system "make install"
  end
end