homebrew-core/Formula/rtorrent.rb

32 lines
1 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Rtorrent < Formula
url 'http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.9.tar.gz'
homepage 'http://libtorrent.rakshasa.no/'
md5 '629247636cb1210663b52dadbd040a6c'
depends_on 'pkg-config' => :build
depends_on 'libsigc++'
depends_on 'libtorrent'
2010-05-13 05:20:50 +00:00
depends_on 'xmlrpc-c' => :optional
# Upstream says this is fixed in 0.9.x series, so check if this is
# still needed when the next stable rtorrent release is made.
fails_with :clang do
build 318
end
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?
inreplace 'configure' do |s|
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`'
end
end
2010-05-13 05:20:50 +00:00
system "./configure", *args
system "make"
system "make install"
end
end