2011-10-18 00:08:46 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Fceux < Formula
|
|
|
|
homepage 'http://fceux.com'
|
2013-02-03 19:06:28 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/fceultra/Source%20Code/2.2.0%20src/fceux-2.2.0.src.tar.gz'
|
|
|
|
sha1 '2af9ae6ce7684d45821b85fe571ee8fa566b3eb0'
|
2011-10-18 00:08:46 +00:00
|
|
|
|
2012-08-28 05:03:58 +00:00
|
|
|
option 'no-gtk', "Build without Gtk+ support"
|
|
|
|
|
2011-10-18 00:08:46 +00:00
|
|
|
depends_on 'scons' => :build
|
|
|
|
depends_on 'sdl'
|
|
|
|
depends_on 'libzip'
|
2012-08-28 05:03:58 +00:00
|
|
|
depends_on 'gtk+' unless build.include? "no-gtk"
|
2013-02-03 19:06:28 +00:00
|
|
|
depends_on 'lua'
|
2012-09-03 11:31:35 +00:00
|
|
|
depends_on :x11
|
2011-10-18 00:08:46 +00:00
|
|
|
|
|
|
|
def install
|
2013-02-03 19:06:28 +00:00
|
|
|
# Propagate PKG_CONFIG_PATH to Scons environment
|
|
|
|
pkg_config_path = "#{MacOS::X11.lib}/pkgconfig:#{ENV['PKG_CONFIG_PATH']}"
|
|
|
|
inreplace "Sconstruct",
|
|
|
|
"env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')",
|
|
|
|
"env.ParseConfig('PKG_CONFIG_PATH=#{pkg_config_path} pkg-config --cflags --libs gtk+-2.0')"
|
|
|
|
|
|
|
|
inreplace "src/drivers/sdl/SConscript",
|
|
|
|
"env.ParseConfig('pkg-config --cflags --libs x11')",
|
|
|
|
"env.ParseConfig('PKG_CONFIG_PATH=#{pkg_config_path} pkg-config --cflags --libs x11')"
|
|
|
|
|
2012-08-28 05:03:58 +00:00
|
|
|
if build.include? "no-gtk"
|
2011-10-18 00:08:46 +00:00
|
|
|
inreplace "SConstruct",
|
|
|
|
"BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),",
|
|
|
|
"BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 0),"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "scons"
|
|
|
|
bin.install 'src/fceux'
|
|
|
|
end
|
|
|
|
end
|