*/*: Bump copyright on files touched this year
[gentoo.git] / dev-libs / libusb-compat / libusb-compat-0.1.5-r3.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
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_CHOST_TOOLS=(
29         /usr/bin/libusb-config
30 )
31
32 multilib_src_configure() {
33         ECONF_SOURCE=${S} \
34         econf \
35                 $(use_enable static-libs static) \
36                 $(use_enable debug debug-log)
37 }
38
39 multilib_src_install() {
40         emake DESTDIR="${D}" install
41
42         gen_usr_ldscript -a usb
43 }
44
45 multilib_src_install_all() {
46         find "${ED}" -name '*.la' -delete || die
47         einstalldocs
48
49         if use examples; then
50                 insinto /usr/share/doc/${PF}/examples
51                 doins examples/*.c
52         fi
53 }