diff --git a/Formula/libtorrent-rasterbar.rb b/Formula/libtorrent-rasterbar.rb index 503ef3dfaeb95..f00e20e5836e9 100644 --- a/Formula/libtorrent-rasterbar.rb +++ b/Formula/libtorrent-rasterbar.rb @@ -1,11 +1,20 @@ class LibtorrentRasterbar < Formula desc "C++ bittorrent library with Python bindings" homepage "https://www.libtorrent.org/" - url "https://github.com/arvidn/libtorrent/releases/download/v2.0.6/libtorrent-rasterbar-2.0.6.tar.gz" - sha256 "438e29272ff41ccc68ec7530f1b98d639f6d01ec8bf680766336ae202a065722" license "BSD-3-Clause" + revision 1 head "https://github.com/arvidn/libtorrent.git", branch: "RC_2_0" + stable do + url "https://github.com/arvidn/libtorrent/releases/download/v2.0.6/libtorrent-rasterbar-2.0.6.tar.gz" + sha256 "438e29272ff41ccc68ec7530f1b98d639f6d01ec8bf680766336ae202a065722" + + patch do + url "https://github.com/arvidn/libtorrent/commit/a5925cfc862923544d4d2b4dc5264836e2cd1030.patch?full_index=1" + sha256 "cbcbb988d5c534f0ee97da7cbbc72bcd7a10592c5619970b5330ab646ffc7c52" + end + end + livecheck do url :stable regex(/^v?(\d+(?:[._]\d+)+)$/i) @@ -29,21 +38,17 @@ class LibtorrentRasterbar < Formula conflicts_with "libtorrent-rakshasa", because: "they both use the same libname" def install - args = %w[ + args = %W[ -DCMAKE_CXX_STANDARD=14 -Dencryption=ON -Dpython-bindings=ON -Dpython-egg-info=ON -DCMAKE_INSTALL_RPATH=#{lib} ] - args += std_cmake_args - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" libexec.install "examples" end