Skip to content

Commit

Permalink
dev-embedded/openocd: Sync live ebuild
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.9, Repoman-3.0.1
Signed-off-by: Jakov Smolic <[email protected]>
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
Jakov Smolic authored and SoapGentoo committed Dec 28, 2020
1 parent 267abe7 commit 7c920a1
Showing 1 changed file with 40 additions and 83 deletions.
123 changes: 40 additions & 83 deletions dev-embedded/openocd/openocd-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="7"
EAPI=7

inherit eutils multilib flag-o-matic toolchain-funcs udev
inherit udev

# One ebuild to rule them all
if [[ ${PV} == *9999 ]] ; then
inherit autotools git-r3
EGIT_REPO_URI="https://git.code.sf.net/p/${PN}/code"
EGIT_REPO_URI=" https://repo.or.cz/openocd.git"
else
MY_PV="${PV/_/-}"
MY_P="${PN}-${MY_PV}"
Expand All @@ -29,113 +28,71 @@ RDEPEND="
acct-group/plugdev
>=dev-lang/jimtcl-0.76:0=
cmsis-dap? ( dev-libs/hidapi )
jlink? ( >=dev-embedded/libjaylink-0.2 )
jlink? ( >=dev-embedded/libjaylink-0.2.0 )
usb? (
virtual/libusb:0
virtual/libusb:1
)
ftdi? ( dev-embedded/libftdi:= )"

DEPEND="${RDEPEND}
DEPEND="${RDEPEND}"
BDEPEND="
sys-apps/texinfo
virtual/pkgconfig"
[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-apps/texinfo-5" #549946

src_prepare() {
default

if [[ ${PV} == "9999" ]] ; then
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-arm-jtag-ew
--enable-at91rm9200
--enable-bcm2835gpio
--enable-buspirate
--enable-ep93xx
--enable-gw16012
--enable-arm-jtag-ew
--enable-sysfsgpio
--enable-bcm2835gpio
--disable-internal-jimtcl
--disable-internal-libjaylink
--disable-werror
$(use_enable cmsis-dap)
$(use_enable dummy)
$(use_enable ftdi openjtag)
$(use_enable ftdi presto)
$(use_enable ftdi usb-blaster)
$(use_enable jlink)
$(use_enable parport)
$(use_enable parport parport_ppdev)
$(use_enable usb aice)
$(use_enable usb armjtagew)
$(use_enable usb ftdi)
$(use_enable usb osbdm)
$(use_enable usb opendous)
$(use_enable usb rlink)
$(use_enable usb stlink)
$(use_enable usb ti-icdi)
$(use_enable usb usbprog)
$(use_enable usb usb-blaster-2)
$(use_enable usb ulink)
$(use_enable usb vsllink)
$(use_enable verbose-io verbose-jtag-io)
$(use_enable verbose-io verbose-usb-io)
$(use_enable verbose-io verbose_usb_comms)
)

# 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[@]}"
econf "${myconf[@]}"
}

src_install() {
default
dostrip /usr/bin
udev_dorules "${D}"/usr/share/${PN}/contrib/*.rules
udev_dorules "${ED}"/usr/share/${PN}/contrib/*.rules
}

pkg_postinst() {
Expand Down

0 comments on commit 7c920a1

Please sign in to comment.