summaryrefslogtreecommitdiff
path: root/dev-embedded/openocd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-embedded/openocd
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-embedded/openocd')
-rw-r--r--dev-embedded/openocd/Manifest17
-rw-r--r--dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch66
-rw-r--r--dev-embedded/openocd/metadata.xml31
-rw-r--r--dev-embedded/openocd/openocd-0.10.0.ebuild146
-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.ebuild140
-rw-r--r--dev-embedded/openocd/openocd-0.9.0.ebuild136
-rw-r--r--dev-embedded/openocd/openocd-9999.ebuild146
10 files changed, 982 insertions, 0 deletions
diff --git a/dev-embedded/openocd/Manifest b/dev-embedded/openocd/Manifest
new file mode 100644
index 000000000000..61b6991d6197
--- /dev/null
+++ b/dev-embedded/openocd/Manifest
@@ -0,0 +1,17 @@
+AUX openocd-0.8.0-jimtcl-0.75.patch 2267 SHA256 3eaae17f04ea48e43a14920095510d78e7298164d32e792ffde8a2c67f057411 SHA512 a8f5a680077711826a0bfa83502b216ae254f1a6ad54f94dec1cac89b3f6fdc43cfabbf589074cb469597c606d35f37a03f1f140dc1b9c5ee6e12e805667e2e7 WHIRLPOOL 2c3b6f1147802a53ea9e107f9e35308e8683b096b84d839e20fed3208490b441b288623650dd6218cbf22adf69cd0a746ede6244eb8dd4dbed4eced80f3b96bc
+DIST openocd-0.10.0.tar.gz 6124274 SHA256 eda3b03919cc0ffb70e7de9c877092a0311aaaa4e1532937e9f86ac1863fe526 SHA512 44b303b0df1d7c13bc18b8995493de64fed7a853704455d484dfc4a74a1ba4b0d42b4679a7009ec015dc71c47152e5556a1a02665cfafe7af80c608b68d8310a WHIRLPOOL 535fd53cc2a6b9e2f8fe5705806cad39832d3b7911f97a705c968ddf27981d000bfa0f707110645739aa2d792b2fbb46e6adf12dcbff394a07f9fb7376b37259
+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
+EBUILD openocd-0.10.0.ebuild 2873 SHA256 3cf716dd724ead8b4dc49d9d4856ba5d66b70aa089a5321bfae27a11f9cdac90 SHA512 232a94882cd2fb65eb39f19881c99a588b19497c938041f69bff06657bef948687704e9dac18bf81b102c47be75c046bb2972335b465c5fe2a09d6f8684d2ad4 WHIRLPOOL f1efd45569fe279231f4aa58a35a85f29fb72dc6e66325fddba05682fcae22a6f016065b63b635f2fcbfb8c738efb7899f092d0a736cd7ab17de6ae36509d4ce
+EBUILD openocd-0.5.0.ebuild 2149 SHA256 79bcc65e8b44082118def004a6c052ae3212dc9c63cc0f5798c0a871b597795a SHA512 0de7cfb6eec56f46b48390c2039e96a1baea3e3a9347c88e7c0bfc19bf8b789ad46e60c9d17895e9d665c8f1fae659fcdb7632733d08b4165ecd381821abb2d3 WHIRLPOOL 3caa5596473e77cbf77ecc19ee1d7f1bdf81d284363c82113ef12e3b339bcac7d75b7c322c72dd86baf0fb60e60a902bcc2d67a8ac280d0909ea8a103859a924
+EBUILD openocd-0.6.1.ebuild 2638 SHA256 3701dec54e93ef9ec3891900b57be81d2b7d244d000c54859630bb77b93c4748 SHA512 623a7cfcfcb969fb5a78d9fdca01be4aa3bb9b84c09c70ad4fb1e65b4f0a4ecf78c0beafa73f05cbb03246cfa2d9015b9058cc9ba0dfa2e2779067ca5caa767b WHIRLPOOL 669f0ba0a17b864172191d3f5c214c213c838deb66c52d9f3ed7affc676f89792ce42ac4c84e55c08b1298b5e51c70cda8cd469e47cb89852390a957b916d25b
+EBUILD openocd-0.7.0-r1.ebuild 3030 SHA256 194fa24627da9a423d14fe1de78eaf622e91638107abf4da8c453b324ee3378a SHA512 f3835f336e923e3d7b3900f8bf07547928bd1b29e88424c73954f3467ad6c18288acf60215b17e118877445035bed773ef494ad67ee20fa916111a8c4c2d662d WHIRLPOOL a03736e3245defc75942b65bc62da119ad4440c1117ff6182c0f01ab914f696e1767a3a6e01b092c84387ed0f2a0262dc2a29017fc3d224a4a5b9c4dcc50609a
+EBUILD openocd-0.8.0.ebuild 2872 SHA256 0e892d0b6370c384bcc38b1ee81b0385e9410bf73c7656faf490728ca367a15c SHA512 3e074615b329a42a3e8e48d1f5a7ba2ff08d8253a27d9e6b23b50f7bc3ce58df26e0d97e1b5e94ee4c799eefeb2cbea52483c3b3ca11e267eefbe2bad878a6cd WHIRLPOOL 0073cb6a6ed30f973c2f706401a59f5f34bbeacbf1f486cda11a9ac048519d36cb990255ad2d001a0064e2742f51fdd4da088e724e06c6d524592673c5b7134b
+EBUILD openocd-0.9.0.ebuild 2732 SHA256 118504fbb24d770b43bcad39c8fdd0553adf369514b587457773aeb5cd56e172 SHA512 77477ff8a557fd7997591d29da3c7daaf800ce7aa34782a8f9a42ac113fb23fb6ecb49efb1c42ad4d2c83c3761f5fb3177e9011a20dc2e81e4ed433029a11599 WHIRLPOOL 23e3d411fd4d255aa73e7c5288afd515231dacf6d2394d24b518b4d19f2b29f8141732a80d786098026d674944ced2eac7d2f0b5532aa9c6d3513914a65d9d46
+EBUILD openocd-9999.ebuild 2873 SHA256 3cf716dd724ead8b4dc49d9d4856ba5d66b70aa089a5321bfae27a11f9cdac90 SHA512 232a94882cd2fb65eb39f19881c99a588b19497c938041f69bff06657bef948687704e9dac18bf81b102c47be75c046bb2972335b465c5fe2a09d6f8684d2ad4 WHIRLPOOL f1efd45569fe279231f4aa58a35a85f29fb72dc6e66325fddba05682fcae22a6f016065b63b635f2fcbfb8c738efb7899f092d0a736cd7ab17de6ae36509d4ce
+MISC ChangeLog 4354 SHA256 064088e931f42158c99e27b17cc1cc54d4af6455d35fc35977209ac2cf4c4242 SHA512 26cdbc123b08c807b3552daf5341dbf3d1abe8da8525dc23f438a7cdf79f4d7aac89d75770c943324523d1aacaf3e71acacd42f80d16c6858923e6637ae850b6 WHIRLPOOL 743fa34b6611baf318940c3dcd9123e23775552c5221db91a882459ad0726dbfa1ec7177392f921beed3e66219c93d9e9c726b1db707d21bd8d867eb6cd04d46
+MISC ChangeLog-2015 9554 SHA256 e41b6b3c57ed0c53ece3a791906d217c06c4950827b122924c302d4885afe9dd SHA512 4e00eac5b77929154b7d76ad226ffa9bf28804a2225e2d61771eec73a0adb8c40cd4fefb5dd89a073b532b931323076a9992a397cc2174d945ca2961455f43a9 WHIRLPOOL 47070b99c4f7d1508fe694e3c263eabf240b50850382b3b5e333276b37d52eca79e1756477abca08094d957031c57312da7702d64da90f3dc84ac875f2305c5e
+MISC metadata.xml 1481 SHA256 596abc0c99e7a181a850c5c410df43997037babdab8f634eb52533e37dea018b SHA512 f5dddd2349dbfc950a276f6226f082cd2c5b93bfb478803b88f90cd7c2bd925158ef606062c99aceb9c8f71a98b8bc9dc446795d06e07fbf37daca952bcb388f WHIRLPOOL 725d562ed905f44f12e156d24fec4c2b96dedf330f7c3636e3a681339fadbc767e1fd930d7e2e55bb6f351ebbb849a81c14a02976373e556ef6ba8ea7dac895b
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..78e604f70917
--- /dev/null
+++ b/dev-embedded/openocd/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ <maintainer type="person">
+ <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="jlink"> Build the SEGGER J-Link 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.10.0.ebuild b/dev-embedded/openocd/openocd-0.10.0.ebuild
new file mode 100644
index 000000000000..2fee2af1d443
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.10.0.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs udev user
+
+# 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"
+ EGIT_PROJECT="${PN}"
+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 +jlink parport +usb verbose-io"
+RESTRICT="strip" # includes non-native binaries
+
+RDEPEND=">=dev-lang/jimtcl-0.76
+ cmsis-dap? ( dev-libs/hidapi )
+ jlink? ( dev-embedded/libjaylink )
+ usb? (
+ virtual/libusb:0
+ virtual/libusb:1
+ )
+ ftdi? ( dev-embedded/libftdi:= )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-apps/texinfo-5" #549946
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+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
+ --disable-internal-libjaylink
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --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-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-rlink
+ --disable-stlink
+ --disable-vsllink
+ --disable-armjtagew
+ )
+ fi
+
+ if use jlink; then
+ myconf+=(
+ --enable-jlink
+ )
+ else
+ myconf+=(
+ --disable-jlink
+ )
+ fi
+
+ if use ftdi; then
+ myconf+=(
+ --enable-usb-blaster
+ --enable-openjtag
+ --enable-presto
+ )
+ else
+ myconf+=(
+ --disable-openjtag
+ --disable-presto
+ --disable-usb-blaster
+ )
+ 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
+}
+
+pkg_postinst() {
+ elog "To access openocd devices as user you must be in the plugdev group"
+}
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..5704e4db3efa
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.5.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+ EGIT_PROJECT="${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:0 )"
+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..f53195d0c7d5
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.6.1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib flag-o-matic toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+ EGIT_PROJECT="${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..cbe0594cec56
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.7.0-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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"
+ EGIT_PROJECT="${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 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..362bf3eecd24
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.8.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs udev user
+
+# 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"
+ EGIT_PROJECT="${PN}"
+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"
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+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
+}
+
+pkg_postinst() {
+ elog "To access openocd devices as user you must be in the plugdev group"
+}
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..39ee7af6b857
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.9.0.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs udev user
+
+# 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"
+ EGIT_PROJECT="${PN}"
+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"
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+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
+}
+
+pkg_postinst() {
+ elog "To access openocd devices as user you must be in the plugdev group"
+}
diff --git a/dev-embedded/openocd/openocd-9999.ebuild b/dev-embedded/openocd/openocd-9999.ebuild
new file mode 100644
index 000000000000..2fee2af1d443
--- /dev/null
+++ b/dev-embedded/openocd/openocd-9999.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs udev user
+
+# 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"
+ EGIT_PROJECT="${PN}"
+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 +jlink parport +usb verbose-io"
+RESTRICT="strip" # includes non-native binaries
+
+RDEPEND=">=dev-lang/jimtcl-0.76
+ cmsis-dap? ( dev-libs/hidapi )
+ jlink? ( dev-embedded/libjaylink )
+ usb? (
+ virtual/libusb:0
+ virtual/libusb:1
+ )
+ ftdi? ( dev-embedded/libftdi:= )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-apps/texinfo-5" #549946
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+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
+ --disable-internal-libjaylink
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --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-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-rlink
+ --disable-stlink
+ --disable-vsllink
+ --disable-armjtagew
+ )
+ fi
+
+ if use jlink; then
+ myconf+=(
+ --enable-jlink
+ )
+ else
+ myconf+=(
+ --disable-jlink
+ )
+ fi
+
+ if use ftdi; then
+ myconf+=(
+ --enable-usb-blaster
+ --enable-openjtag
+ --enable-presto
+ )
+ else
+ myconf+=(
+ --disable-openjtag
+ --disable-presto
+ --disable-usb-blaster
+ )
+ 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
+}
+
+pkg_postinst() {
+ elog "To access openocd devices as user you must be in the plugdev group"
+}