From 2046296222caa085d5eed72f534fae877a5b7dd1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 6 Jun 2012 03:32:56 +0200 Subject: dev-util/mtools: add live ebuild for mifare gui tools --- .../mtools/files/mtools-new-libnfc-version.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 dev-util/mtools/files/mtools-new-libnfc-version.patch (limited to 'dev-util/mtools/files/mtools-new-libnfc-version.patch') diff --git a/dev-util/mtools/files/mtools-new-libnfc-version.patch b/dev-util/mtools/files/mtools-new-libnfc-version.patch new file mode 100644 index 0000000..3a44984 --- /dev/null +++ b/dev-util/mtools/files/mtools-new-libnfc-version.patch @@ -0,0 +1,62 @@ +--- configure.ac (revision 24) ++++ configure.ac (working copy) +@@ -30,7 +30,7 @@ + fi + + # Checks for libraries. +-AC_CHECK_LIB(nfc, nfc_connect,,AC_MSG_ERROR(Install libnfc)) ++AC_CHECK_LIB(nfc, nfc_version,,AC_MSG_ERROR(Install libnfc)) + AC_CHECK_LIB(freefare, mifare_classic_connect,,AC_MSG_ERROR(Install libfreefare)) + AC_CHECK_LIB(gthread-2.0, g_thread_init) + +--- src/Nfc.cpp (revision 24) ++++ src/Nfc.cpp (working copy) +@@ -31,22 +31,24 @@ + }; + + Nfc::Nfc() : dev(NULL), tags(NULL) { ++ nfc_init(NULL); + selectedTag = -1; + connect(); + } + + Nfc::~Nfc() { + disconnect(); ++ nfc_exit(NULL); + } + + void Nfc::connect() { + if(dev) return; +- dev = nfc_connect(NULL); ++ dev = nfc_open(NULL, NULL); + } + + void Nfc::disconnect() { + if (!dev) return; +- nfc_disconnect(dev); ++ nfc_close(dev); + dev = NULL; + } + +--- src/Nfc.h (revision 24) ++++ src/Nfc.h (working copy) +@@ -83,7 +80,7 @@ + + Nfc::Tag* findTag(); + protected: +- nfc_device_t* dev; ++ nfc_device* dev; + + int selectedTag; + MifareTag* tags; +--- src/Utils.h (revision 24) ++++ src/Utils.h (working copy) +@@ -30,7 +30,7 @@ + return ss.str().c_str(); + } + +- static std::string pByteToStrHex(byte_t* bytes, unsigned int len) { ++ static std::string pByteToStrHex(uint8_t* bytes, unsigned int len) { + std::stringstream ss; + for(unsigned int i = 0; i < len; i++) + ss << std::hex << (unsigned int)bytes[i]; -- cgit v1.2.3