libemu: use new dsl

master
Adam Vandenberg 2012-09-03 14:02:15 -07:00
parent 1a9f5bd8ed
commit 37bfac48f9
1 changed files with 8 additions and 13 deletions

View File

@ -1,19 +1,12 @@
require 'formula'
def use_python?
ARGV.include? '--enable-python-bindings'
end
class Libemu < Formula
head 'http://git.carnivore.it/libemu.git'
homepage 'http://libemu.carnivore.it/'
option "enable-python-bindings", "Compile bindings for Python"
depends_on 'pkg-config' => :build
def options
[["--enable-python-bindings", "Compile bindings for Python"]]
end
depends_on :automake
depends_on :libtool
@ -22,10 +15,12 @@ class Libemu < Formula
# 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?
args = %W[
--disable-debug
--disable-dependency-tracking
--prefix=#{prefix}
]
args << "--enable-python-bindings" if build.include? 'enable-python-bindings'
system "autoreconf -v -i"
system "./configure", *args