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'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/mldonkey/mldonkey/3.1.3/mldonkey-3.1.3.tar.bz2'
|
2012-08-27 05:24:27 +00:00
|
|
|
sha1 '424386f277e84df55a2cbab213fae60787e42c8b'
|
2012-08-25 18:22:06 +00:00
|
|
|
|
|
|
|
option "with-x", "Build mldonkey with X11 support"
|
2010-08-04 00:00:42 +00:00
|
|
|
|
2013-11-16 03:25:43 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-08-04 00:00:42 +00:00
|
|
|
depends_on 'objective-caml'
|
2013-11-16 03:25:43 +00:00
|
|
|
depends_on 'gd'
|
2012-06-07 01:35:12 +00:00
|
|
|
depends_on :libpng
|
2012-01-30 00:21:08 +00:00
|
|
|
|
2013-11-16 03:25:43 +00:00
|
|
|
if build.with? "x"
|
2011-02-14 22:36:56 +00:00
|
|
|
depends_on 'librsvg'
|
|
|
|
depends_on 'lablgtk'
|
|
|
|
end
|
|
|
|
|
2013-11-16 03:25:43 +00:00
|
|
|
# Fix gd detection, there are various upstream tickets referencing this
|
2014-03-17 02:35:21 +00:00
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/113436/trunk/dports/net/mldonkey/files/patch-config-configure.diff"
|
|
|
|
sha1 "4c2fb3f8337f12533a03940834c1fb4bd7eaa9bf"
|
2013-11-16 03:25:43 +00:00
|
|
|
end
|
|
|
|
|
2010-08-04 00:00:42 +00:00
|
|
|
def install
|
2012-06-12 04:11:22 +00:00
|
|
|
# Fix compiler selection
|
|
|
|
ENV['OCAMLC'] = "#{HOMEBREW_PREFIX}/bin/ocamlc.opt -cc #{ENV.cc}"
|
2012-06-14 02:54:33 +00:00
|
|
|
|
2012-06-12 04:11:22 +00:00
|
|
|
args = ["--prefix=#{prefix}"]
|
2013-11-16 03:25:43 +00:00
|
|
|
args << "--enable-gui=newgui2" if build.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
|