summaryrefslogtreecommitdiff
path: root/dev-embedded/urjtag/urjtag-2021.03.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-06 15:22:56 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-06 15:22:56 +0100
commit564f8bfdb74759f8e95ec50a16419425e8ba8f25 (patch)
tree2738b2fbae70ae5b251665eb6da25467f5db050d /dev-embedded/urjtag/urjtag-2021.03.ebuild
parent9b81b8a93760fc1c7d79561adbd7a62c82f334db (diff)
gentoo auto-resync : 06:08:2023 - 15:22:56
Diffstat (limited to 'dev-embedded/urjtag/urjtag-2021.03.ebuild')
-rw-r--r--dev-embedded/urjtag/urjtag-2021.03.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/dev-embedded/urjtag/urjtag-2021.03.ebuild b/dev-embedded/urjtag/urjtag-2021.03.ebuild
new file mode 100644
index 000000000000..031c9e8c7232
--- /dev/null
+++ b/dev-embedded/urjtag/urjtag-2021.03.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit python-r1
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/urjtag/git"
+ inherit git-r3 autotools
+ S="${WORKDIR}/${P}/${PN}"
+else
+ SRC_URI="mirror://sourceforge/urjtag/${P}.tar.xz"
+ KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+fi
+
+DESCRIPTION="Tool for communicating over JTAG with flash chips, CPUs, and many more"
+HOMEPAGE="https://urjtag.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="ftdi ftd2xx python readline usb"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="ftdi? ( dev-embedded/libftdi:1 )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:= )
+ usb? ( virtual/libusb:1 )"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2021.03-fix-python-setup.patch"
+)
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == "9999" ]] ; then
+ mkdir -p m4 || die
+ eautopoint
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --disable-werror \
+ --disable-python \
+ $(use_with readline) \
+ $(use_with ftdi libftdi) \
+ $(use_with ftd2xx) \
+ $(use_with usb libusb 1.0)
+}
+
+src_compile() {
+ use python && python_copy_sources
+
+ emake
+}
+
+src_install() {
+ default
+
+ if use python; then
+ installation() {
+ cd bindings/python || die
+ ln -s "${S}"/src/.libs ../../src/.libs || die
+ "${EPYTHON}" setup.py install \
+ --root="${D}" \
+ --prefix="${EPREFIX}/usr" || die
+ }
+ python_foreach_impl run_in_build_dir installation
+ python_foreach_impl python_optimize
+ fi
+
+ find "${ED}" -name '*.la' -delete || die
+}