homebrew-core/Formula/lgogdownloader.rb
2018-11-08 23:08:26 +01: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 5
bottle do
cellar :any
sha256 "fe2649d85f0b99186cc2804a339e6ba650b8d5e2be4800a2ee4ae2391abb3e72" => :mojave
sha256 "b3a4966c5cbcd79be837c92bb997d67d1c768236e29c44b89fa281f757e9879e" => :high_sierra
sha256 "b029b876a5b836f8ec2e89e2fab2c925fe01f8df957b4336cafb1c6029d258d6" => :sierra
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