aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilman Keskinoz <arved@FreeBSD.org>2011-03-19 12:28:30 +0000
committerTilman Keskinoz <arved@FreeBSD.org>2011-03-19 12:28:30 +0000
commit87299532bc9413841fb71fc920da2fc88f252e81 (patch)
treea9a0d969eb621523e136261b4e08244ee1b5ca70
parentce98777b5c36d7d60fdf87bcf940a42f024f5c38 (diff)
downloadports-87299532bc9413841fb71fc920da2fc88f252e81.tar.gz
ports-87299532bc9413841fb71fc920da2fc88f252e81.zip
Fix build after pcsc-lite upgrade
Merge patches to ifdtest.c into one patch Grab maintainership Reported by: pointyhat
Notes
Notes: svn path=/head/; revision=271304
-rw-r--r--devel/ifd-test/Makefile6
-rw-r--r--devel/ifd-test/files/patch-ifdtest.c55
-rw-r--r--devel/ifd-test/files/patch-pcsc1.4.012
3 files changed, 54 insertions, 19 deletions
diff --git a/devel/ifd-test/Makefile b/devel/ifd-test/Makefile
index 0781efd82de6..0fa7712b2e5e 100644
--- a/devel/ifd-test/Makefile
+++ b/devel/ifd-test/Makefile
@@ -7,11 +7,11 @@
PORTNAME= ifd-test
PORTVERSION= 1.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel security
MASTER_SITES= http://www.linuxnet.com/drivers/readers/files/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= arved@FreeBSD.org
COMMENT= IFD Test Suite for PC/SC Lite
LIB_DEPENDS= pcsclite.1:${PORTSDIR}/devel/pcsc-lite
@@ -26,7 +26,7 @@ MAKE_ENV= LIBS="-L${PREFIX}/lib -lpcsclite ${PTHREAD_LIBS}"
post-patch:
${REINPLACE_CMD} -e "s,LPSTR,LPTSTR,g; s,LPCSTR,LPCTSTR,g; \
s,[P]*SCARD_READERSTATE_A,SCARD_READERSTATE\*,g" \
- ${WRKSRC}/commands.h ${WRKSRC}/ifdtest.c
+ ${WRKSRC}/commands.h
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ifdtest ${PREFIX}/sbin
diff --git a/devel/ifd-test/files/patch-ifdtest.c b/devel/ifd-test/files/patch-ifdtest.c
index 941d443f2397..5dd0d11a232a 100644
--- a/devel/ifd-test/files/patch-ifdtest.c
+++ b/devel/ifd-test/files/patch-ifdtest.c
@@ -1,10 +1,57 @@
---- ifdtest.c.orig Tue Apr 17 17:49:02 2001
-+++ ifdtest.c Wed Aug 28 14:32:32 2002
-@@ -1,6 +1,6 @@
+--- ifdtest.c.orig 2001-04-17 18:49:02.000000000 +0200
++++ ifdtest.c 2011-03-19 13:25:35.000000000 +0100
+@@ -1,6 +1,5 @@
#include <stdio.h>
#include <winscard.h>
-#include <configfile.h>
-+
#include <stdlib.h>
#include "commands.h"
#include <string.h>
+@@ -21,13 +20,13 @@
+ UCHAR value[300];
+ struct ReaderContext *rContext;
+ SCARD_IO_REQUEST sSendPci, sRecvPci;
+-PSCARD_READERSTATE_A rgReaderStates[1];
++SCARD_READERSTATE* rgReaderStates[1];
+ DWORD dwReaderLen, dwState, dwProt, dwAtrLen;
+ DWORD dwSendLength, dwRecvLength, dwPref, dwReaders;
+-LPSTR pcReaders, mszReaders;
++LPTSTR pcReaders, mszReaders;
+ BYTE pbAtr[MAX_ATR_SIZE];
+ BYTE s[300], r[300];
+-LPCSTR mszGroups;
++LPCTSTR mszGroups;
+ LONG rv;
+ DWORD state;
+ DWORD protocol;
+@@ -110,18 +109,12 @@
+ }
+ if( outfile != NULL) fp = fopen(outfile,"w");
+ else fp=NULL;
+- rv = SCardEstablishContext( SCARD_SCOPE_GLOBAL, pcHost, NULL, &hContext );
++ rv = SCardEstablishContext( SCARD_SCOPE_SYSTEM, pcHost, NULL, &hContext );
+ if ( rv != SCARD_S_SUCCESS ) {
+ myprintf("ERROR :: Resource Manager not running \n");
+ myprintf("Please start the resource manager and try again \n");
+ return 1;
+ }
+- rv = SCardSetTimeout(hContext,100);
+- if ( rv != SCARD_S_SUCCESS ) {
+- myprintf("ERROR :: Cannot Set timeout \n");
+- myprintf("PCSC ERROR: %s\n", pcsc_stringify_error(rv));
+- return -1;
+- }
+ rv = SCardGetStatusChange( hContext, INFINITE, 0, 0 );
+
+ if ( rv != SCARD_S_SUCCESS ) {
+@@ -162,8 +155,8 @@
+ } while ( iReader > p || iReader <= 0 );
+
+ rgReaderStates[0] =
+- (PSCARD_READERSTATE_A)
+- malloc(sizeof(SCARD_READERSTATE_A));
++ (SCARD_READERSTATE*)
++ malloc(sizeof(SCARD_READERSTATE*));
+ strcpy(readerName,&mszReaders[iList[iReader]]);
+ printVersion(readerName);
+ (rgReaderStates[0])->szReader = strdup(readerName);
diff --git a/devel/ifd-test/files/patch-pcsc1.4.0 b/devel/ifd-test/files/patch-pcsc1.4.0
index 6d60c93364bd..b594888948c2 100644
--- a/devel/ifd-test/files/patch-pcsc1.4.0
+++ b/devel/ifd-test/files/patch-pcsc1.4.0
@@ -1,15 +1,3 @@
-diff -ru ifd-test-1.0/ifdtest.c ifd-test-1.0.new/ifdtest.c
---- ifd-test-1.0/ifdtest.c 2001-04-17 18:49:02.000000000 +0200
-+++ ifdtest.c 2007-03-02 16:24:40.000000000 +0100
-@@ -110,7 +110,7 @@
- }
- if( outfile != NULL) fp = fopen(outfile,"w");
- else fp=NULL;
-- rv = SCardEstablishContext( SCARD_SCOPE_GLOBAL, pcHost, NULL, &hContext );
-+ rv = SCardEstablishContext( SCARD_SCOPE_SYSTEM, pcHost, NULL, &hContext );
- if ( rv != SCARD_S_SUCCESS ) {
- myprintf("ERROR :: Resource Manager not running \n");
- myprintf("Please start the resource manager and try again \n");
diff -ru ifd-test-1.0/testGD.c ifd-test-1.0.new/testGD.c
--- ifd-test-1.0/testGD.c 2001-04-17 18:49:01.000000000 +0200
+++ testGD.c 2007-03-02 16:23:52.000000000 +0100