2019-11-14 23:21:07 -05:00
|
|
|
class Trader < Formula
|
|
|
|
desc "Star Traders"
|
|
|
|
homepage "https://www.zap.org.au/projects/trader/"
|
2024-01-30 19:25:35 -05:00
|
|
|
url "https://ftp.zap.org.au/pub/trader/unix/trader-7.20.tar.xz"
|
|
|
|
sha256 "bad368c471d7f4c371fbe8f5da24872f9e3ad609ddb7dad0e015c960c88b3aa9"
|
2022-08-06 01:26:02 -04:00
|
|
|
license "GPL-3.0-or-later"
|
|
|
|
|
|
|
|
livecheck do
|
|
|
|
url :homepage
|
|
|
|
regex(/href=.*?trader[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
|
|
end
|
2019-11-14 23:21:07 -05:00
|
|
|
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "gettext"
|
|
|
|
depends_on "ncurses" # The system version does not work correctly
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.prepend_path "PKG_CONFIG_PATH",
|
|
|
|
Formula["ncurses"].opt_libexec/"lib/pkgconfig"
|
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-silent-rules
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--with-libintl-prefix=#{Formula["gettext"].opt_prefix}
|
|
|
|
]
|
|
|
|
system "./configure", *args
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
# Star Traders is an interactive game, so the only option for testing
|
|
|
|
# is to run something like "trader --version"
|
|
|
|
system "#{bin}/trader", "--version"
|
|
|
|
end
|
|
|
|
end
|