45 lines
1.3 KiB
Ruby
45 lines
1.3 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.7.tar.gz"
|
|
sha256 "984859eb2e0802cfe6fe76b1fe4b90e7354e95d52c001b6b434e0a9f5ed23bf0"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "bca44f870354015fcb3eb10d3f92ab89d53e9ab5105162a5516bb2e35124328e" => :catalina
|
|
sha256 "fd1a8455473243e5d239fdfca4ef143acf5b09633f08fa67cc56e9196d8fd722" => :mojave
|
|
sha256 "cacd049687f57f97e7de0c0a00601b1f7e3bfdcb1418a633e9bebcf5b402f3ea" => :high_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, "-DJSONCPP_INCLUDE_DIR=#{Formula["jsoncpp"].opt_include}"
|
|
|
|
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
|