Skip to content

Commit

Permalink
nazghul: import from homebrew/games.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Feb 8, 2017
1 parent d9e24f7 commit 96d26f4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Formula/nazghul.rb
@@ -0,0 +1,42 @@
class Nazghul < Formula
desc "Computer role-playing game engine"
homepage "https://web.archive.org/web/20130402222926/http://myweb.cableone.net/gmcnutt/nazghul.html"
url "https://downloads.sourceforge.net/project/nazghul/nazghul/nazghul-0.7.1/nazghul-0.7.1.tar.gz"
sha256 "f1b62810da52a116dfc1c407dbe683991b1b380ca611f57b5701cfbb803e9d2b"

bottle do
cellar :any
sha256 "463268eb22b46f6197ccfc8c7042306cc63d9da14fb64e39af391fa8e63b4bcd" => :yosemite
sha256 "be226e182e99ef8944baf85c34c46f3820e24ccb3052d1f267d2edc6d313f02c" => :mavericks
sha256 "8212dbd986171a00d9f2a986ef52394daf2cfc98ed20b8697332880cd20f6343" => :mountain_lion
end

depends_on "sdl"
depends_on "sdl_image"
depends_on "sdl_mixer"
depends_on "libpng"

def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-sdltest",
"--bindir=#{libexec}"
# Not sure why the ifdef is commented out in this file
inreplace "src/skill.c", "#include <malloc.h>", ""
system "make", "install"

# installing into libexec then rewriting the wrapper script so the
# program name is 'haxima' rather than 'haxima.sh' and there isn't
# a 'nazghul' executable in bin to confuse the user
(bin/"haxima").write <<-EOS.undent
#!/bin/sh
"/usr/local/Cellar/nazghul/0.7.1/libexec/nazghul" -I "/usr/local/Cellar/nazghul/0.7.1/share/nazghul/haxima" -G "$HOME/.haxima" "$@"
EOS
end

test do
assert_match version.to_s,
shell_output("#{bin}/haxima -v")
end
end

0 comments on commit 96d26f4

Please sign in to comment.