62 lines
1.6 KiB
Ruby
62 lines
1.6 KiB
Ruby
require "formula"
|
|
|
|
class LibtorrentRasterbar < Formula
|
|
homepage "http://www.rasterbar.com/products/libtorrent/"
|
|
url "https://downloads.sourceforge.net/project/libtorrent/libtorrent/libtorrent-rasterbar-1.0.1.tar.gz"
|
|
sha1 "98f0117bb716cc6210d5698068aa491bc0ac8ad0"
|
|
revision 1
|
|
|
|
head do
|
|
url "https://libtorrent.googlecode.com/svn/trunk"
|
|
depends_on "automake" => :build
|
|
depends_on "autoconf" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
bottle do
|
|
cellar :any
|
|
revision 1
|
|
sha1 "969beb9ebd5d43e9883b099f5e437f124ada4eab" => :mavericks
|
|
sha1 "7be7e96575fb8e7ec9e52d095d27088379650460" => :mountain_lion
|
|
sha1 "8146b1dfa41312b545706a9a98cb3cc111c56c89" => :lion
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "openssl"
|
|
depends_on :python => :optional
|
|
depends_on "geoip" => :optional
|
|
|
|
if build.with? "python"
|
|
depends_on "boost" => "with-python"
|
|
else
|
|
depends_on "boost"
|
|
end
|
|
|
|
def install
|
|
boost = Formula["boost"]
|
|
|
|
args = [ "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--with-boost=#{boost.opt_prefix}" ]
|
|
|
|
# Build python bindings requires forcing usage of the mt version of boost_python.
|
|
if build.with? "python"
|
|
args << "--enable-python-binding"
|
|
args << "--with-boost-python=boost_python-mt"
|
|
end
|
|
|
|
if build.with? "geoip"
|
|
args << "--enable-geoip"
|
|
args << "--with-libgeoip"
|
|
end
|
|
|
|
if build.head?
|
|
system "./bootstrap.sh", *args
|
|
else
|
|
system "./configure", *args
|
|
end
|
|
|
|
system "make install"
|
|
end
|
|
end
|