1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib flag-o-matic toolchain-funcs udev
9 # One ebuild to rule them all
10 if [[ ${PV} == "9999" ]] ; then
11 inherit autotools git-2
12 EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
17 S="${WORKDIR}"/${MY_P}
18 KEYWORDS="~amd64 ~arm ~x86"
19 SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz"
22 DESCRIPTION="OpenOCD - Open On-Chip Debugger"
23 HOMEPAGE="http://openocd.sourceforge.net"
27 IUSE="cmsis-dap dummy ftdi parport +usb verbose-io"
28 RESTRICT="strip" # includes non-native binaries
30 RDEPEND=">=dev-lang/jimtcl-0.76
31 cmsis-dap? ( dev-libs/hidapi )
36 ftdi? ( dev-embedded/libftdi )"
44 if [[ ${PV} == "9999" ]] ; then
45 AT_NO_RECURSIVE=yes eautoreconf
50 # Here are some defaults
54 --disable-internal-jimtcl
65 # Adapters requiring usb/libusb-1.X support
69 --enable-usb-blaster-2
81 $(use_enable verbose-io verbose-usb-io)
82 $(use_enable verbose-io verbose_usb_comms)
87 --disable-usb-blaster-2
104 --enable-usb_blaster_libftdi
105 --enable-openjtag_ftdi
106 --enable-presto_libftdi
110 --disable-openjtag_ftdi
111 --disable-presto_libftdi
112 --disable-usb_blaster_libftdi
117 $(use_enable dummy) \
118 $(use_enable cmsis-dap) \
119 $(use_enable parport) \
120 $(use_enable parport parport_ppdev) \
121 $(use_enable verbose-io verbose-jtag-io) \
127 env -uRESTRICT prepstrip "${ED}"/usr/bin
128 udev_dorules "${D}"/usr/share/${PN}/contrib/*.rules