2010-11-21 19:02:51 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class StoneSoup < Formula
|
2011-03-13 03:06:24 +00:00
|
|
|
url 'http://sourceforge.net/projects/crawl-ref/files/Stone%20Soup/0.7.2/stone_soup-0.7.2.tar.bz2'
|
2010-11-21 19:02:51 +00:00
|
|
|
homepage 'http://crawl.develz.org/wordpress/'
|
2011-03-13 03:06:24 +00:00
|
|
|
md5 'ffb54c88d280f036a3819cba23bc4489'
|
2010-11-21 19:02:51 +00:00
|
|
|
|
2011-06-20 03:31:35 +00:00
|
|
|
# Keep empty folders for save games and such
|
|
|
|
skip_clean :all
|
|
|
|
|
2010-11-21 19:02:51 +00:00
|
|
|
def install
|
|
|
|
Dir.chdir "source"
|
2011-06-20 03:31:35 +00:00
|
|
|
|
|
|
|
# Hacks here by Adam V (@flangy) aided by @mistydemeo
|
|
|
|
# Arch / SDK detection is somewhat bogus: 32 vs 64-bit is detected wrong
|
|
|
|
# and the 10.4 SDK is selected too aggressively.
|
|
|
|
# Fix up what it detects
|
|
|
|
target_arch = MacOS.prefer_64_bit? ? "x86_64" : "i386"
|
|
|
|
|
|
|
|
inreplace "makefile" do |s|
|
|
|
|
s.gsub!(
|
|
|
|
"CC = $(GCC) -arch $(ARCH) -isysroot $(SDKROOT) -mmacosx-version-min=$(SDK_VER)",
|
|
|
|
"CC = #{ENV.cc} -arch #{target_arch} -isysroot #{MacOS.xcode_prefix}/SDKs/MacOSX#{MACOS_VERSION}.sdk -mmacosx-version-min=#{MACOS_VERSION}"
|
|
|
|
)
|
|
|
|
s.gsub!(
|
|
|
|
"CXX = $(GXX) -arch $(ARCH) -isysroot $(SDKROOT) -mmacosx-version-min=$(SDK_VER)",
|
|
|
|
"CXX = #{ENV.cxx} -arch #{target_arch} -isysroot #{MacOS.xcode_prefix}/SDKs/MacOSX#{MACOS_VERSION}.sdk -mmacosx-version-min=#{MACOS_VERSION}"
|
|
|
|
)
|
|
|
|
end
|
2010-11-21 19:02:51 +00:00
|
|
|
system "make", "prefix=#{prefix}", "SAVEDIR=saves/", "DATADIR=data/", "install"
|
|
|
|
end
|
|
|
|
end
|