aboutsummaryrefslogtreecommitdiffstats
path: root/security/ifd-gpr400/files
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-01-20 15:00:02 +0800
committeredwin <edwin@FreeBSD.org>2003-01-20 15:00:02 +0800
commit3901c6835b934b24087c095675f5763fc57faa50 (patch)
tree6ff1e86e3561b46e3f30769262db3141ae26b467 /security/ifd-gpr400/files
parent8bc326791b21bfce727b76eea69e12545ac3ca60 (diff)
downloadfreebsd-ports-gnome-3901c6835b934b24087c095675f5763fc57faa50.tar.gz
freebsd-ports-gnome-3901c6835b934b24087c095675f5763fc57faa50.tar.zst
freebsd-ports-gnome-3901c6835b934b24087c095675f5763fc57faa50.zip
New port: security/ifd-gpr400: PC/SC Lite IFD for Gemplus GPR400
This is the user-space IFD driver to support the Gemplus GPR400 PCMCIA Smart Card Reader under PC/SC Lite. PR: ports/42697 Submitted by: Bruce M Simpson <bms@spc.org>
Diffstat (limited to 'security/ifd-gpr400/files')
-rw-r--r--security/ifd-gpr400/files/patch-Makefile75
-rw-r--r--security/ifd-gpr400/files/patch-gpr400.h11
-rw-r--r--security/ifd-gpr400/files/patch-gpr400_ifd.c11
-rw-r--r--security/ifd-gpr400/files/patch-pcscdefines.h18
4 files changed, 115 insertions, 0 deletions
diff --git a/security/ifd-gpr400/files/patch-Makefile b/security/ifd-gpr400/files/patch-Makefile
new file mode 100644
index 000000000000..08bead01bc8f
--- /dev/null
+++ b/security/ifd-gpr400/files/patch-Makefile
@@ -0,0 +1,75 @@
+--- Makefile.orig Thu Aug 9 06:14:42 2001
++++ Makefile Sun Sep 8 18:11:11 2002
+@@ -1,36 +1,41 @@
+-# GPR400 IFD Handler Makefile
+-#
+-# Author: Joe Phillips <joe.phillips@innovationsw.com>
+-# Based on the IFD Devkit Makefile by David Corcoran and MUSCLE
+ #
+-# $Id: Makefile,v 1.2 2001/08/09 05:14:42 jaiger Exp $
++# BSD makefile for ifd-gpr400
+ #
+
+-CC = cc
+-CFLAGS = -g -fpic -w
+-LD = ld
+-LEX = flex
+-OBJ := $(filter-out test.o, $(patsubst %.c,%.o,$(wildcard *.c)))
+-INCLUDE = -I.
++#XXX
++PREFIX?= /usr/local
++DESTDIR?= ${PREFIX}
++
++# XXX
++LIBDIR= /lib
++#LIBDIR= /pcsc
++INCSDIR= /include
++
++SHLIB_NAME= libgpr400_ifd.so
++SHLIB_MAJOR= 0
++SHLIB_MINOR= 3
++
++NOMAN= 1
++NOPROFILE= 1
++
++.if !defined(NO_DEBUG)
++CFLAGS+= -g -Wall
++.endif
++
++GPRDEVNAME?= /dev/gprsc0
++
++CFLAGS+= -I. -I${DESTDIR}${INCSDIR} -DGPRDEVNAME=\"${GPRDEVNAME}\"
++LDFLAGS+= -L${DESTDIR}/lib
++LDADD+= -lpcsclite
++
++.if !defined(NO_PCSC_DEBUG)
++CFLAGS+= -DPCSC_DEBUG=1
++.if defined(PCSC_ATR_DEBUG)
++CFLAGS+= -DATR_DEBUG=1
++.endif
++.endif
+
+-MAKEXE = make
+-LIBNAME = libgpr400_ifd.so
+-PREFIX = /usr/local/pcsc
++SRCS= gpr400_ifd.c
++INCS= gpr400.h
+
+-DEFS = -DPCSC_DEBUG=1 #-DATR_DEBUG=1
+-
+-all: unix
+-
+-clean:
+- rm -f *.o $(LIBNAME) core
+-
+-osx: $(OBJ)
+- $(CC) -dynamiclib $(OBJ) -o $(LIBNAME)
+-
+-unix: $(OBJ)
+- $(LD) -shared $(OBJ) -o $(LIBNAME)
+-
+-$(patsubst %.c,%.o,$(wildcard *.c)) : %.o : %.c
+- $(CC) $(CFLAGS) -c $< $(INCLUDE) $(DEFS)
+-
+-##
++.include <bsd.lib.mk>
diff --git a/security/ifd-gpr400/files/patch-gpr400.h b/security/ifd-gpr400/files/patch-gpr400.h
new file mode 100644
index 000000000000..3c5624b5f1cc
--- /dev/null
+++ b/security/ifd-gpr400/files/patch-gpr400.h
@@ -0,0 +1,11 @@
+--- gpr400.h.orig Thu Aug 9 03:14:27 2001
++++ gpr400.h Sun Sep 8 18:10:47 2002
+@@ -18,7 +18,7 @@
+ #ifndef gpr400_h
+ #define gpr400_h
+
+-#include <linux/ioctl.h>
++#include <sys/ioccom.h>
+
+ /*
+ * Structure used to fetch reader status information
diff --git a/security/ifd-gpr400/files/patch-gpr400_ifd.c b/security/ifd-gpr400/files/patch-gpr400_ifd.c
new file mode 100644
index 000000000000..ff08a8b8f152
--- /dev/null
+++ b/security/ifd-gpr400/files/patch-gpr400_ifd.c
@@ -0,0 +1,11 @@
+--- gpr400_ifd.c.orig Wed Aug 22 03:21:43 2001
++++ gpr400_ifd.c Sun Sep 8 18:10:47 2002
+@@ -77,7 +77,7 @@
+ printf("IFDHCreateChannel:\n");
+ #endif
+ if(gpr_fd < 0){
+- gpr_fd= open("/dev/gpr400", O_RDWR);
++ gpr_fd= open(GPRDEVNAME, O_RDWR);
+ if(gpr_fd < 0){
+ return IFD_COMMUNICATION_ERROR;
+ }
diff --git a/security/ifd-gpr400/files/patch-pcscdefines.h b/security/ifd-gpr400/files/patch-pcscdefines.h
new file mode 100644
index 000000000000..a769c874a105
--- /dev/null
+++ b/security/ifd-gpr400/files/patch-pcscdefines.h
@@ -0,0 +1,18 @@
+--- pcscdefines.h.orig Thu Aug 9 03:14:27 2001
++++ pcscdefines.h Sun Sep 8 18:10:47 2002
+@@ -18,6 +18,7 @@
+
+ /* Defines a list of pseudo types. */
+
++#if !defined(__FreeBSD__)
+ typedef unsigned long DWORD;
+ typedef unsigned long* PDWORD;
+ typedef unsigned char UCHAR;
+@@ -25,6 +26,7 @@
+ typedef char* LPSTR;
+ typedef long RESPONSECODE;
+ typedef void VOID;
++#endif
+
+ #define MAX_RESPONSE_SIZE 264
+ #define MAX_ATR_SIZE 33