2010-08-04 00:00:42 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mldonkey < Formula
|
2010-08-04 00:00:42 +00:00
|
|
|
homepage 'http://mldonkey.sourceforge.net/Main_Page'
|
2012-06-12 04:11:22 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/mldonkey/mldonkey/3.1.1/mldonkey-3.1.1.tar.bz2'
|
|
|
|
sha1 '2d0bc9f849728528f833e32db3b051aab51b6c7f'
|
2010-08-04 00:00:42 +00:00
|
|
|
|
|
|
|
depends_on 'objective-caml'
|
2012-01-30 00:21:08 +00:00
|
|
|
|
2011-02-14 22:36:56 +00:00
|
|
|
if ARGV.include? "--with-x"
|
|
|
|
depends_on 'librsvg'
|
|
|
|
depends_on 'lablgtk'
|
|
|
|
end
|
|
|
|
|
|
|
|
def options
|
|
|
|
[["--with-x", "Build mldonkey with X11 support"]]
|
|
|
|
end
|
2010-08-04 00:00:42 +00:00
|
|
|
|
|
|
|
def install
|
2012-06-12 04:11:22 +00:00
|
|
|
ENV.libpng
|
|
|
|
|
|
|
|
# Fix compiler selection
|
|
|
|
ENV['OCAMLC'] = "#{HOMEBREW_PREFIX}/bin/ocamlc.opt -cc #{ENV.cc}"
|
|
|
|
inreplace 'Makefile', '-O6', '' if ENV.compiler == :clang
|
2011-02-14 22:36:56 +00:00
|
|
|
|
2012-06-12 04:11:22 +00:00
|
|
|
args = ["--prefix=#{prefix}"]
|
|
|
|
args << "--enable-gui=newgui2" if ARGV.include? "--with-x"
|
2011-02-14 22:36:56 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-08-04 00:00:42 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|