Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libusb/
Date: Tue, 01 Feb 2022 03:34:30
Message-Id: 1643686457.a505a3516f9ea270da9b91a9f77e20f931bea40a.sam@gentoo
1 commit: a505a3516f9ea270da9b91a9f77e20f931bea40a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 1 03:33:36 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 1 03:34:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a505a351
7
8 dev-libs/libusb: add 1.0.25
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-libs/libusb/Manifest | 1 +
13 dev-libs/libusb/libusb-1.0.25.ebuild | 74 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 75 insertions(+)
15
16 diff --git a/dev-libs/libusb/Manifest b/dev-libs/libusb/Manifest
17 index ab33854c9b7f..f7d51a105801 100644
18 --- a/dev-libs/libusb/Manifest
19 +++ b/dev-libs/libusb/Manifest
20 @@ -1 +1,2 @@
21 DIST libusb-1.0.24.tar.bz2 606593 BLAKE2B f6188b5af1225cf8b6d1486b6efcf48e837ee4f2e3592adab3ae6aae0a74a67aa54f40f0dd547f951a194d40954f2ee33acf741d2eee0b8449ce64f2edcf1018 SHA512 5aea36a530aaa15c6dd656d0ed3ce204522c9946d8d39ffbb290dab4a98cda388a2598da4995123d1032324056090bd429e702459626d3e8d7daeebc4e7ff3dc
22 +DIST libusb-1.0.25.tar.bz2 609127 BLAKE2B 3aecfbf9fc068fdfb8e612918bb895988f8400dc2c3ffd96a81792ab844d632f0c098947200512ddc37cfa9003956f8454c1d0362973a5d646a225f81cc2923b SHA512 f1e6e5577d4bd1ff136927dc66c615014a06ac332ddd797b1d1ad5f7b68e2405e66068dcb210e2f0ae3e31681603ef72efbd88bf7fbe0eb41ce700fdc3f92f9d
23
24 diff --git a/dev-libs/libusb/libusb-1.0.25.ebuild b/dev-libs/libusb/libusb-1.0.25.ebuild
25 new file mode 100644
26 index 000000000000..328fa227b1de
27 --- /dev/null
28 +++ b/dev-libs/libusb/libusb-1.0.25.ebuild
29 @@ -0,0 +1,74 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit multilib-minimal usr-ldscript
36 +
37 +DESCRIPTION="Userspace access to USB devices"
38 +HOMEPAGE="https://libusb.info/ https://github.com/libusb/libusb"
39 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.bz2"
40 +
41 +LICENSE="LGPL-2.1"
42 +SLOT="1"
43 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
44 +IUSE="debug doc examples static-libs test udev"
45 +RESTRICT="!test? ( test )"
46 +REQUIRED_USE="static-libs? ( !udev )"
47 +
48 +RDEPEND="udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )"
49 +DEPEND="${RDEPEND}
50 + !udev? ( virtual/os-headers )"
51 +BDEPEND="doc? ( app-doc/doxygen )"
52 +
53 +multilib_src_configure() {
54 + local myeconfargs=(
55 + $(use_enable static-libs static)
56 + $(use_enable udev)
57 + $(use_enable debug debug-log)
58 + $(use_enable test tests-build)
59 + )
60 +
61 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
62 +}
63 +
64 +multilib_src_compile() {
65 + emake
66 +
67 + if multilib_is_native_abi; then
68 + use doc && emake -C doc
69 + fi
70 +}
71 +
72 +multilib_src_test() {
73 + emake check
74 +
75 + # noinst_PROGRAMS from tests/Makefile.am
76 + if [[ -e /dev/bus/usb ]]; then
77 + tests/stress || die
78 + else
79 + # bug #824266
80 + ewarn "/dev/bus/usb does not exist, skipping stress test"
81 + fi
82 +}
83 +
84 +multilib_src_install() {
85 + emake DESTDIR="${D}" install
86 +
87 + if multilib_is_native_abi; then
88 + gen_usr_ldscript -a usb-1.0
89 +
90 + use doc && dodoc -r doc/api-1.0
91 + fi
92 +}
93 +
94 +multilib_src_install_all() {
95 + find "${ED}" -type f -name "*.la" -delete || die
96 +
97 + dodoc AUTHORS ChangeLog NEWS PORTING README TODO
98 +
99 + if use examples; then
100 + docinto examples
101 + dodoc examples/*.{c,h}
102 + fi
103 +}