1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7} )
7 inherit python-single-r1
9 DESCRIPTION="USB enumeration utilities"
10 HOMEPAGE="https://www.kernel.org/pub/linux/utils/usb/usbutils/
11 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/"
12 SRC_URI="https://www.kernel.org/pub/linux/utils/usb/${PN}/${P}.tar.xz"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
18 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
20 CDEPEND="virtual/libusb:1=
27 python? ( ${PYTHON_DEPS} )"
29 PATCHES=( "${FILESDIR}"/${P}-fix-py3-support.patch )
32 use python && python-single-r1_pkg_setup
37 use python && python_fix_shebang lsusb.py.in
42 --datarootdir="${EPREFIX}/usr/share"
43 --datadir="${EPREFIX}/usr/share/misc"
45 econf "${myeconfargs[@]}"
50 newdoc usbhid-dump/NEWS NEWS.usbhid-dump
52 use python || rm -f "${ED%/}"/usr/bin/lsusb.py