2009-10-15 02:35:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Rtorrent < Formula
|
2009-10-15 02:35:31 +00:00
|
|
|
homepage 'http://libtorrent.rakshasa.no/'
|
2012-07-10 19:41:49 +00:00
|
|
|
url 'http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.2.tar.gz'
|
|
|
|
sha1 '2a642d722745091265037ed8929a23c237a3b99f'
|
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-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?
|
2011-04-08 18:16:37 +00:00
|
|
|
if MacOS.leopard?
|
2011-02-16 23:04:31 +00:00
|
|
|
inreplace 'configure' do |s|
|
2012-05-15 21:15:46 +00:00
|
|
|
s.gsub! ' pkg_cv_libcurl_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.15.4" 2>/dev/null`',
|
|
|
|
' pkg_cv_libcurl_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.15.4" | sed -e "s/-arch [^-]*/-arch $(uname -m) /" 2>/dev/null`'
|
2011-02-16 23:04:31 +00:00
|
|
|
end
|
|
|
|
end
|
2010-05-13 05:20:50 +00:00
|
|
|
system "./configure", *args
|
2009-10-15 02:35:31 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|