From fa6f144326eadb1c6632d7fc4836c9c70bc0b965 Mon Sep 17 00:00:00 2001 From: Tilman Keskinoz Date: Wed, 20 Apr 2005 13:33:39 +0000 Subject: [PATCH] Add libccid, a USB CCID (Chip/Smart Card Interface Device) driver. This was tested with a Gemplus GemPC Twin and an SCM Micro SPR 532 --- devel/Makefile | 1 + devel/libccid/Makefile | 32 ++++++++++++++++++++++++++++ devel/libccid/distinfo | 2 ++ devel/libccid/files/patch-checksum.c | 12 +++++++++++ devel/libccid/files/patch-checksum.h | 12 +++++++++++ devel/libccid/files/patch-configure | 20 +++++++++++++++++ devel/libccid/files/patch-proto-tl.h | 12 +++++++++++ devel/libccid/pkg-descr | 4 ++++ devel/libccid/pkg-plist | 6 ++++++ 9 files changed, 101 insertions(+) create mode 100644 devel/libccid/Makefile create mode 100644 devel/libccid/distinfo create mode 100644 devel/libccid/files/patch-checksum.c create mode 100644 devel/libccid/files/patch-checksum.h create mode 100644 devel/libccid/files/patch-configure create mode 100644 devel/libccid/files/patch-proto-tl.h create mode 100644 devel/libccid/pkg-descr create mode 100644 devel/libccid/pkg-plist diff --git a/devel/Makefile b/devel/Makefile index ecf3080d6105..46b097c4f520 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -414,6 +414,7 @@ SUBDIR += libbonobo SUBDIR += libbonobomm SUBDIR += libcapsinetwork + SUBDIR += libccid SUBDIR += libcheck SUBDIR += libchipcard SUBDIR += libchipcard-kde diff --git a/devel/libccid/Makefile b/devel/libccid/Makefile new file mode 100644 index 000000000000..476097431b80 --- /dev/null +++ b/devel/libccid/Makefile @@ -0,0 +1,32 @@ +# New ports collection Makefile for: libccid +# Date created: 2005-01-20 +# Whom: arved +# +# $FreeBSD$ + +PORTNAME= ccid +PORTVERSION= 0.9.3 +CATEGORIES= devel +MASTER_SITES= http://alioth.debian.org/download.php/992/ + +MAINTAINER= arved@FreeBSD.org +COMMENT= Generic USB CCID (Chip/Smart Card Interface Devices) driver + +LIB_DEPENDS= usb-0.1.8:${PORTSDIR}/devel/libusb \ + pcsclite.1:${PORTSDIR}/devel/pcsc-lite + +USE_REINPLACE= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-libusb=${LOCALBASE} \ + --enable-usbdropdir=${LOCALBASE}/lib/pcsc/drivers \ + --enable-ccidtwindir=${LOCALBASE}/lib/pcsc/drivers/serial \ + --enable-pcsclite=yes +CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \ + LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}" + +post-patch: +# ${REINPLACE_CMD} -e "s,-lpcsclite,-lpcsclite ${PTHREAD_LIBS}," \ +# ${WRKSRC}/examples/Makefile.in + ${REINPLACE_CMD} -e "s,LDLIBS,LIBS,g" ${WRKSRC}/configure + +.include diff --git a/devel/libccid/distinfo b/devel/libccid/distinfo new file mode 100644 index 000000000000..9edab24a9077 --- /dev/null +++ b/devel/libccid/distinfo @@ -0,0 +1,2 @@ +MD5 (ccid-0.9.3.tar.gz) = 8acb2393aa9e00a2e7ad845ee60b52df +SIZE (ccid-0.9.3.tar.gz) = 484763 diff --git a/devel/libccid/files/patch-checksum.c b/devel/libccid/files/patch-checksum.c new file mode 100644 index 000000000000..b7a0eed7503b --- /dev/null +++ b/devel/libccid/files/patch-checksum.c @@ -0,0 +1,12 @@ +--- src/openct/checksum.c.orig Wed Apr 20 15:16:48 2005 ++++ src/openct/checksum.c Wed Apr 20 15:17:04 2005 +@@ -5,7 +5,9 @@ + * For licensing, see the file LICENCE + */ + ++#ifdef HAVE_STDINT_H + #include ++#endif + #include + + #define min( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) ) diff --git a/devel/libccid/files/patch-checksum.h b/devel/libccid/files/patch-checksum.h new file mode 100644 index 000000000000..06d0af492370 --- /dev/null +++ b/devel/libccid/files/patch-checksum.h @@ -0,0 +1,12 @@ +--- src/openct/checksum.h.orig Wed Apr 20 15:18:03 2005 ++++ src/openct/checksum.h Wed Apr 20 15:18:18 2005 +@@ -22,7 +22,9 @@ + #ifndef __CHECKSUM_H__ + #define __CHECKSUM_H__ + ++#ifdef HAVE_STDINT_H + #include ++#endif + #include + + extern unsigned int csum_lrc_compute(const uint8_t *, size_t, unsigned char *); diff --git a/devel/libccid/files/patch-configure b/devel/libccid/files/patch-configure new file mode 100644 index 000000000000..a38f55471528 --- /dev/null +++ b/devel/libccid/files/patch-configure @@ -0,0 +1,20 @@ +--- configure.orig Fri Apr 8 18:14:57 2005 ++++ configure Fri Apr 8 18:18:13 2005 +@@ -20223,6 +20223,17 @@ + CFLAGS="$CFLAGS -no-cpp-precomp" + fi + ;; ++*-*-freebsd*) ++ BUNDLE_HOST="FreeBSD" ++ DYN_LIB_EXT="so" ++if false; then ++ NEED_PARSER_TRUE= ++ NEED_PARSER_FALSE='#' ++else ++ NEED_PARSER_TRUE='#' ++ NEED_PARSER_FALSE= ++fi ++ ;; + *) + BUNDLE_HOST="Linux" + DYN_LIB_EXT="so" diff --git a/devel/libccid/files/patch-proto-tl.h b/devel/libccid/files/patch-proto-tl.h new file mode 100644 index 000000000000..d25e45d17030 --- /dev/null +++ b/devel/libccid/files/patch-proto-tl.h @@ -0,0 +1,12 @@ +--- src/openct/proto-t1.h.orig Wed Apr 20 15:15:06 2005 ++++ src/openct/proto-t1.h Wed Apr 20 15:15:25 2005 +@@ -23,7 +23,9 @@ + #define __PROTO_T1_H__ + + #include ++#ifdef HAVE_STDINT_H + #include ++#endif + + enum { + IFD_PROTOCOL_RECV_TIMEOUT = 0x0000, diff --git a/devel/libccid/pkg-descr b/devel/libccid/pkg-descr new file mode 100644 index 000000000000..29c8c3c6b688 --- /dev/null +++ b/devel/libccid/pkg-descr @@ -0,0 +1,4 @@ +Generic USB CCID (Chip/Smart Card Interface Devices) driver. + +Author: Ludovic Rousseau +WWW: http://pcsclite.alioth.debian.org/ccid.html diff --git a/devel/libccid/pkg-plist b/devel/libccid/pkg-plist new file mode 100644 index 000000000000..41af2a71873f --- /dev/null +++ b/devel/libccid/pkg-plist @@ -0,0 +1,6 @@ +lib/pcsc/drivers/ifd-ccid.bundle/Contents/FreeBSD/libccid.so.0.9.3 +lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist +@dirrm lib/pcsc/drivers/ifd-ccid.bundle/Contents/FreeBSD +@dirrm lib/pcsc/drivers/ifd-ccid.bundle/Contents +@dirrm lib/pcsc/drivers/ifd-ccid.bundle +@dirrm lib/pcsc/drivers