diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-06-06 03:32:56 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2012-06-06 03:32:56 +0200 |
commit | 2046296222caa085d5eed72f534fae877a5b7dd1 (patch) | |
tree | 06adced907225d69b5ddbba2cce210c25bf70b55 /dev-util/mtools/files/mtools-new-libnfc-version.patch | |
parent | db2605e29fe259d3fdcc27eeb17ecf6ef1ab0a3e (diff) | |
download | overlay-2046296222caa085d5eed72f534fae877a5b7dd1.tar.gz overlay-2046296222caa085d5eed72f534fae877a5b7dd1.tar.xz overlay-2046296222caa085d5eed72f534fae877a5b7dd1.zip |
dev-util/mtools: add live ebuild for mifare gui tools
Diffstat (limited to 'dev-util/mtools/files/mtools-new-libnfc-version.patch')
-rw-r--r-- | dev-util/mtools/files/mtools-new-libnfc-version.patch | 62 |
1 files changed, 62 insertions, 0 deletions
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]; |