homebrew-core/Formula/lgogdownloader.rb
2017-12-11 06:23:16 -08:00

43 lines
1.2 KiB
Ruby

class Lgogdownloader < Formula
desc "Unofficial downloader for GOG.com games"
homepage "https://sites.google.com/site/gogdownloader/"
url "https://sites.google.com/site/gogdownloader/lgogdownloader-3.3.tar.gz"
sha256 "8bb7a37b48f558bddeb662ebac32796b0ae11fa2cc57a03d48b3944198e800ce"
revision 1
bottle do
cellar :any
sha256 "c144c9bf42f2f146f511c2f4c7bd88bb525d575193852dae63f3b431c1715002" => :high_sierra
sha256 "7c9c8f7d6f9db99fe520026de41eaf31714bb1a82ae8ceda22f094f3695d97e5" => :sierra
sha256 "2de6e7615ad1b203058a785903ad54cb2421dd5d7130f703d975f9d82d1f4766" => :el_capitan
end
depends_on "cmake" => :build
depends_on "help2man" => :build
depends_on "pkg-config" => :build
depends_on "boost"
depends_on "htmlcxx"
depends_on "jsoncpp"
depends_on "liboauth"
depends_on "rhash"
depends_on "tinyxml2"
def install
system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
require "pty"
ENV["XDG_CONFIG_HOME"] = testpath
reader, writer = PTY.spawn(bin/"lgogdownloader", "--list", "--retries", "1")
writer.write <<~EOS
test@example.com
secret
EOS
writer.close
assert_equal "HTTP: Login failed", reader.read.lines.last.chomp
reader.close
end
end