From 4447f78dc78bc16e528d0b40c1042fe8d286be2d Mon Sep 17 00:00:00 2001 From: David Christenson Date: Sat, 24 May 2014 02:56:11 -0600 Subject: libtorrent-rasterbar: add HEAD and geoip option Add svn link and installation procedure, add option to use homebrew’s geoip. Closes #29546. Signed-off-by: Jack Nagel --- Library/Formula/libtorrent-rasterbar.rb | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'Library') diff --git a/Library/Formula/libtorrent-rasterbar.rb b/Library/Formula/libtorrent-rasterbar.rb index eb648412e..ecfec7094 100644 --- a/Library/Formula/libtorrent-rasterbar.rb +++ b/Library/Formula/libtorrent-rasterbar.rb @@ -1,9 +1,16 @@ -require 'formula' +require "formula" class LibtorrentRasterbar < Formula - homepage 'http://www.rasterbar.com/products/libtorrent/' - url 'https://downloads.sourceforge.net/project/libtorrent/libtorrent/libtorrent-rasterbar-0.16.16.tar.gz' - sha1 'de8faed5cbc09baddb2748cb7b75edd07ab0addc' + homepage "http://www.rasterbar.com/products/libtorrent/" + url "https://downloads.sourceforge.net/project/libtorrent/libtorrent/libtorrent-rasterbar-0.16.16.tar.gz" + sha1 "de8faed5cbc09baddb2748cb7b75edd07ab0addc" + + head do + url "http://libtorrent.googlecode.com/svn/trunk" + depends_on "automake" => :build + depends_on "autoconf" => :build + depends_on "libtool" => :build + end bottle do cellar :any @@ -15,6 +22,7 @@ class LibtorrentRasterbar < Formula 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" @@ -36,7 +44,17 @@ class LibtorrentRasterbar < Formula args << "--with-boost-python=boost_python-mt" end - system "./configure", *args + 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 -- cgit v1.2.3