*/*: Bump copyright on files touched this year
[gentoo.git] / dev-libs / libusb-compat / libusb-compat-0.1.5-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs multilib-minimal usr-ldscript
7
8 DESCRIPTION="Userspace access to USB devices (libusb-0.1 compat wrapper)"
9 HOMEPAGE="http://libusb.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN/-compat}/${P}.tar.bz2"
11
12 LICENSE="LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
15 IUSE="debug examples static-libs"
16
17 RDEPEND=">=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}]
18         !dev-libs/libusb:0"
19 DEPEND="${RDEPEND}
20         virtual/pkgconfig"
21
22 DOCS="AUTHORS ChangeLog NEWS README"
23
24 PATCHES=(
25         "${FILESDIR}"/${PN/-compat}-0.1-ansi.patch
26 )
27
28 multilib_src_configure() {
29         ECONF_SOURCE=${S} \
30         econf \
31                 $(use_enable static-libs static) \
32                 $(use_enable debug debug-log)
33 }
34
35 multilib_src_install() {
36         emake DESTDIR="${D}" install
37
38         gen_usr_ldscript -a usb
39 }
40
41 multilib_src_install_all() {
42         find "${ED}" -name '*.la' -delete || die
43         einstalldocs
44
45         if use examples; then
46                 insinto /usr/share/doc/${PF}/examples
47                 doins examples/*.c
48         fi
49 }