diff options
author | 2016-01-10 02:34:05 +0600 | |
---|---|---|
committer | 2016-01-10 02:34:05 +0600 | |
commit | 94fd9e733f54413109c2fb0bcbabba23893dfdac (patch) | |
tree | aa21427a6144085c91332b5f109b7ac21e67394e | |
parent | lm4tools (diff) | |
download | activehome-94fd9e733f54413109c2fb0bcbabba23893dfdac.tar.gz activehome-94fd9e733f54413109c2fb0bcbabba23893dfdac.tar.bz2 activehome-94fd9e733f54413109c2fb0bcbabba23893dfdac.zip |
openocd: added
Signed-off-by: Vadim A. Misbakh-Soloviov <git@mva.name>
-rw-r--r-- | dev-embedded/openocd/metadata.xml | 27 | ||||
-rw-r--r-- | dev-embedded/openocd/openocd-9999.ebuild | 119 |
2 files changed, 146 insertions, 0 deletions
diff --git a/dev-embedded/openocd/metadata.xml b/dev-embedded/openocd/metadata.xml new file mode 100644 index 0000000..b1823e2 --- /dev/null +++ b/dev-embedded/openocd/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>dev-embedded</herd> + <maintainer> + <email>fercerpav@gmail.com</email> + <name>Paul Fertser</name> + <description>Upstream contact. CC him on bugs</description> + </maintainer> + <use> + <flag name="blaster">Enable support for Altera USE-Blaster</flag> + <flag name="cmsis-dap">Support for CMSIS-DAP compliant adapters</flag> + <flag name="dummy">Build the dummy port driver</flag> + <flag name="minidriver">Build the dummy minidriver</flag> + <flag name="ftd2xx">Enable support for USB FTDI chips via <pkg>dev-embedded/libftd2xx</pkg></flag> + <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag> + <flag name="parport">Enable support for parport JTAG devices</flag> + <flag name="presto">Enable support for AXIS PRESTO devices</flag> + <flag name="segger">Enable support for the Segger J-Link JTAG</flag> + <flag name="stlink">Enable building support for the ST-Link JTAG Programmer</flag> + <flag name="versaloon">Enable building support for the Versallon-lInk JTAG</flag> + <flag name="verbose-io">Verbose IO and comm JTAG and USB messages</flag> + </use> + <upstream> + <remote-id type="sourceforge">openocd</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/openocd/openocd-9999.ebuild b/dev-embedded/openocd/openocd-9999.ebuild new file mode 100644 index 0000000..34c5a03 --- /dev/null +++ b/dev-embedded/openocd/openocd-9999.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils multilib flag-o-matic toolchain-funcs udev autotools git-r3 +EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code" + +DESCRIPTION="OpenOCD - Open On-Chip Debugger" +HOMEPAGE="http://openocd.sourceforge.net" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="cmsis-dap dummy ftdi parport +usb verbose-io" +RESTRICT="strip" # includes non-native binaries + +RDEPEND=" + >=dev-lang/jimtcl-0.76 + cmsis-dap? ( dev-libs/hidapi ) + usb? ( + virtual/libusb:0 + virtual/libusb:1 + ) + ftdi? ( dev-embedded/libftdi ) +" + +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + >=sys-apps/texinfo-5 +" + +src_prepare() { + epatch_user + AT_NO_RECURSIVE=yes eautoreconf +} + +src_configure() { + # Here are some defaults + local myconf=( + --enable-buspirate + --disable-werror + --disable-internal-jimtcl + --enable-amtjtagaccel + --enable-ep93xx + --enable-at91rm9200 + --enable-gw16012 + --enable-oocd_trace + --enable-arm-jtag-ew + --enable-sysfsgpio + --enable-bcm2835gpio + ) + + # Adapters requiring usb/libusb-1.X support + if use usb; then + myconf+=( + --enable-aice + --enable-usb-blaster-2 + --enable-ftdi + --enable-ti-icdi + --enable-ulink + --enable-osbdm + --enable-opendous + --enable-usbprog + --enable-jlink + --enable-rlink + --enable-stlink + --enable-vsllink + --enable-armjtagew + $(use_enable verbose-io verbose-usb-io) + $(use_enable verbose-io verbose_usb_comms) + ) + else + myconf+=( + --disable-aice + --disable-usb-blaster-2 + --disable-ftdi + --disable-ti-icdi + --disable-ulink + --disable-osbdm + --disable-opendous + --disable-usbprog + --disable-jlink + --disable-rlink + --disable-stlink + --disable-vsllink + --disable-armjtagew + ) + fi + + if use ftdi; then + myconf+=( + --enable-usb_blaster_libftdi + --enable-openjtag_ftdi + --enable-presto_libftdi + ) + else + myconf+=( + --disable-openjtag_ftdi + --disable-presto_libftdi + --disable-usb_blaster_libftdi + ) + fi + + econf \ + $(use_enable dummy) \ + $(use_enable cmsis-dap) \ + $(use_enable parport) \ + $(use_enable parport parport_ppdev) \ + $(use_enable verbose-io verbose-jtag-io) \ + "${myconf[@]}" +} + +src_install() { + default + env -uRESTRICT prepstrip "${ED}"/usr/bin + udev_dorules ${D}/usr/share/${PN}/contrib/*.rules +} |