From 560811c38d143a0afa62451004e1891022a9f351 Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Sat, 8 Aug 2015 10:31:35 -0700 Subject: [PATCH] libtorrent-rasterbar 1.0.6 Closes Homebrew/homebrew#42659. --- Formula/libtorrent-rasterbar.rb | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/Formula/libtorrent-rasterbar.rb b/Formula/libtorrent-rasterbar.rb index de948e84d5..9b5c8bc1e3 100644 --- a/Formula/libtorrent-rasterbar.rb +++ b/Formula/libtorrent-rasterbar.rb @@ -1,15 +1,9 @@ class LibtorrentRasterbar < Formula desc "C++ bittorrent library by Rasterbar Software" homepage "http://sourceforge.net/projects/libtorrent/" - url "https://downloads.sourceforge.net/project/libtorrent/libtorrent/libtorrent-rasterbar-1.0.5.tar.gz" - sha256 "474a43da2147bec7e333c10f70b07221f4732dd67e071d5e90acc7edb8f657b0" - - head do - url "https://libtorrent.googlecode.com/svn/trunk" - depends_on "automake" => :build - depends_on "autoconf" => :build - depends_on "libtool" => :build - end + url "https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_0_6/libtorrent-rasterbar-1.0.6.tar.gz" + mirror "https://mirrors.kernel.org/debian/pool/main/libt/libtorrent-rasterbar/libtorrent-rasterbar_1.0.6.orig.tar.gz" + sha256 "c97de804b77f44591801631aca3869567671df2d3e2afe7f5453d8db2478fd61" bottle do cellar :any @@ -18,6 +12,13 @@ class LibtorrentRasterbar < Formula sha256 "362267d8573028a6407f68bd7c75c79a3af1ec5e02c7babb11a56b5948451b37" => :mountain_lion end + head do + url "https://github.com/arvidn/libtorrent.git" + depends_on "automake" => :build + depends_on "autoconf" => :build + depends_on "libtool" => :build + end + depends_on "pkg-config" => :build depends_on "openssl" depends_on :python => :optional @@ -51,5 +52,15 @@ class LibtorrentRasterbar < Formula end system "make", "install" + libexec.install "examples" + end + + test do + system ENV.cxx, "-L#{lib}", "-ltorrent-rasterbar", + "-I#{Formula["boost"].include}/boost", + "-L#{Formula["boost"].lib}/boost/bind", "-lboost_system", + libexec/"examples/make_torrent.cpp", "-o", "test" + system "./test", test_fixtures("test.mp3"), "-o", "test.torrent" + File.exist? testpath/"test.torrent" end end