Skip to content

Commit

Permalink
stella 5.0
Browse files Browse the repository at this point in the history
Closes #15876.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information
ilovezfs committed Jul 22, 2017
1 parent ddde272 commit 8aba647
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Formula/stella.rb
@@ -1,8 +1,8 @@
class Stella < Formula
desc "Atari 2600 VCS emulator"
homepage "https://stella-emu.github.io/"
url "https://github.com/stella-emu/stella/releases/download/release-4.7.3/stella-4.7.3-src.tar.xz"
sha256 "93a75d1b343b1e66b6dc526c0f9d8a0c3678d346033f7cdfe76dc93f14d956ad"
url "https://github.com/stella-emu/stella/releases/download/5.0/stella-5.0-src.tar.xz"
sha256 "c21ba87959312f833a5a0e8d73d99cb8fb2ddd312f4e0a7ef0412b445903d0bc"
head "https://github.com/stella-emu/stella.git"

bottle do
Expand All @@ -17,16 +17,20 @@ class Stella < Formula
depends_on "libpng"

def install
sdl2 = Formula["sdl2"]
libpng = Formula["libpng"]
cd "src/macosx" do
inreplace "stella.xcodeproj/project.pbxproj" do |s|
s.gsub! %r{(\w{24} \/\* SDL2\.framework)}, '//\1'
s.gsub! %r{(\w{24} \/\* png)}, '//\1'
s.gsub! /(HEADER_SEARCH_PATHS) = \(/, "\\1 = (#{Formula["sdl2"].include}/SDL2, #{Formula["libpng"].include},"
s.gsub! /(LIBRARY_SEARCH_PATHS) = \.;/, "\\1 = (#{Formula["sdl2"].lib}, #{Formula["libpng"].lib}, .);"
s.gsub! /(HEADER_SEARCH_PATHS) = \(/,
"\\1 = (#{sdl2.opt_include}/SDL2, #{libpng.opt_include},"
s.gsub! /(LIBRARY_SEARCH_PATHS) = ("\$\(LIBRARY_SEARCH_PATHS\)");/,
"\\1 = (#{sdl2.opt_lib}, #{libpng.opt_lib}, \\2);"
s.gsub! /(OTHER_LDFLAGS) = "((-\w+)*)"/, '\1 = "-lSDL2 -lpng \2"'
end
xcodebuild "SYMROOT=build"
prefix.install "build/Default/Stella.app"
prefix.install "build/Release/Stella.app"
bin.write_exec_script "#{prefix}/Stella.app/Contents/MacOS/Stella"
end
end
Expand Down

0 comments on commit 8aba647

Please sign in to comment.