diff options
author | 2023-08-06 12:44:18 +0800 | |
---|---|---|
committer | 2023-08-06 13:05:12 +0300 | |
commit | fcd645b0be20fa53aa6f58f959e1771a4696ca12 (patch) | |
tree | 806c3f1dea2701bc9c4952903f35c1dc1b6746b4 /dev-embedded | |
parent | dev-embedded/urjtag: add 2021.03 (diff) | |
download | gentoo-fcd645b0be20fa53aa6f58f959e1771a4696ca12.tar.gz gentoo-fcd645b0be20fa53aa6f58f959e1771a4696ca12.tar.bz2 gentoo-fcd645b0be20fa53aa6f58f959e1771a4696ca12.zip |
dev-embedded/urjtag: fix the live ebuild
Signed-off-by: Huang Rui <vowstar@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32077
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r-- | dev-embedded/urjtag/urjtag-9999.ebuild | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/dev-embedded/urjtag/urjtag-9999.ebuild b/dev-embedded/urjtag/urjtag-9999.ebuild index 290a76a683c9..031c9e8c7232 100644 --- a/dev-embedded/urjtag/urjtag-9999.ebuild +++ b/dev-embedded/urjtag/urjtag-9999.ebuild @@ -1,7 +1,11 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +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" @@ -17,14 +21,23 @@ HOMEPAGE="https://urjtag.sourceforge.net/" LICENSE="GPL-2" SLOT="0" -# TODO: Figure out if anyone wants the Python bindings -IUSE="ftdi readline usb" + +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} - !dev-embedded/jtag" +RDEPEND="${DEPEND}" +BDEPEND=" + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2021.03-fix-python-setup.patch" +) src_prepare() { default @@ -37,16 +50,35 @@ src_prepare() { } src_configure() { - use readline || export vl_cv_lib_readline=no - econf \ --disable-werror \ --disable-python \ + $(use_with readline) \ $(use_with ftdi libftdi) \ - $(use_with usb libusb) + $(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 } |