62 lines
1.9 KiB
Ruby
62 lines
1.9 KiB
Ruby
class Freedink < Formula
|
|
desc "Portable version of the Dink Smallwood game engine"
|
|
homepage "https://www.gnu.org/software/freedink/"
|
|
url "https://ftp.gnu.org/gnu/freedink/freedink-109.6.tar.gz"
|
|
sha256 "5e0b35ac8f46d7bb87e656efd5f9c7c2ac1a6c519a908fc5b581e52657981002"
|
|
revision 1
|
|
|
|
livecheck do
|
|
url :stable
|
|
end
|
|
|
|
bottle do
|
|
rebuild 1
|
|
sha256 "b971d9badc94cb0075963c341ed11c1872e3157b279def6d91fd088743b5e5e4" => :catalina
|
|
sha256 "d44bcab516f79beec47a1ebdc8ec68b66071a34e17abb8556407a3656946d454" => :mojave
|
|
sha256 "d022642338ba2979982088f1b65d6230ab71478fdaadfe4966372aa15b909182" => :high_sierra
|
|
end
|
|
|
|
depends_on "glm" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "check"
|
|
depends_on "cxxtest"
|
|
depends_on "fontconfig"
|
|
depends_on "freetype"
|
|
depends_on "gettext"
|
|
depends_on "libzip"
|
|
depends_on "sdl2"
|
|
depends_on "sdl2_gfx"
|
|
depends_on "sdl2_image"
|
|
depends_on "sdl2_mixer"
|
|
depends_on "sdl2_ttf"
|
|
|
|
resource "freedink-data" do
|
|
url "https://ftp.gnu.org/gnu/freedink/freedink-data-1.08.20190120.tar.gz"
|
|
sha256 "715f44773b05b73a9ec9b62b0e152f3f281be1a1512fbaaa386176da94cffb9d"
|
|
end
|
|
|
|
# Patch for recent SDL
|
|
patch :p0 do
|
|
url "https://raw.githubusercontent.com/openbsd/ports/fc8b95c6/games/freedink/game/patches/patch-src_input_cpp"
|
|
sha256 "fa06a8a87bd4f3977440cdde0fb6145b6e5b0005b266b19c059d3fd7c2ff836a"
|
|
end
|
|
|
|
def install
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
resource("freedink-data").stage do
|
|
inreplace "Makefile", "xargs -0r", "xargs -0"
|
|
system "make", "install", "PREFIX=#{prefix}"
|
|
end
|
|
end
|
|
|
|
test do
|
|
assert_match "GNU FreeDink 109.6", shell_output("#{bin}/freedink -vwis")
|
|
assert FileTest.exists?("#{share}/dink/dink/Dink.dat")
|
|
end
|
|
end
|