2010-10-31 22:39:04 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
def use_python?
|
|
|
|
ARGV.include? '--enable-python-bindings'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libemu < Formula
|
2012-04-19 02:37:43 +00:00
|
|
|
head 'http://git.carnivore.it/libemu.git'
|
2010-10-31 22:39:04 +00:00
|
|
|
homepage 'http://libemu.carnivore.it/'
|
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
|
|
|
|
def options
|
|
|
|
[["--enable-python-bindings", "Compile bindings for Python"]]
|
|
|
|
end
|
|
|
|
|
2012-02-29 01:44:13 +00:00
|
|
|
if MacOS.xcode_version >= "4.3"
|
|
|
|
# remove the autoreconf if possible, no comment provided about why it is there
|
|
|
|
# so we have no basis to make a decision at this point.
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
|
|
|
|
2010-10-31 22:39:04 +00:00
|
|
|
def install
|
|
|
|
inreplace 'Makefile.am' do |s|
|
|
|
|
# Need to fix the static location of pkgconfigpath
|
|
|
|
s.gsub! '/usr/lib/pkgconfig/', "#{lib}/pkgconfig/"
|
|
|
|
end
|
|
|
|
args = ["--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"]
|
|
|
|
args << "--enable-python-bindings" if use_python?
|
|
|
|
|
|
|
|
system "autoreconf -v -i"
|
|
|
|
system "./configure", *args
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|