Last active
March 16, 2016 21:56
-
-
Save luxus/f2cf35f04a08e4a41537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Libtorrent < Formula | |
desc "BitTorrent library" | |
homepage "https://github.com/rakshasa/libtorrent" | |
url "git://github.com/rakshasa/libtorrent.git" | |
#sha256 "2838a08c96edfd936aff8fbf99ecbb930c2bfca3337dd1482eb5fccdb80d5a04" | |
bottle :disable, | |
"Cannot be built with Clang so bottle depends on GCC at runtime." | |
depends_on "autoconf" => :build | |
depends_on "automake" => :build | |
depends_on "libtool" => :build | |
depends_on "pkg-config" => :build | |
depends_on "cppunit" => :build | |
depends_on "pkg-config" => :build | |
depends_on "openssl" | |
# https://github.com/Homebrew/homebrew/issues/24132 | |
fails_with :clang do | |
cause "Causes segfaults at startup/at random." | |
end | |
def install | |
# Currently can't build against libc++; see: | |
# https://github.com/homebrew/homebrew/issues/23483 | |
# https://github.com/rakshasa/libtorrent/issues/47 | |
ENV.libstdcxx if ENV.compiler == :clang | |
system "sh", "autogen.sh" | |
system "./configure", "--prefix=#{prefix}", | |
"--disable-debug", | |
"--disable-dependency-tracking", | |
"--with-kqueue", | |
"--enable-ipv6" | |
system "make" | |
system "make", "install" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rtorrent < Formula | |
desc "Console-based BitTorrent client" | |
homepage "https://github.com/rakshasa/rtorrent" | |
url "git://github.com/rakshasa/rtorrent.git" | |
depends_on "autoconf" => :build | |
depends_on "automake" => :build | |
depends_on "libtool" => :build | |
depends_on "pkg-config" => :build | |
depends_on "cppunit" => :build | |
depends_on "libtorrent" | |
depends_on "xmlrpc-c" => :optional | |
# https://github.com/Homebrew/homebrew/issues/24132 | |
fails_with :clang do | |
cause "Causes segfaults at startup/at random." | |
end | |
def install | |
# Commented out since we're now marked as failing with clang - adamv | |
# ENV.libstdcxx if ENV.compiler == :clang | |
args = ["--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"] | |
args << "--with-xmlrpc-c" if build.with? "xmlrpc-c" | |
if MacOS.version <= :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 | |
system "sh", "autogen.sh" | |
system "./configure", *args | |
system "make" | |
system "make", "install" | |
doc.install "doc/rtorrent.rc" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment