commit:     aeef62f2fe59cd05c3e55b4bd5d46cf313ffdf82
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 12 08:50:28 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Oct 12 08:50:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aeef62f2

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 <AT> gentoo.org>

 ...{libnfc-1.8.0.ebuild => libnfc-1.8.0-r1.ebuild} | 33 +++++++++++++---------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/dev-libs/libnfc/libnfc-1.8.0.ebuild 
b/dev-libs/libnfc/libnfc-1.8.0-r1.ebuild
similarity index 55%
rename from dev-libs/libnfc/libnfc-1.8.0.ebuild
rename to dev-libs/libnfc/libnfc-1.8.0-r1.ebuild
index ae5228fdac7..fba699e4b06 100644
--- a/dev-libs/libnfc/libnfc-1.8.0.ebuild
+++ b/dev-libs/libnfc/libnfc-1.8.0-r1.ebuild
@@ -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
 }

Reply via email to