Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/usbutils/
Date: Sun, 28 Nov 2021 20:08:58
Message-Id: 1638129243.5e8affc7dca726a84fd5764058e09392c6dfbebf.floppym@gentoo
1 commit: 5e8affc7dca726a84fd5764058e09392c6dfbebf
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 25 00:49:51 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 28 19:54:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e8affc7
7
8 sys-apps/usbutils: migrate to hwdata
9
10 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
11
12 sys-apps/usbutils/usbutils-014-r1.ebuild | 59 ++++++++++++++++++++++++++++++++
13 1 file changed, 59 insertions(+)
14
15 diff --git a/sys-apps/usbutils/usbutils-014-r1.ebuild b/sys-apps/usbutils/usbutils-014-r1.ebuild
16 new file mode 100644
17 index 000000000000..cee126405f8d
18 --- /dev/null
19 +++ b/sys-apps/usbutils/usbutils-014-r1.ebuild
20 @@ -0,0 +1,59 @@
21 +# Copyright 1999-2021 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +PYTHON_COMPAT=( python3_{8,9} )
26 +
27 +inherit autotools python-single-r1
28 +
29 +DESCRIPTION="USB enumeration utilities"
30 +HOMEPAGE="https://www.kernel.org/pub/linux/utils/usb/usbutils/
31 + https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/"
32 +SRC_URI="https://www.kernel.org/pub/linux/utils/usb/${PN}/${P}.tar.xz"
33 +
34 +LICENSE="GPL-2"
35 +SLOT="0"
36 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
37 +IUSE="python"
38 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
39 +
40 +DEPEND="virtual/libusb:1=
41 + virtual/libudev:="
42 +BDEPEND="
43 + app-arch/xz-utils
44 + virtual/pkgconfig
45 + python? ( ${PYTHON_DEPS} )"
46 +RDEPEND="${DEPEND}
47 + python? (
48 + ${PYTHON_DEPS}
49 + sys-apps/hwdata
50 + )
51 +"
52 +
53 +pkg_setup() {
54 + use python && python-single-r1_pkg_setup
55 +}
56 +
57 +src_prepare() {
58 + default
59 + eautoreconf
60 + use python && python_fix_shebang lsusb.py.in
61 +}
62 +
63 +src_configure() {
64 + local myeconfargs=(
65 + --datarootdir="${EPREFIX}/usr/share"
66 + --datadir="${EPREFIX}/usr/share/hwdata"
67 + )
68 + econf "${myeconfargs[@]}"
69 +}
70 +
71 +src_install() {
72 + default
73 + newdoc usbhid-dump/NEWS NEWS.usbhid-dump
74 + dobin usbreset # noinst_PROGRAMS, but installed by other distros
75 +
76 + if ! use python ; then
77 + rm -f "${ED}"/usr/bin/lsusb.py || die
78 + fi
79 +}