Patchwork [1/2] pcsc-lite: new package

login
register
mail settings
Submitter Waldemar Rymarkiewicz
Date Sept. 18, 2012, 12:15 p.m.
Message ID <1347970538-25087-1-git-send-email-waldemar.rymarkiewicz@tieto.com>
Download mbox | patch
Permalink /patch/184701/
State Superseded
Headers show

Comments

Waldemar Rymarkiewicz - Sept. 18, 2012, 12:15 p.m.
Middleware to access a smart card using SCard API (PC/SC).

http://pcsclite.alioth.debian.org/

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
---
 package/Config.in              |    1 +
 package/pcsc-lite/Config.in    |    6 ++++++
 package/pcsc-lite/pcsc-lite.mk |   13 +++++++++++++
 3 files changed, 20 insertions(+)
 create mode 100644 package/pcsc-lite/Config.in
 create mode 100644 package/pcsc-lite/pcsc-lite.mk
Thomas Petazzoni - Sept. 18, 2012, 2:20 p.m.
Dear Waldemar Rymarkiewicz,

On Tue, 18 Sep 2012 14:15:37 +0200, Waldemar Rymarkiewicz wrote:
> Middleware to access a smart card using SCard API (PC/SC).
> 
> http://pcsclite.alioth.debian.org/
> 
> Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
> ---
>  package/Config.in              |    1 +
>  package/pcsc-lite/Config.in    |    6 ++++++
>  package/pcsc-lite/pcsc-lite.mk |   13 +++++++++++++
>  3 files changed, 20 insertions(+)
>  create mode 100644 package/pcsc-lite/Config.in
>  create mode 100644 package/pcsc-lite/pcsc-lite.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index a4e0b2c..dcc84b6 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -395,6 +395,7 @@ source "package/libusb/Config.in"
>  source "package/libusb-compat/Config.in"
>  source "package/libv4l/Config.in"
>  source "package/mtdev/Config.in"
> +source "package/pcsc-lite/Config.in"
>  endmenu
>  
>  menu "Javascript"
> diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in
> new file mode 100644
> index 0000000..7c26427
> --- /dev/null
> +++ b/package/pcsc-lite/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_PCSC_LITE
> +	bool "pcsc-lite"

Since you depend on libusb, you must add:

	select BR2_PACKAGE_LIBUSB
	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb

> +	help
> +	  Middleware to accesss smart card using SCard API (PC/SC).
> +
> +	  http://pcsclite.alioth.debian.org/

And here:

comment "pcsc-lite needs a toolchain with thread support"
	depends on !BR2_TOOLCHAIN_HAS_THREADS

Best regards,

Thomas
Arnout Vandecappelle - Sept. 18, 2012, 9:18 p.m.
On 09/18/12 14:15, Waldemar Rymarkiewicz wrote:
> +PCSC_LITE_CONF_OPT = --disable-libudev --enable-libusb
> +PCSC_LITE_DEPENDENCIES = libusb

  IIRC, libusb is really optional for pcsc-lite. You can use a
construct like:

ifeq ($(BR2_PACKAGE_LIBUSB),y)
PCSC_LITE_CONF_OPT += --enable-libusb
PCSC_LITE_DEPENDENCIES += libusb
else
PCSC_LITE_CONF_OPT += --disable-libusb
endif


  And maybe similarly for udev.


  Your mileage may vary, though. And I think the HAS_THREADS may
still be needed for pcsc-lite itself.

  Regards,
  Arnout
Waldemar Rymarkiewicz - Sept. 19, 2012, 12:54 p.m.
Hi Arnout,

>  IIRC, libusb is really optional for pcsc-lite. You can use a
>construct like:
>
>ifeq ($(BR2_PACKAGE_LIBUSB),y)
>PCSC_LITE_CONF_OPT += --enable-libusb
>PCSC_LITE_DEPENDENCIES += libusb
>else
>PCSC_LITE_CONF_OPT += --disable-libusb
>endif
>

Thanks for comments. Already sent out  v2 of the patches.


Thanks,
/Waldek

Patch

diff --git a/package/Config.in b/package/Config.in
index a4e0b2c..dcc84b6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -395,6 +395,7 @@  source "package/libusb/Config.in"
 source "package/libusb-compat/Config.in"
 source "package/libv4l/Config.in"
 source "package/mtdev/Config.in"
+source "package/pcsc-lite/Config.in"
 endmenu
 
 menu "Javascript"
diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in
new file mode 100644
index 0000000..7c26427
--- /dev/null
+++ b/package/pcsc-lite/Config.in
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_PCSC_LITE
+	bool "pcsc-lite"
+	help
+	  Middleware to accesss smart card using SCard API (PC/SC).
+
+	  http://pcsclite.alioth.debian.org/
diff --git a/package/pcsc-lite/pcsc-lite.mk b/package/pcsc-lite/pcsc-lite.mk
new file mode 100644
index 0000000..eb807f0
--- /dev/null
+++ b/package/pcsc-lite/pcsc-lite.mk
@@ -0,0 +1,13 @@ 
+##########################################################
+#
+# PCSC-Lite
+#
+# ########################################################
+PCSC_LITE_VERSION = 1.8.6
+PCSC_LITE_SOURCE = pcsc-lite-$(PCSC_LITE_VERSION).tar.bz2
+PCSC_LITE_SITE = https://alioth.debian.org/frs/download.php/3757
+PCSC_LITE_INSTALL_STAGING = YES
+PCSC_LITE_CONF_OPT = --disable-libudev --enable-libusb
+PCSC_LITE_DEPENDENCIES = libusb
+
+$(eval $(call autotools-package))