diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-06-06 16:00:54 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2012-06-06 16:00:54 +0200 |
commit | 09607019fae85743dd54a0b343ce44ef677994ab (patch) | |
tree | 78216081057ac17cdbe82fe5908d2fc7bf217107 /dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild | |
parent | 2046296222caa085d5eed72f534fae877a5b7dd1 (diff) | |
download | overlay-09607019fae85743dd54a0b343ce44ef677994ab.tar.gz overlay-09607019fae85743dd54a0b343ce44ef677994ab.tar.xz overlay-09607019fae85743dd54a0b343ce44ef677994ab.zip |
dev-libs/libnfc: add LIBNFC_DRIVERS to choose drivers to compile, add openpcd patch
Diffstat (limited to '')
-rw-r--r-- | dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild (renamed from dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild) | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild b/dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild index 00b1e3e..aef964c 100644 --- a/dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild +++ b/dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild @@ -16,7 +16,12 @@ S="${WORKDIR}/${MY_P}" LICENSE="LGPL-3" SLOT="0" KEYWORDS="~x86 ~amd64" -IUSE="doc" +IUSE="doc serial-autoprobe" + +IUSE_DRIVERS="acr122 acr122s arygon pn532_uart pn53x_usb" +for drv in $IUSE_DRIVERS; do + IUSE="${IUSE} libnfc_drivers_${drv}" +done CDEPEND="sys-apps/pcsc-lite dev-libs/libusb" @@ -24,6 +29,33 @@ DEPEND="${CDEPEND} doc? ( app-doc/doxygen )" RDEPEND="${CDEPEND}" +src_prepare() { + use libnfc_drivers_pn532_uart && epatch "${FILESDIR}/openpcd.patch" +} + +src_configure() { + driver="" + + local drv + for drv in $IUSE_DRIVERS; do + if use libnfc_drivers_${drv}; then + if [ -z "$driver" ]; then + driver="${drv}" + else + driver="${driver},${drv}" + fi + fi + done + + if [ -z "$driver" ]; then + die "You have to enable at least one driver with the LIBNFC_DRIVERS variable." + fi + + econf \ + --with-drivers="${driver}" \ + $(use_enable serial-autoprobe) +} + src_compile() { emake || die "Failed to compile." use doc && doxygen |