aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Fertser2014-05-16 17:23:43 +0400
committerAdam Vandenberg2014-05-16 08:57:06 -0700
commita7f7ce8237fba82507f66a67a214481ba9e707a6 (patch)
tree18e54b2acece68534c5ed0f9b18dacbeb963c160
parentace1e7d993f53045c236bc76336c0fb68f9aeb2e (diff)
downloadhomebrew-a7f7ce8237fba82507f66a67a214481ba9e707a6.tar.bz2
open-ocd: bring in line with upstream recommendations
1. Rearrange dependencies based on dependent libraries; 2. Add support for all available adapter drivers. Closes #29312. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/open-ocd.rb51
1 files changed, 19 insertions, 32 deletions
diff --git a/Library/Formula/open-ocd.rb b/Library/Formula/open-ocd.rb
index 0f75ad187..b82d0ab35 100644
--- a/Library/Formula/open-ocd.rb
+++ b/Library/Formula/open-ocd.rb
@@ -10,52 +10,39 @@ class OpenOcd < Formula
depends_on :autoconf
depends_on :automake
- depends_on :libtool
+ depends_on 'texinfo' => :build
end
- option 'enable-cmsis-dap', 'Enable building support for devices using CMSIS-DAP'
- option 'enable-ft2232_libftdi', 'Enable building support for FT2232 based devices with libftdi driver'
- option 'enable-ft2232_ftd2xx', 'Enable building support for FT2232 based devices with FTD2XX driver'
+ option 'with-hidapi', 'Enable building support for devices using HIDAPI (CMSIS-DAP)'
+ option 'with-libftdi', 'Enable building support for libftdi-based drivers (USB-Blaster, ASIX Presto, OpenJTAG)'
+ option 'with-libusb', 'Enable building support for all other USB adapters'
depends_on 'pkg-config' => :build
- depends_on 'libusb-compat'
- depends_on 'libftdi0' if build.include? 'enable-ft2232_libftdi'
- depends_on 'hidapi' if build.include? 'enable-cmsis-dap'
+ depends_on :libtool
+ depends_on 'libusb' => :recommended
+ # some drivers are still not converted to libusb-1.0
+ depends_on 'libusb-compat' if build.with? 'libusb'
+ depends_on 'libftdi' => :recommended
+ depends_on 'hidapi' => :recommended
def install
+ # all the libusb and hidapi-based drivers are auto-enabled when
+ # the corresponding libraries are present in the system
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
- --enable-ftdi
- --enable-arm-jtag-ew
- --enable-jlink
- --enable-rlink
- --enable-stlink
- --enable-ulink
- --enable-usbprog
- --enable-vsllink
- --enable-ep93xx
- --enable-at91rm9200
- --enable-ecosboard
- --enable-opendous
- --enable-osbdm
+ --enable-dummy
--enable-buspirate
+ --enable-jtag_vpi
+ --enable-remote-bitbang
]
- if build.include? "enable-ft2232_libftdi"
- args << "--enable-ft2232_libftdi"
- args << "--enable-presto_libftdi"
+ if build.with? "libftdi"
args << "--enable-usb_blaster_libftdi"
- end
-
- if build.include? "enable-ft2232_ftd2xx"
- args << "--enable-ft2232_ftd2xx"
- args << "--enable-presto_ftd2xx"
- end
-
- if build.include? "enable-cmsis-dap"
- args << "--enable-cmsis-dap"
+ args << "--enable-presto_libftdi"
+ args << "--enable-openjtag_ftdi"
+ args << "--enable-legacy-ft2232_libftdi"
end
ENV['CCACHE'] = 'none'