diff options
| author | Squeeks | 2011-07-18 13:02:11 -0700 |
|---|---|---|
| committer | Misty De Meo | 2011-12-18 00:55:42 -0600 |
| commit | 9600b67ecaf5bbf2d3a115780b1004874893b450 (patch) | |
| tree | 23fd97dac475d68391a3e070eb2ba2cbcee2ab8f /Library/Formula | |
| parent | 006b1afe818a3b2fb3c4fe94f7d05ecf41a4c749 (diff) | |
| download | homebrew-9600b67ecaf5bbf2d3a115780b1004874893b450.tar.bz2 | |
libnfc: add option for PN532 UART support
This option is needed for users of libnfc when using devices connected over
serial with an NXP PN532 chipset - like the microBuilder breakout board:
http://www.microbuilder.eu/Projects/PN532.aspx
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libnfc.rb | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Library/Formula/libnfc.rb b/Library/Formula/libnfc.rb index cc8baf58c..0cdbb321b 100644 --- a/Library/Formula/libnfc.rb +++ b/Library/Formula/libnfc.rb @@ -7,9 +7,25 @@ class Libnfc < Formula depends_on 'libusb-compat' + def options + [ + ['--with-pn532_uart', 'Enable PN532 UART support'], + ] + end + def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" + args = [ + "--prefix=#{prefix}", + "--disable-debug", + "--disable-dependency-tracking" ] + + if ARGV.include? '--with-pn532_uart' + args << "--enable-serial-autoprobe" + args << "--with-drivers=pn532_uart" + end + + system "./configure", *args + system "make install" end end |
