From d26b4f6b32df1e813ea6d5ae05cdf0d7b1d6fc26 Mon Sep 17 00:00:00 2001 From: ckenna Date: Sun, 31 Oct 2010 18:39:04 -0400 Subject: Add libemu formula. Signed-off-by: Adam Vandenberg --- Library/Formula/libemu.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Library/Formula/libemu.rb (limited to 'Library/Formula/libemu.rb') diff --git a/Library/Formula/libemu.rb b/Library/Formula/libemu.rb new file mode 100644 index 000000000..bf5d2fa9d --- /dev/null +++ b/Library/Formula/libemu.rb @@ -0,0 +1,31 @@ +require 'formula' + +def use_python? + ARGV.include? '--enable-python-bindings' +end + +class Libemu :git + homepage 'http://libemu.carnivore.it/' + + depends_on 'pkg-config' => :build + + def options + [["--enable-python-bindings", "Compile bindings for Python"]] + end + + 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 -- cgit v1.2.3