reassign 355281 libchipcard2
retitle 355281 patch to support Debian libccid
tags 355281 +patch +upstream
thanks

As the Debian maintainer of libccid I do not plan to provide two
different binaries of libccid.

As the upstream author of libccid I modified it to make its use as easy
as possible in libchipcard2. The libccid driver uses two functions from
pcscd: debug_msg() and log_xxd() to log through pcscd. To use the same
binary in libchipcard2 the easiest solution is for libchipcard2 to also
provide these two functions. A patch is included below.

The file src/drivers/ccid/driverccid.c is patched to provide the two
needed functions. They just do nothing. You can add some code to
printf() the log message if you want. You can even reuse the file
ccid/src/debug.c from the libccid driver if you want (licence is LGPL).

The file src/drivers/ccid/Makefile.am is patched so that the two
functions are available to external modules. If -export-dynamic is not
used the symbols are not visible from libccid.

The file src/drivers/ccid/Makefile.in is patched so that you do not have
to regenerate the file from Makefile.am. This patch is only needed to
rebuild the Debian package. Upstream only has to patch Makefile.am.

I tested the patch. I suggest to propose it upstream.

Bye,

diff -ru libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/driverccid.c 
libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/driverccid.c
--- libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/driverccid.c     
2005-12-09 01:52:34.000000000 +0100
+++ libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/driverccid.c 
2006-04-18 14:38:42.000000000 +0200
@@ -1032,4 +1032,12 @@
   return errbuf;
 }
 
+void debug_msg(const int priority, const char *fmt, ...)
+{
+}
+
+void log_xxd(const int priority, const char *msg, const unsigned char *buffer,
+       const int size)
+{
+}
 
diff -ru libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.am 
libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.am
--- libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.am      
2005-12-07 16:41:36.000000000 +0100
+++ libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.am  
2006-04-18 15:19:13.000000000 +0200
@@ -19,7 +19,7 @@
 
 ccid_LDADD=../../lib/chipcard2-server/driver/libchipcard2d.la \
   @gwenhywfar_libs@ @libusb_libs@ @libsysfs_libs@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@ -export-dynamic
 
 MAINTAINERCLEANFILES=Makefile.in
 
diff -ru libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.in 
libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.in
--- libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.in      
2006-01-26 14:45:31.000000000 +0100
+++ libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.in  
2006-04-18 15:25:59.000000000 +0200
@@ -277,7 +277,7 @@
   main.c
 
 ccid_LDADD = ../../lib/chipcard2-server/driver/libchipcard2d.la \
-  @gwenhywfar_libs@ @libusb_libs@ @libsysfs_libs@
+  @gwenhywfar_libs@ @libusb_libs@ @libsysfs_libs@ -export-dynamic
 
 ccid_LDFLAGS = @STRIPALL@
 MAINTAINERCLEANFILES = Makefile.in

-- 
 Dr Ludovic Rousseau                        [EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to