From 09607019fae85743dd54a0b343ce44ef677994ab Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 6 Jun 2012 16:00:54 +0200 Subject: dev-libs/libnfc: add LIBNFC_DRIVERS to choose drivers to compile, add openpcd patch --- dev-libs/libnfc/Manifest | 3 +- dev-libs/libnfc/files/openpcd.patch | 11 +++++ dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild | 67 ++++++++++++++++++++++++++++++ dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild | 35 ---------------- profiles/make.defaults | 2 + 5 files changed, 82 insertions(+), 36 deletions(-) create mode 100644 dev-libs/libnfc/files/openpcd.patch create mode 100644 dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild delete mode 100644 dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild create mode 100644 profiles/make.defaults diff --git a/dev-libs/libnfc/Manifest b/dev-libs/libnfc/Manifest index 729f2a5..034b3cd 100644 --- a/dev-libs/libnfc/Manifest +++ b/dev-libs/libnfc/Manifest @@ -1,2 +1,3 @@ +AUX openpcd.patch 476 RMD160 4e2c168623001ed35c38a8714b4d305bff33d4b5 SHA1 c8f7cbc353613a4d675ae39d1ef56eb74b78ae43 SHA256 06bbc1fdf6456d2721883fa53e3c0b244e29ffdb88b1e35347c64e4c26264ed3 DIST libnfc-1.6.0-rc1.tar.gz 571772 RMD160 9f04b5f760d45548f4f5eb9474a6eea70a804531 SHA1 bbff76269120c3a531eb96b7ceb96fd36c0071a1 SHA256 f95263c9ba5e3b8fc6e366329241e1d2eaa6d2503475554f0e88dfc81fc5235f -EBUILD libnfc-1.6.0_rc1.ebuild 752 RMD160 14ab9ca1f15c15df2e898e8a9e9235c62c6741c3 SHA1 6649b4293ffc131561f2a83ce2d152ace9f83a83 SHA256 70dbc55756f29124aba12e393395096edce1f659c18d3d52733900683259693b +EBUILD libnfc-1.6.0_rc1-r1.ebuild 1390 RMD160 c4f21ba9ecc46a4bfaa7efc8eb210f9bf18e9c65 SHA1 da027384ea5f22dd5982cb7954b09659acfa4605 SHA256 8432e484fc8500a9cddfb26fd88cb76c2e5be778dc473035ba465cd913d31b4f diff --git a/dev-libs/libnfc/files/openpcd.patch b/dev-libs/libnfc/files/openpcd.patch new file mode 100644 index 0000000..67d3df2 --- /dev/null +++ b/dev-libs/libnfc/files/openpcd.patch @@ -0,0 +1,11 @@ +--- libnfc/buses/uart_posix.c (Revision 1433) ++++ libnfc/buses/uart_posix.c (Arbeitskopie) +@@ -52,7 +52,7 @@ + # elif defined (__FreeBSD__) || defined (__OpenBSD__) + char *serial_ports_device_radix[] = { "cuaU", "cuau", NULL }; + # elif defined (__linux__) +-char *serial_ports_device_radix[] = { "ttyUSB", "ttyS", NULL }; ++char *serial_ports_device_radix[] = { "ttyACM", "ttyUSB", "ttyS", NULL }; + # else + # error "Can't determine serial string for your system" + # endif diff --git a/dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild b/dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild new file mode 100644 index 0000000..aef964c --- /dev/null +++ b/dev-libs/libnfc/libnfc-1.6.0_rc1-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils versionator + +DESCRIPTION="Near Field Communications (NFC) library" +HOMEPAGE="http://www.libnfc.org/" + +MY_P="${PN}-$(replace_version_separator 3 "-")" +SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~x86 ~amd64" +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" +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 +} + +src_install() { + emake install DESTDIR="${D}" || die "Failed to install properly." + use doc && dohtml "${S}"/doc/html/* +} diff --git a/dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild b/dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild deleted file mode 100644 index 00b1e3e..0000000 --- a/dev-libs/libnfc/libnfc-1.6.0_rc1.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils versionator - -DESCRIPTION="Near Field Communications (NFC) library" -HOMEPAGE="http://www.libnfc.org/" - -MY_P="${PN}-$(replace_version_separator 3 "-")" -SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz" -S="${WORKDIR}/${MY_P}" - -LICENSE="LGPL-3" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="doc" - -CDEPEND="sys-apps/pcsc-lite - dev-libs/libusb" -DEPEND="${CDEPEND} - doc? ( app-doc/doxygen )" -RDEPEND="${CDEPEND}" - -src_compile() { - emake || die "Failed to compile." - use doc && doxygen -} - -src_install() { - emake install DESTDIR="${D}" || die "Failed to install properly." - use doc && dohtml "${S}"/doc/html/* -} diff --git a/profiles/make.defaults b/profiles/make.defaults new file mode 100644 index 0000000..0534120 --- /dev/null +++ b/profiles/make.defaults @@ -0,0 +1,2 @@ +USE_EXPAND="${USE_EXPAND} LIBNFC_DRIVERS" +LIBNFC_DRIVERS="acr122 acr122s arygon pn53x_usb" -- cgit v1.2.3