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 | |
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/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/libnfc/files/openpcd.patch | 11 | ||||
-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 | ||||
-rw-r--r-- | profiles/make.defaults | 2 |
4 files changed, 48 insertions, 2 deletions
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.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 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" |