Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate OpenMSX from homebrew-games #9882

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Formula/openmsx.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
class Openmsx < Formula
desc "MSX emulator"
homepage "http://openmsx.org/"
url "https://github.com/openMSX/openMSX/releases/download/RELEASE_0_13_0/openmsx-0.13.0.tar.gz"
sha256 "41e37c938be6fc9f90659f8808418133601a85475058725d3e0dccf2902e62cb"
head "https://github.com/openMSX/openMSX.git"

deprecated_option "without-opengl" => "without-glew"

option "without-glew", "Disable OpenGL post-processing renderer"
option "with-laserdisc", "Enable Laserdisc support"

depends_on "sdl"
depends_on "sdl_ttf"
depends_on "freetype"
depends_on "libpng"
depends_on "glew" => :recommended

if build.with? "laserdisc"
depends_on "libogg"
depends_on "libvorbis"
depends_on "theora"
end

def install
# Fixes a clang crash; this is an LLVM/Apple bug, not an openmsx bug
# https://github.com/Homebrew/homebrew-core/pull/9753
# Filed with Apple: rdar://30475877
ENV.O0

inreplace "build/custom.mk", "/opt/openMSX", prefix
# Help finding Tcl
inreplace "build/libraries.py", /\((distroRoot), \)/, "(\\1, '/usr', '#{MacOS.sdk_path}/usr')"
system "./configure"
system "make"
prefix.install Dir["derived/**/openMSX.app"]
bin.write_exec_script "#{prefix}/openMSX.app/Contents/MacOS/openmsx"
end

test do
system "#{bin}/openmsx", "-testconfig"
end
end