stone-soup: import from homebrew/games.
This commit is contained in:
parent
a4c0927877
commit
0756550d19
1 changed files with 78 additions and 0 deletions
78
Formula/stone-soup.rb
Normal file
78
Formula/stone-soup.rb
Normal file
|
@ -0,0 +1,78 @@
|
|||
class StoneSoup < Formula
|
||||
desc "Dungeon Crawl Stone Soup: a roguelike game"
|
||||
homepage "https://crawl.develz.org/"
|
||||
url "https://crawl.develz.org/release/stone_soup-0.19.1.tar.xz"
|
||||
sha256 "89374dc3e4282c7c2bae911ef780043845cc08cf529f4d54b7d81c0ce8355aa0"
|
||||
|
||||
bottle do
|
||||
sha256 "cb56020ea9672a6d2aead43c16ade6372f72e23fe6cdeb3b4d2a60b7268f73a2" => :sierra
|
||||
sha256 "07b6c62ae5b06c80aa2bb3fb7fdad161d84a498c0b0bfcf2fd81f1e7fab9565e" => :el_capitan
|
||||
sha256 "b0908fc5925eac31cbc296b680cf62172ae2bb40b86d811b78880e2c9de91e37" => :yosemite
|
||||
end
|
||||
|
||||
option "with-tiles", "Enable graphic tiles and sound"
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "lua@5.1"
|
||||
depends_on "pcre"
|
||||
|
||||
if build.with? "tiles"
|
||||
depends_on "sdl2"
|
||||
depends_on "sdl2_mixer"
|
||||
depends_on "sdl2_image"
|
||||
depends_on "libpng"
|
||||
depends_on "freetype"
|
||||
end
|
||||
|
||||
needs :cxx11
|
||||
|
||||
def install
|
||||
ENV.cxx11
|
||||
|
||||
cd "source" do
|
||||
args = %W[
|
||||
prefix=#{prefix}
|
||||
DATADIR=data
|
||||
NO_PKGCONFIG=
|
||||
BUILD_ZLIB=
|
||||
BUILD_LUA=
|
||||
BUILD_SQLITE=yes
|
||||
BUILD_FREETYPE=
|
||||
BUILD_LIBPNG=
|
||||
BUILD_SDL2=
|
||||
BUILD_SDL2MIXER=
|
||||
BUILD_SDL2IMAGE=
|
||||
BUILD_PCRE=
|
||||
USE_PCRE=y
|
||||
]
|
||||
if build.with? "tiles"
|
||||
inreplace "Makefile", "contrib/install/$(ARCH)/lib/libSDL2main.a", ""
|
||||
args << "TILES=y"
|
||||
args << "SOUND=y"
|
||||
end
|
||||
|
||||
# FSF GCC doesn't support the -rdynamic flag
|
||||
args << "NO_RDYNAMIC=y" unless ENV.compiler == :clang
|
||||
|
||||
# The makefile has trouble locating the developer tools for
|
||||
# CLT-only systems, so we set these manually. Reported upstream:
|
||||
# https://crawl.develz.org/mantis/view.php?id=7625
|
||||
#
|
||||
# On 10.9, stone-soup will try to use xcrun and fail due to an empty
|
||||
# DEVELOPER_DIR
|
||||
devdir = MacOS::Xcode.prefix.to_s
|
||||
devdir += "/" if MacOS.version >= :mavericks && !MacOS::Xcode.installed?
|
||||
|
||||
system "make", "install",
|
||||
"DEVELOPER_DIR=#{devdir}", "SDKROOT=#{MacOS.sdk_path}",
|
||||
# stone-soup tries to use `uname -m` to determine build -arch,
|
||||
# which is frequently wrong on OS X
|
||||
"SDK_VER=#{MacOS.version}", "MARCH=#{MacOS.preferred_arch}",
|
||||
*args
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
assert shell_output("#{bin}/crawl --version").start_with? "Crawl version #{version}"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue