dev-libs/libfx2 - 0.16 (jjakob)

Search

Install

Install this version:

emerge -a =dev-libs/libfx2-0.16

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-libs/libfx2-0.16

Or alternatively:

emerge --autounmask-write -a =dev-libs/libfx2-0.16

Package Information

Description:
chip support package for Cypress EZ-USB FX2 series microcontrollers
Homepage:
https://codeberg.org/GlasgowEmbedded/libfx2
License:
0BSD

Ebuild Details

Version EAPI Keywords Slot
0.16 8 ~amd64 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
DISTUTILS_OPT=1
PYTHON_COMPAT=( python3_{13..15} )
inherit distutils-r1

DESCRIPTION="chip support package for Cypress EZ-USB FX2 series microcontrollers"
HOMEPAGE="https://codeberg.org/GlasgowEmbedded/libfx2"
SRC_URI="https://codeberg.org/GlasgowEmbedded/libfx2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}"

LICENSE="0BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+python examples"
RESTRICT="test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

BDEPEND="
	python? (
		${DISTUTILS_DEPS}
		dev-python/setuptools-scm[${PYTHON_USEDEP}]
	)
"
DEPEND="
	dev-embedded/sdcc[mcs51(+)]
	python? (
		${PYTHON_DEPS}
		dev-python/libusb1[${PYTHON_USEDEP}]
	)
"
RDEPEND="${DEPEND}"

distutils_enable_sphinx docs \
	dev-python/sphinx-rtd-theme dev-python/sphinx-argparse \
	dev-python/breathe dev-python/mock

export SETUPTOOLS_SCM_PRETEND_VERSION="${PV}"

wrap_python() {
	local phase=$1
	shift

	if use python; then
		pushd software >/dev/null || die
		distutils-r1_${phase} "$@"
		popd >/dev/null || die
	fi
}

src_prepare(){
	default

	wrap_python ${FUNCNAME}
}

src_configure(){
	default

	wrap_python ${FUNCNAME}
}

src_compile(){
	unset CFLAGS
	emake -C firmware || die
	use examples && { emake -C examples || die; }

	wrap_python ${FUNCNAME}
}

src_install() {
	default

	wrap_python ${FUNCNAME}

	if use examples; then
		docompress -x "/usr/share/doc/${PF}/examples"
		docinto examples
		dodoc examples/*/build/*.ihex
	fi
}

USE Flags

Manage flags for this package: euse -i <flag> -p dev-libs/libfx2 | euse -E <flag> -p dev-libs/libfx2 | euse -D <flag> -p dev-libs/libfx2

Global/Standard Flags

python
Default: Enabled (+)

Inherited Eclasses

Dependencies

DEPEND

	dev-embedded/sdcc[mcs51(+)]
	python? (
		
		dev-python/libusb1[]
	)

RDEPEND

	dev-embedded/sdcc[mcs51(+)]
	python? (
		
		dev-python/libusb1[]
	)

BDEPEND

	python? (
		
		dev-python/setuptools-scm[]
	)

Manifest for 0.16

Type File Size Source URLs
DIST libfx2-0.16.tar.gz 102552 bytes https://codeberg.org/GlasgowEmbedded/libfx2/archive/v0.16.tar.gz