summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-embedded/openocd')
-rw-r--r--dev-embedded/openocd/Manifest5
-rw-r--r--dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch66
-rw-r--r--dev-embedded/openocd/metadata.xml27
-rw-r--r--dev-embedded/openocd/openocd-0.5.0.ebuild77
-rw-r--r--dev-embedded/openocd/openocd-0.6.1.ebuild104
-rw-r--r--dev-embedded/openocd/openocd-0.7.0-r1.ebuild119
-rw-r--r--dev-embedded/openocd/openocd-0.8.0.ebuild132
-rw-r--r--dev-embedded/openocd/openocd-0.9.0.ebuild128
-rw-r--r--dev-embedded/openocd/openocd-9999.ebuild129
9 files changed, 787 insertions, 0 deletions
diff --git a/dev-embedded/openocd/Manifest b/dev-embedded/openocd/Manifest
new file mode 100644
index 000000000000..7a2c63bad17b
--- /dev/null
+++ b/dev-embedded/openocd/Manifest
@@ -0,0 +1,5 @@
+DIST openocd-0.5.0.tar.bz2 2228655 SHA256 0bc122f98a6cd68c4392f6265d480b0e875ff54203ec05a5a52d23900903a78d SHA512 8e2e168a35bf3f753683115fd5f4d4c79e54cd0fe5d072921475d43880619e5b4ab60f28d97a4a595d4b77938b9218e689013f66a925ee8007e6499f5b42448c WHIRLPOOL 84b6a4a9089542904865400ede82be00c4417519f0c9fc42cbb25ae671f621651e9b27f57c2a1e7f37102d53095bcb8e37601e8ed47ddf1ea82b76676b35e7aa
+DIST openocd-0.6.1.tar.bz2 3431071 SHA256 f4c4cc7445ad79cfba1bb24208e79c66edf9dc0c46b3c8fca391f4e41c942f2b SHA512 59f35750f761d3f2ce7a32ffdc5028d053fda2bd9424cc4497f528ec628ac1f022662d9f226dd2b04a8cd682a5cd056a09de14d50e1090426a816bb602f98250 WHIRLPOOL 81d43ce9866960edb7fdaefc5ec088852aaa79e86add67ea9682f26eb5f5d3e7c7523fde0729e15949af165470b44ded45b9d79662f651db56fd109db5074cad
+DIST openocd-0.7.0.tar.bz2 3493924 SHA256 52237b786530c8460b221556c26fa4779f668b7dcb83ff14b8c5eb2050f38e63 SHA512 bfba267e5cda558b347f6fab1a286353b97d81093c0457ac044667baa369f5cd47a07b3ce6a1ceb66e7992c2e4224765458dd859d0a6fa748ad8e6f80ea541ad WHIRLPOOL eb83e201becb22a72ad954bdd5e66e61e587b42856244e4fdce59af5d263a2879cb8e0d89e10bcff515cff199580997c1c6635064601ad31a803b19dd9c99702
+DIST openocd-0.8.0.tar.gz 4821738 SHA256 e27ce4819e0227e602063f212fd4e795e307d5480095c9d406bd0d305ddf4f67 SHA512 9130b683394c4d99cd4c5365ba2bbe07ca8bdf0d02bdd4504b0f5f376209e787955d725c11d811f8937b7b0fc207c8d02e0b7484607edd2f68b2d00d48250f2c WHIRLPOOL 2e71c4b5965de6e3c0541ca13c100626c1435edc34e2bd81426921fa2fce228b101666f29abb56890d5e7aae7322cbff17f7968c78bd0f8db7a43acc733a0868
+DIST openocd-0.9.0.tar.gz 4970346 SHA256 840ed225216f49f5c07bda8b2cbb5c8384bb4d8724335dcccf26787fa0650513 SHA512 698b43867f8134da43a50f5d2ff2ae33b71df8ccffc45fb5c3d0bd7a6289fcd9e7bb3d89287ad4dbdb02e1871db69f3913db950965335eaf8559247f2e58c227 WHIRLPOOL 4a87f463c944a8508fe1d8276592230cb1341f664591b57f4ba9eebf15ba64bcad61f08ee909b40151fd2b2a83587896b6511092bc3fff5075f38e0d0c367eb2
diff --git a/dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch b/dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch
new file mode 100644
index 000000000000..1791cabc66fb
--- /dev/null
+++ b/dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch
@@ -0,0 +1,66 @@
+Apply upstream patch for jimtcl-0.75 compatibility
+
+X-Gentoo-Bug: 509902
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=509902
+Link: http://repo.or.cz/w/openocd.git/commitdiff/92ea548aafee840e1507306a3ffb38625f427ec5
+
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+
+From 92ea548aafee840e1507306a3ffb38625f427ec5 Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Mon, 28 Apr 2014 14:34:47 +0400
+Subject: [PATCH] Update to the current Jim Tcl
+
+This is a post-release version but hopefully some fixes that went in
+are worth it; also the changes here make OpenOCD compatible with stock
+0.75 version if a distro maintainer decides to use it.
+
+Change-Id: I7ad1814c7c4868198475cdca4750c3d0ee4f5f8b
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+Reviewed-on: http://openocd.zylin.com/2121
+Tested-by: jenkins
+Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
+---
+ jimtcl | 2 +-
+ src/helper/command.c | 2 +-
+ src/helper/command.h | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/helper/command.c b/src/helper/command.c
+index 21362a6..137ac7e 100644
+--- a/src/helper/command.c
++++ b/src/helper/command.c
+@@ -365,7 +365,7 @@ static int register_command_handler(struct command_context *cmd_ctx,
+
+ LOG_DEBUG("registering '%s'...", ocd_name);
+
+- Jim_CmdProc func = c->handler ? &script_command : &command_unknown;
++ Jim_CmdProc *func = c->handler ? &script_command : &command_unknown;
+ int retval = Jim_CreateCommand(interp, ocd_name, func, c, NULL);
+ free(ocd_name);
+ if (JIM_OK != retval)
+diff --git a/src/helper/command.h b/src/helper/command.h
+index 0f0edbb..0eda5b5 100644
+--- a/src/helper/command.h
++++ b/src/helper/command.h
+@@ -168,7 +168,7 @@ struct command {
+ struct command *parent;
+ struct command *children;
+ command_handler_t handler;
+- Jim_CmdProc jim_handler;
++ Jim_CmdProc *jim_handler;
+ void *jim_handler_data;
+ enum command_mode mode;
+ struct command *next;
+@@ -204,7 +204,7 @@ char *command_name(struct command *c, char delim);
+ struct command_registration {
+ const char *name;
+ command_handler_t handler;
+- Jim_CmdProc jim_handler;
++ Jim_CmdProc *jim_handler;
+ void *jim_handler_data;
+ enum command_mode mode;
+ const char *help;
+--
+1.7.6.6.GIT
+
diff --git a/dev-embedded/openocd/metadata.xml b/dev-embedded/openocd/metadata.xml
new file mode 100644
index 000000000000..b1823e2c1b06
--- /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-0.5.0.ebuild b/dev-embedded/openocd/openocd-0.5.0.ebuild
new file mode 100644
index 000000000000..9f5c5cd2cd08
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.5.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multilib
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://${PN}.git.sourceforge.net/gitroot/${PN}/${PN}"
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="blaster dummy ftd2xx ftdi minidriver parport presto segger usb versaloon"
+RESTRICT="strip" # includes non-native binaries
+
+# libftd2xx is the default because it is reported to work better.
+DEPEND="<dev-lang/jimtcl-0.73
+ usb? ( virtual/libusb:0 )
+ presto? ( dev-embedded/libftd2xx )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ ftdi? ( dev-embedded/libftdi )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="blaster? ( || ( ftdi ftd2xx ) ) ftdi? ( !ftd2xx )"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e "/@include version.texi/d" doc/${PN}.texi || die
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ myconf="--enable-buspirate --enable-ioutil --disable-werror
+ --disable-internal-jimtcl --enable-amtjtagaccel
+ --enable-ep93xx --enable-at91rm9200 --enable-gw16012
+ --enable-oocd_trace"
+
+ if use usb; then
+ myconf="${myconf} --enable-usbprog --enable-jlink --enable-rlink \
+ --enable-vsllink --enable-arm-jtag-ew"
+ fi
+
+ # add explicitely the path to libftd2xx
+ use ftd2xx && LDFLAGS="${LDFLAGS} -L/opt/$(get_libdir)"
+
+ if use blaster; then
+ use ftdi && myconf="${myconf} --enable-usb_blaster_libftdi"
+ use ftd2xx && myconf="${myconf} --enable-usb_blaster_ftd2xx"
+ fi
+ econf \
+ $(use_enable dummy) \
+ $(use_enable ftdi ft2232_libftdi) \
+ $(use_enable ftd2xx ft2232_ftd2xx) \
+ $(use_enable minidriver minidriver-dummy) \
+ $(use_enable parport) \
+ $(use_enable presto presto_ftd2xx) \
+ $(use_enable segger jlink) \
+ $(use_enable versaloon vsllink) \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO || die
+ prepstrip "${D}"/usr/bin
+}
diff --git a/dev-embedded/openocd/openocd-0.6.1.ebuild b/dev-embedded/openocd/openocd-0.6.1.ebuild
new file mode 100644
index 000000000000..9b323c7f302c
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.6.1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multilib flag-o-matic toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://${PN}.git.sourceforge.net/gitroot/${PN}/${PN}"
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="blaster dummy ftd2xx ftdi minidriver parport presto segger stlink usb versaloon"
+RESTRICT="strip" # includes non-native binaries
+
+# libftd2xx is the default because it is reported to work better.
+DEPEND=">=dev-lang/jimtcl-0.73
+ usb? ( virtual/libusb:0 )
+ presto? ( dev-embedded/libftd2xx )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ ftdi? ( dev-embedded/libftdi )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="blaster? ( || ( ftdi ftd2xx ) ) ftdi? ( !ftd2xx )"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e "/@include version.texi/d" doc/${PN}.texi || die
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+
+ # Disable craptastic build settings.
+ sed -i \
+ -e 's:if test "[$]OCDxprefix" != "[$]ac_default_prefix":if false:' \
+ configure || die
+
+ if use ftdi ; then
+ local pc="libftdi$(has_version '=dev-embedded/libftdi-1*' && echo 1)"
+ # Use libftdi-1 paths #460916
+ local libs=$($(tc-getPKG_CONFIG) --libs ${pc})
+ sed -i \
+ -e "s:-lftdi -lusb:${libs}:" \
+ configure src/Makefile.in || die
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags ${pc})
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ local myconf=(
+ --enable-buspirate
+ --enable-ioutil
+ --disable-werror
+ --disable-internal-jimtcl
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --enable-oocd_trace
+ )
+
+ if use usb; then
+ myconf+=(
+ --enable-usbprog
+ --enable-jlink
+ --enable-rlink
+ --enable-vsllink
+ --enable-arm-jtag-ew
+ )
+ fi
+
+ # add explicitely the path to libftd2xx
+ use ftd2xx && append-ldflags -L/opt/$(get_libdir)
+
+ if use blaster; then
+ use ftdi && myconf+=( --enable-usb_blaster_libftdi )
+ use ftd2xx && myconf+=( --enable-usb_blaster_ftd2xx )
+ fi
+ econf \
+ $(use_enable dummy) \
+ $(use_enable ftdi ft2232_libftdi) \
+ $(use_enable ftd2xx ft2232_ftd2xx) \
+ $(use_enable minidriver minidriver-dummy) \
+ $(use_enable parport) \
+ $(use_enable presto presto_ftd2xx) \
+ $(use_enable stlink) \
+ $(use_enable segger jlink) \
+ $(use_enable versaloon vsllink) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ default
+ env -uRESTRICT prepstrip "${ED}"/usr/bin "${ED}"/usr/$(get_libdir)
+}
diff --git a/dev-embedded/openocd/openocd-0.7.0-r1.ebuild b/dev-embedded/openocd/openocd-0.7.0-r1.ebuild
new file mode 100644
index 000000000000..a8eca858c257
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.7.0-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="blaster dummy ftd2xx ftdi minidriver parport presto segger stlink usb versaloon verbose-io"
+RESTRICT="strip" # includes non-native binaries
+
+# libftd2xx is the default because it is reported to work better.
+DEPEND=">=dev-lang/jimtcl-0.73
+ usb? ( virtual/libusb:0 )
+ presto? ( dev-embedded/libftd2xx )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ ftdi? ( dev-embedded/libftdi )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="blaster? ( || ( ftdi ftd2xx ) ) ftdi? ( !ftd2xx )"
+
+src_prepare() {
+ epatch_user
+
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e "/@include version.texi/d" doc/${PN}.texi || die
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+
+ # Disable craptastic build settings.
+ sed -i \
+ -e 's:if test "[$]OCDxprefix" != "[$]ac_default_prefix":if false:' \
+ configure || die
+
+ if use ftdi ; then
+ local pc="libftdi$(has_version '=dev-embedded/libftdi-1*' && echo 1)"
+ # Use libftdi-1 paths #460916
+ local libs=$($(tc-getPKG_CONFIG) --libs ${pc})
+ sed -i \
+ -e "s:-lftdi -lusb:${libs}:" \
+ configure src/Makefile.in || die
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags ${pc})
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ local myconf=(
+ --enable-buspirate
+ --enable-ioutil
+ --disable-werror
+ --disable-internal-jimtcl
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --enable-oocd_trace
+ --enable-ulink
+ --enable-arm-jtag-ew
+ --enable-ti-icdi
+ --enable-osbdm
+ --enable-opendous
+ )
+
+ if use usb; then
+ myconf+=(
+ --enable-usbprog
+ --enable-jlink
+ --enable-rlink
+ --enable-vsllink
+ --enable-arm-jtag-ew
+ $(use_enable verbose-io verbose-usb-io)
+ $(use_enable verbose-io verbose_usb_comms)
+ )
+ fi
+
+ # add explicitely the path to libftd2xx
+ use ftd2xx && append-ldflags -L/opt/$(get_libdir)
+
+ if use blaster; then
+ use ftdi && myconf+=( --enable-usb_blaster_libftdi )
+ use ftd2xx && myconf+=( --enable-usb_blaster_ftd2xx )
+ fi
+ econf \
+ $(use_enable dummy) \
+ $(use_enable ftdi ft2232_libftdi) \
+ $(use_enable ftdi) \
+ $(use_enable ftd2xx ft2232_ftd2xx) \
+ $(use_enable minidriver minidriver-dummy) \
+ $(use_enable parport) \
+ $(use_enable parport parport_ppdev) \
+ $(use_enable parport parport_giveio) \
+ $(use_enable presto presto_ftd2xx) \
+ $(use_enable segger jlink) \
+ $(use_enable stlink) \
+ $(use_enable versaloon vsllink) \
+ $(use_enable verbose-io verbose-jtag-io) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ default
+ env -uRESTRICT prepstrip "${ED}"/usr/bin "${ED}"/usr/$(get_libdir)
+}
diff --git a/dev-embedded/openocd/openocd-0.8.0.ebuild b/dev-embedded/openocd/openocd-0.8.0.ebuild
new file mode 100644
index 000000000000..f77d3137b15a
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.8.0.ebuild
@@ -0,0 +1,132 @@
+# 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
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ MY_PV="${PV/_/-}"
+ MY_P="${PN}-${MY_PV}"
+ S="${WORKDIR}"/${MY_P}
+ KEYWORDS="~amd64 ~arm ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz"
+fi
+
+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.75
+ cmsis-dap? ( dev-libs/hidapi )
+ usb? (
+ virtual/libusb:0
+ virtual/libusb:1
+ )
+ ftdi? ( dev-embedded/libftdi )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch_user
+
+ # jimtcl-0.75 compatibility. Remove it on the
+ # next version bump
+ epatch "${FILESDIR}"/${P}-jimtcl-0.75.patch
+
+ if [[ ${PV} == "9999" ]] ; then
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+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 "${ED}"/usr/$(get_libdir)
+ udev_dorules ${D}/usr/share/${PN}/contrib/*.rules
+}
diff --git a/dev-embedded/openocd/openocd-0.9.0.ebuild b/dev-embedded/openocd/openocd-0.9.0.ebuild
new file mode 100644
index 000000000000..c61aec8386f6
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.9.0.ebuild
@@ -0,0 +1,128 @@
+# 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
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ MY_PV="${PV/_/-}"
+ MY_P="${PN}-${MY_PV}"
+ S="${WORKDIR}"/${MY_P}
+ KEYWORDS="~amd64 ~arm ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz"
+fi
+
+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"
+
+src_prepare() {
+ epatch_user
+
+ if [[ ${PV} == "9999" ]] ; then
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+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
+}
diff --git a/dev-embedded/openocd/openocd-9999.ebuild b/dev-embedded/openocd/openocd-9999.ebuild
new file mode 100644
index 000000000000..513405c83977
--- /dev/null
+++ b/dev-embedded/openocd/openocd-9999.ebuild
@@ -0,0 +1,129 @@
+# 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
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ MY_PV="${PV/_/-}"
+ MY_P="${PN}-${MY_PV}"
+ S="${WORKDIR}"/${MY_P}
+ KEYWORDS="~amd64 ~arm ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz"
+fi
+
+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"
+[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-apps/texinfo-5" #549946
+
+src_prepare() {
+ epatch_user
+
+ if [[ ${PV} == "9999" ]] ; then
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+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
+}