upgrade pcsc-lite

This commit is contained in:
Huang Xin 2022-07-04 23:04:16 -07:00
parent 3a5ace221f
commit 4ccd424378
2 changed files with 94 additions and 0 deletions

View File

@ -0,0 +1,42 @@
From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Mon, 27 Jan 2020 13:27:12 +0000
Subject: [PATCH] pcsc-spy: use python3 only
Python2 has been EOL and most distributions would not provide any
support for it anymore. Since Python3 is available in all distributions
now, switch pcsc-spy to use it exclusively.
Upstream-Status: Pending
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
src/spy/pcsc-spy | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
index 85222c6..965138e 100755
--- a/src/spy/pcsc-spy
+++ b/src/spy/pcsc-spy
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#!/usr/bin/env python3
"""
# Display PC/SC functions arguments
@@ -22,12 +22,7 @@ from __future__ import print_function
import os
import signal
import time
-try:
- # for Python3
- from queue import Queue
-except ImportError:
- # for Python2
- from Queue import Queue
+from queue import Queue
from threading import Thread
from operator import attrgetter
--
2.17.1

View File

@ -0,0 +1,52 @@
SUMMARY = "PC/SC Lite smart card framework and applications"
HOMEPAGE = "http://pcsclite.alioth.debian.org/"
LICENSE = "BSD & GPLv3+"
LICENSE_${PN} = "BSD"
LICENSE_${PN}-lib = "BSD"
LICENSE_${PN}-doc = "BSD"
LICENSE_${PN}-dev = "BSD"
LICENSE_${PN}-dbg = "BSD & GPLv3+"
LICENSE_${PN}-spy = "GPLv3+"
LICENSE_${PN}-spy-dev = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
DEPENDS = "udev"
SRC_URI = "\
https://pcsclite.apdu.fr/files/${BP}.tar.bz2 \
file://0001-pcsc-spy-use-python3-only.patch \
"
SRC_URI[md5sum] = "eb595f2d398ff229207a6ec09fbc4e98"
SRC_URI[sha256sum] = "0148d403137124552c5d0f10f8cdab2cbb8dfc7c6ce75e018faf667be34f2ef9"
inherit autotools systemd pkgconfig
EXTRA_OECONF = " \
--disable-libusb \
--enable-libudev \
--enable-usbdropdir=${libdir}/pcsc/drivers \
"
S = "${WORKDIR}/pcsc-lite-${PV}"
PACKAGES = "${PN} ${PN}-dbg ${PN}-dev ${PN}-lib ${PN}-doc ${PN}-spy ${PN}-spy-dev"
RRECOMMENDS_${PN} = "ccid"
FILES_${PN} = "${sbindir}/pcscd"
FILES_${PN}-lib = "${libdir}/libpcsclite*${SOLIBS}"
FILES_${PN}-dev = "${includedir} \
${libdir}/pkgconfig \
${libdir}/libpcsclite.la \
${libdir}/libpcsclite.so"
FILES_${PN}-spy = "${bindir}/pcsc-spy \
${libdir}/libpcscspy*${SOLIBS}"
FILES_${PN}-spy-dev = "${libdir}/libpcscspy.la \
${libdir}/libpcscspy.so "
RPROVIDES_${PN} += "${PN}-systemd"
RREPLACES_${PN} += "${PN}-systemd"
RCONFLICTS_${PN} += "${PN}-systemd"
SYSTEMD_SERVICE_${PN} = "pcscd.socket"
RDEPENDS_${PN}-spy +="python"