diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2019-07-03 02:09:05 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2019-07-03 02:09:59 -0700 |
commit | 233999f73cf140ba9370f1e852359df59e919463 (patch) | |
tree | d2ef5d068063b2df309f76ff01202b3a58193c76 /dev-embedded/jlink/jlink-6.46h.ebuild | |
parent | dev-embedded/yosys-0.8: New ebuild (diff) | |
download | palmer-233999f73cf140ba9370f1e852359df59e919463.tar.gz palmer-233999f73cf140ba9370f1e852359df59e919463.tar.bz2 palmer-233999f73cf140ba9370f1e852359df59e919463.zip |
Add Segger's JLink tool
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Diffstat (limited to 'dev-embedded/jlink/jlink-6.46h.ebuild')
-rw-r--r-- | dev-embedded/jlink/jlink-6.46h.ebuild | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/dev-embedded/jlink/jlink-6.46h.ebuild b/dev-embedded/jlink/jlink-6.46h.ebuild new file mode 100644 index 0000000..84b98ed --- /dev/null +++ b/dev-embedded/jlink/jlink-6.46h.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit versionator +inherit eutils + +INSTALLDIR="/opt/${PN}" + +DESCRIPTION="Tools for Segger J-Link JTAG adapters" +HOMEPAGE="http://www.segger.com/jlink-software.html" +SRC_URI="amd64? ( JLink_Linux_V${PV/\./}_x86_64.tgz ) + x86? ( JLink_Linux_V${PV/\./}_i386.tgz )" +LICENSE="J-Link Terms of Use" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" +QA_PREBUILT="*" + +RESTRICT="fetch strip" +DEPEND="" +RDEPEND="${DEPEND} + dev-libs/libedit" + +pkg_setup() { + export S=${WORKDIR}/"JLink_Linux_V${PV/\./}_$(usex amd64 'x86_64' 'i386')" +} + +pkg_nofetch() { + einfo "Segger requires you to download the needed files manually after" + einfo "entering the serial number of your debugging probe." + einfo + einfo "Download ${SRC_URI}" + einfo "from ${HOMEPAGE} and place it in ${DISTDIR}" +} + +src_install() { + dodir ${INSTALLDIR} || die + dodir ${INSTALLDIR}/lib || die + dodir ${INSTALLDIR}/doc || die + + local BINS="JFlashSPI_CL JLinkExe JLinkGDBServer JLinkLicenseManager JLinkRegistration + JLinkRemoteServer JLinkRTTClient JLinkRTTLogger JLinkSTM32 JLinkSWOViewer + JTAGLoadExe" + for wrapper in $BINS ; do + make_wrapper $wrapper ./$wrapper ${INSTALLDIR} lib + done + + exeinto ${INSTALLDIR} + doexe $BINS || die + + P_NUMBER=$(( $(printf "%d" "'$(get_version_component_range get_last_version_component_index)") - 96 )) + exeinto ${INSTALLDIR} + + for SUFFIX in "" _x86; do + doexe "libjlinkarm${SUFFIX}.so.${PV/[a-z]/}.${P_NUMBER}" || die + dosym "libjlinkarm${SUFFIX}.so.${PV/[a-z]/}.${P_NUMBER}" "${INSTALLDIR}/libjlinkarm${SUFFIX}.so.$(get_major_version)" || die + dosym "libjlinkarm${SUFFIX}.so.$(get_major_version)" "${INSTALLDIR}/libjlinkarm${SUFFIX}.so" || die + done + + doexe GDBServer/* + + insinto ${INSTALLDIR} + doins -r x86 || die + + insinto ${INSTALLDIR}/doc + pushd Doc + doins -r * || die + popd + doins README.txt + + insinto ${INSTALLDIR} + doins -r Samples || die + doins -r Devices || die + + insinto /lib/udev/rules.d/ + doins 99-jlink.rules || die +} + +pkg_postinst() { + enewgroup plugdev + elog "To be able to access the jlink usb adapter, you have to be" + elog "a member of the 'plugdev' group." +} |