1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs udev
8 DESCRIPTION="CCID free software driver"
9 HOMEPAGE="https://ccid.apdu.fr https://github.com/LudovicRousseau/CCID"
10 SRC_URI="https://ccid.apdu.fr/files/${P}.tar.bz2"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
15 IUSE="twinserial kobil-midentity +usb"
17 RDEPEND=">=sys-apps/pcsc-lite-1.8.3
18 usb? ( virtual/libusb:1 )"
20 BDEPEND="kernel_linux? ( virtual/pkgconfig )"
22 DOCS=( README.md AUTHORS )
27 $(use_enable twinserial) \
28 $(use_enable usb libusb)
33 use kobil-midentity && emake -C contrib/Kobil_mIDentity_switch
39 if use kobil-midentity; then
40 dosbin contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch
41 doman contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.8
44 if use kernel_linux; then
45 # note: for eudev support, rules probably will always need to be
48 # ccid >=1.4.11 version changed the rules drastically in a minor
49 # release to no longer use the pcscd group. Using the old ones in
51 udev_newrules "${FILESDIR}"/92_pcscd_ccid-2.rules 92-pcsc-ccid.rules
53 # disable Kobil_mIDentity_switch udev rule with USE=-kobil-midentity
54 if ! use kobil-midentity; then
56 -e '/Kobil_mIDentity_switch/s/^/#/' \
57 -i "${D}/$(get_udevdir)"/rules.d/92-pcsc-ccid.rules || die