42 lines
1.2 KiB
Ruby
42 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.5.tar.gz"
|
|
sha256 "eeeaad098929a71b5fb42d14e1ca87c73fc08010ab168687bab487a763782ada"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "8439252759c6270ac52ab73af01411898ef22729504f815cb33b923502e0785f" => :mojave
|
|
sha256 "307a0c7faa71eccb19940f85bf16fd785aaea523eacb92c8350700b86458971c" => :high_sierra
|
|
sha256 "0427ed6c3ed89ccfc7a593e499ce8ca0ce1925b52611b59092bbe7b6c7c79174" => :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
|