aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libemu.rb
diff options
context:
space:
mode:
authorckenna2010-10-31 18:39:04 -0400
committerAdam Vandenberg2010-11-06 13:34:02 -0700
commitd26b4f6b32df1e813ea6d5ae05cdf0d7b1d6fc26 (patch)
treef08703267c35da254fdc621edfd9ba89decf8904 /Library/Formula/libemu.rb
parent52341f6a6de07484be13dca8631621fe5a647ad4 (diff)
downloadhomebrew-d26b4f6b32df1e813ea6d5ae05cdf0d7b1d6fc26.tar.bz2
Add libemu formula.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/libemu.rb')
-rw-r--r--Library/Formula/libemu.rb31
1 files changed, 31 insertions, 0 deletions
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 <Formula
+ head 'http://git.carnivore.it/libemu.git', :using => :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