aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/vowpal-wabbit.rb
blob: ce7ea66cd0d95a45757f1c0189578426bf952846 (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/tarball/v7.1'
  sha1 'a2a8241654d79fd2c0b14a3907d98f7e87705ba8'

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

  if build.head?
    depends_on :libtool
    depends_on :automake
  end

  depends_on 'boost' => :build

  def install
    if build.head?
      inreplace 'autogen.sh' do |s|
        s.gsub! 'libtoolize', 'glibtoolize'
        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