# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 PYTHON_COMPAT=( python3_{11..14} ) inherit optfeature python-single-r1 DESCRIPTION="Script to talk to TI CC13xx/CC2538/CC26xx Serial Boot Loader" HOMEPAGE="https://github.com/JelmerT/cc2538-bsl" if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="https://github.com/JelmerT/${PN}" inherit git-r3 else SRC_URI="https://github.com/JelmerT/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" KEYWORDS="~amd64 ~x86" fi LICENSE="BSD" SLOT="0" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND=" ${PYTHON_DEPS} $(python_gen_cond_dep ' dev-python/pyserial[${PYTHON_USEDEP}] dev-python/intelhex[${PYTHON_USEDEP}] ') " DOCS=( README.md ) src_install() { python_scriptinto /usr/sbin python_doscript cc2538_bsl/cc2538_bsl.py einstalldocs } pkg_postinst() { optfeature "automatic detection of the firmware file type" dev-python/python-magic }