mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
dev-libs/libnfc: Fix pcsc-lite support
* EAPI 8 * missing pkg-config dep * simpler USE=doc handling * remove USE=static-libs Closes: https://bugs.gentoo.org/816891 Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Near Field Communications (NFC) library"
|
||||
HOMEPAGE="http://www.libnfc.org/"
|
||||
@@ -10,33 +10,40 @@ SRC_URI="https://github.com/nfc-tools/${PN}/releases/download/${P}/${P}.tar.bz2"
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="doc pcsc-lite readline static-libs usb"
|
||||
IUSE="doc pcsc-lite readline usb"
|
||||
|
||||
RDEPEND="pcsc-lite? ( sys-apps/pcsc-lite )
|
||||
readline? ( sys-libs/readline:0 )
|
||||
RDEPEND="
|
||||
pcsc-lite? ( sys-apps/pcsc-lite )
|
||||
readline? ( sys-libs/readline:= )
|
||||
usb? ( virtual/libusb:0 )"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="doc? ( app-doc/doxygen )"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
doc? ( app-doc/doxygen )"
|
||||
|
||||
src_configure() {
|
||||
local drivers="arygon,pn532_uart,pn532_spi,pn532_i2c,acr122s"
|
||||
use pcsc-lite && drivers+=",acr122_pcsc"
|
||||
use usb && drivers+=",pn53x_usb,acr122_usb"
|
||||
drivers+=$(usev pcsc-lite ",acr122_pcsc,pcsc")
|
||||
drivers+=$(usev usb ",pn53x_usb,acr122_usb")
|
||||
econf \
|
||||
--with-drivers="${drivers}" \
|
||||
$(use_enable doc) \
|
||||
$(use_with readline) \
|
||||
$(use_enable static-libs static)
|
||||
$(use_with readline)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
use doc && doxygen
|
||||
|
||||
if use doc; then
|
||||
doxygen || die
|
||||
HTML_DOCS=( "${S}"/doc/html/. )
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
use static-libs || find "${ED}" -name 'lib*.la' -delete
|
||||
use doc && HTML_DOCS=( "${S}"/doc/html/* )
|
||||
einstalldocs
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
|
||||
insinto /etc/nfc
|
||||
newins libnfc.conf.sample libnfc.conf
|
||||
}
|
||||
Reference in New Issue
Block a user