2009-10-15 02:35:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Rtorrent <Formula
|
2010-02-20 05:28:33 +00:00
|
|
|
url 'http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz'
|
2009-10-15 02:35:31 +00:00
|
|
|
homepage 'http://libtorrent.rakshasa.no/'
|
2010-02-20 05:28:33 +00:00
|
|
|
md5 'b804c45c01c40312926bcea6b55bb084'
|
2009-10-15 02:35:31 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2009-10-15 02:35:31 +00:00
|
|
|
depends_on 'libsigc++'
|
|
|
|
depends_on 'libtorrent'
|
2010-05-13 05:20:50 +00:00
|
|
|
depends_on 'xmlrpc-c' => :optional
|
2009-10-15 02:35:31 +00:00
|
|
|
|
|
|
|
def install
|
2010-08-11 16:58:02 +00:00
|
|
|
if Formula.factory('ncursesw').installed?
|
|
|
|
opoo "Compiling rtorrent with ncursesw installed can segfault at runtime"
|
|
|
|
puts "You may need to do:"
|
|
|
|
puts " brew unlink ncursesw"
|
|
|
|
puts " brew install rtorrent"
|
|
|
|
puts " brew link ncursesw"
|
|
|
|
puts "for rtorrent to compile correctly."
|
|
|
|
end
|
|
|
|
|
2010-05-13 05:20:50 +00:00
|
|
|
args = ["--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"]
|
|
|
|
args << "--with-xmlrpc-c" if Formula.factory("xmlrpc-c").installed?
|
|
|
|
system "./configure", *args
|
2009-10-15 02:35:31 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|