From 8036fd14b6b9ccf9e832a1a225bba75e754b4611 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 6 Feb 2017 10:26:57 +0000 Subject: [PATCH] ninvaders: import from homebrew/games. --- Formula/ninvaders.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Formula/ninvaders.rb diff --git a/Formula/ninvaders.rb b/Formula/ninvaders.rb new file mode 100644 index 0000000000..717fe3c9ef --- /dev/null +++ b/Formula/ninvaders.rb @@ -0,0 +1,22 @@ +class Ninvaders < Formula + desc "Space Invaders in the terminal" + homepage "http://ninvaders.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ninvaders/ninvaders/0.1.1/ninvaders-0.1.1.tar.gz" + sha256 "bfbc5c378704d9cf5e7fed288dac88859149bee5ed0850175759d310b61fd30b" + + def install + ENV.j1 # this formula's build system can't parallelize + inreplace "Makefile" do |s| + s.change_make_var! "CC", ENV.cc + # gcc-4.2 doesn't like the lack of space here + s.gsub! "-o$@", "-o $@" + end + system "make" # build the binary + bin.install "nInvaders" + end + + test do + assert_match "nInvaders #{version}", + shell_output("#{bin}/nInvaders -h 2>&1", 1) + end +end