diff options
| author | Adam Vandenberg | 2011-06-19 20:31:35 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-06-19 20:48:53 -0700 |
| commit | 3f7ee57c06b7dd81d9d973d782b84d0aae299f1c (patch) | |
| tree | 541497522b1bd3c6cb88acaa5422733bdfc55d92 /Library | |
| parent | 407c552a199caea7bb573b7bef73985b52396c78 (diff) | |
| download | homebrew-3f7ee57c06b7dd81d9d973d782b84d0aae299f1c.tar.bz2 | |
stone-soup: Fix compilation on Snow Leopard
See: https://github.com/mxcl/homebrew/issues/4296
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/stone-soup.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Formula/stone-soup.rb b/Library/Formula/stone-soup.rb index 25f13cc50..6de9a53f5 100644 --- a/Library/Formula/stone-soup.rb +++ b/Library/Formula/stone-soup.rb @@ -5,8 +5,28 @@ class StoneSoup < Formula homepage 'http://crawl.develz.org/wordpress/' md5 'ffb54c88d280f036a3819cba23bc4489' + # Keep empty folders for save games and such + skip_clean :all + def install Dir.chdir "source" + + # 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 system "make", "prefix=#{prefix}", "SAVEDIR=saves/", "DATADIR=data/", "install" end end |
