aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mldonkey.rb
blob: 0291a6f8efa6c0f9a4de8ea140b7f662a1ab1e05 (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
require 'formula'

class Mldonkey < Formula
  homepage 'http://mldonkey.sourceforge.net/Main_Page'
  url 'http://downloads.sourceforge.net/project/mldonkey/mldonkey/3.1.3/mldonkey-3.1.3.tar.bz2'
  sha1 ''

  option "with-x", "Build mldonkey with X11 support"

  depends_on 'objective-caml'
  depends_on :libpng

  if build.include? "with-x"
    depends_on 'librsvg'
    depends_on 'lablgtk'
  end

  def install
    # Fix compiler selection
    ENV['OCAMLC'] = "#{HOMEBREW_PREFIX}/bin/ocamlc.opt -cc #{ENV.cc}"

    args = ["--prefix=#{prefix}"]
    args << "--enable-gui=newgui2" if build.include? "with-x"

    system "./configure", *args
    system "make install"
  end
end