diff options
author | arved <arved@FreeBSD.org> | 2009-07-25 18:40:28 +0800 |
---|---|---|
committer | arved <arved@FreeBSD.org> | 2009-07-25 18:40:28 +0800 |
commit | 53afa6de2c4660edb6a0d1ae7ec3b3bb76dea7fb (patch) | |
tree | 9c2073383fd019bf55ff89e67f4f344a375967da | |
parent | 9f1417f4533ea38823fa602ca404767c3a8348df (diff) | |
download | freebsd-ports-gnome-53afa6de2c4660edb6a0d1ae7ec3b3bb76dea7fb.tar.gz freebsd-ports-gnome-53afa6de2c4660edb6a0d1ae7ec3b3bb76dea7fb.tar.zst freebsd-ports-gnome-53afa6de2c4660edb6a0d1ae7ec3b3bb76dea7fb.zip |
Add ocfpcsc, A library to provide a means to use Open Card Framework to talk
to PC/SC supported smartcard readers.
PR: 136948
Submitted by: Marcin Cieslak
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/ocfpcsc/Makefile | 74 | ||||
-rw-r--r-- | devel/ocfpcsc/distinfo | 3 | ||||
-rw-r--r-- | devel/ocfpcsc/files/patch-fieldIO.cpp | 56 | ||||
-rw-r--r-- | devel/ocfpcsc/files/patch-fieldIO.h | 54 | ||||
-rw-r--r-- | devel/ocfpcsc/pkg-descr | 5 | ||||
-rw-r--r-- | devel/ocfpcsc/pkg-plist | 7 |
7 files changed, 200 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 4bb2cfa8b8a7..c6671796e05c 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -916,6 +916,7 @@ SUBDIR += ocaml-xstr SUBDIR += ocaml-xstrp4 SUBDIR += ocamlweb + SUBDIR += ocfpcsc SUBDIR += ode SUBDIR += ode-devel SUBDIR += ois diff --git a/devel/ocfpcsc/Makefile b/devel/ocfpcsc/Makefile new file mode 100644 index 000000000000..3103a7a513de --- /dev/null +++ b/devel/ocfpcsc/Makefile @@ -0,0 +1,74 @@ +# New ports collection makefile for: ocfpcsc +# Date created: 2009-01-07 +# Whom: Marcin Cieslak <saper@SYSTEM.PL> +# +# $FreeBSD$ +# + +PORTNAME= ocfpcsc +PORTVERSION= 0.0.1 +CATEGORIES= devel security java +MASTER_SITES= http://www.musclecard.com/middleware/files/ +DISTNAME= OCFPCSC1-${PORTVERSION} + +MAINTAINER= saper@SYSTEM.PL +COMMENT= Open Card Framework to PC/SC bridge + +LIB_DEPENDS= pcsclite.1:${PORTSDIR}/devel/pcsc-lite + +USE_GMAKE= yes +USE_JAVA= 1.2+ +USE_LDCONFIG= yes + +CFLAGS+= -fPIC + +PORTEXAMPLES= opencard.properties +PORTDOCS= README + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_MOZILLA_PLUGIN) +PLIST_SUB+= PLUGIN="" +.else +PLIST_SUB+= PLUGIN="@comment " +.endif + +post-patch: + ${REINPLACE_CMD} -e 's,malloc.h,stdlib.h,' \ + ${WRKSRC}/PcscExceptions.cpp + ${TOUCH} ${WRKSRC}/dummy.cpp + +do-configure: + @${REINPLACE_CMD} \ + -e 's,CC =.*,CC = ${CXX},' \ + -e 's,PCSC_HDRS =.*,PCSC_HDRS = -I${LOCALBASE}/include/PCSC,' \ + -e 's,PCSC_LIBS =.*,PCSC_LIBS = -L${LOCALBASE}/lib -lpcsclite,' \ + -e 's,JDK_HOME =.*,JDK_HOME = ${JAVA_HOME},'\ + -e 's,genunix,freebsd,' \ + ${WRKSRC}/Makefile + +post-build: + # Create and install a dummy library for applets that + # think they require WINSCARD.DLL + (cd ${WRKSRC} && ${LD} -Bsymbolic -shared dummy.o -o libWINSCARD.so) + +do-install: +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} +.endif +.if !defined(NOPORTEXAMPLES) + @${MKDIR} ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/opencard.properties ${EXAMPLESDIR} +.endif + @${INSTALL_DATA} ${WRKSRC}/libOCFPCSC1.so ${PREFIX}/lib/libOCFPCSC1.so.1 + @${INSTALL_DATA} ${WRKSRC}/libWINSCARD.so ${PREFIX}/lib/libWINSCARD.so.1 + @${LN} -fs ${PREFIX}/lib/libOCFPCSC1.so.1 ${PREFIX}/lib/libOCFPCSC1.so + @${LN} -fs ${PREFIX}/lib/libWINSCARD.so.1 ${PREFIX}/lib/libWINSCARD.so +.if !defined (WITHOUT_MOZILLA_PLUGIN) + @${MKDIR} ${PREFIX}/lib/browser_plugins + @${LN} -fs ${PREFIX}/lib/libOCFPCSC1.so.1 ${PREFIX}/lib/browser_plugins/libOCFPCSC1.so + @${LN} -fs ${PREFIX}/lib/libWINSCARD.so.1 ${PREFIX}/lib/browser_plugins/libWINSCARD.so +.endif + +.include <bsd.port.post.mk> diff --git a/devel/ocfpcsc/distinfo b/devel/ocfpcsc/distinfo new file mode 100644 index 000000000000..518fc80ac1c2 --- /dev/null +++ b/devel/ocfpcsc/distinfo @@ -0,0 +1,3 @@ +MD5 (OCFPCSC1-0.0.1.tar.gz) = bf397949bffe3b75b652c6ba44a431dd +SHA256 (OCFPCSC1-0.0.1.tar.gz) = 56deb4d4c8b5adb74ca47027d4772353bdb4043a7b414adf3bbed537296518a1 +SIZE (OCFPCSC1-0.0.1.tar.gz) = 11436 diff --git a/devel/ocfpcsc/files/patch-fieldIO.cpp b/devel/ocfpcsc/files/patch-fieldIO.cpp new file mode 100644 index 000000000000..79bc2ef741a1 --- /dev/null +++ b/devel/ocfpcsc/files/patch-fieldIO.cpp @@ -0,0 +1,56 @@ +--- fieldIO.cpp.orig 2009-01-07 17:34:29.486504988 +0100 ++++ fieldIO.cpp 2009-01-07 17:34:39.651535899 +0100 +@@ -58,7 +58,7 @@ + * != 0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long getIntField(JNIEnv *env, jobject obj, char *fieldName, long *pFieldValue) { ++long getIntField(JNIEnv *env, jobject obj, const char *fieldName, long *pFieldValue) { + long rc = 1; + jfieldID fid; + +@@ -92,7 +92,7 @@ + * != 0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long setIntField(JNIEnv *env, jobject obj, char *fieldName, long fieldValue) { ++long setIntField(JNIEnv *env, jobject obj, const char *fieldName, long fieldValue) { + long rc = 1; + jfieldID fid; + +@@ -132,7 +132,7 @@ + ******************************************************************************/ + long accessByteArray(JNIEnv *env, + jobject obj, +- char *fieldName, ++ const char *fieldName, + unsigned char **field, + int *pSize) { + +@@ -182,7 +182,7 @@ + * !=0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long releaseByteArray(JNIEnv *env, jobject obj, char *fieldName, unsigned char *pByte) { ++long releaseByteArray(JNIEnv *env, jobject obj, const char *fieldName, unsigned char *pByte) { + + long rc=1; + jfieldID fid; +@@ -225,7 +225,7 @@ + * NULL - problem occurred, exception was thrown + * + ******************************************************************************/ +-const char *accessStringField(JNIEnv *env, jobject obj, char *fieldName) { ++const char *accessStringField(JNIEnv *env, jobject obj, const char *fieldName) { + jfieldID fid; + jstring jstr; + const char *pstr = NULL; +@@ -261,7 +261,7 @@ + * != 0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long releaseStringField(JNIEnv *env, jobject obj, char *fieldName, const char *field) { ++long releaseStringField(JNIEnv *env, jobject obj, const char *fieldName, const char *field) { + jfieldID fid; + jstring jstr; + int error = 1; diff --git a/devel/ocfpcsc/files/patch-fieldIO.h b/devel/ocfpcsc/files/patch-fieldIO.h new file mode 100644 index 000000000000..392b7d52f23e --- /dev/null +++ b/devel/ocfpcsc/files/patch-fieldIO.h @@ -0,0 +1,54 @@ +--- fieldIO.h 2009-01-07 17:34:35.118522599 +0100 ++++ fieldIO.h 2009-01-07 17:34:39.651535899 +0100 +@@ -55,7 +55,7 @@ + * != 0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long getIntField(JNIEnv *, jobject, char *, long *); ++long getIntField(JNIEnv *, jobject, const char *, long *); + + + /******************************************************************************* +@@ -75,7 +75,7 @@ + * != 0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long setIntField(JNIEnv *, jobject, char *, long); ++long setIntField(JNIEnv *, jobject, const char *, long); + + + /******************************************************************************* +@@ -99,7 +99,7 @@ + * != 0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long accessByteArray(JNIEnv *, jobject, char *, unsigned char **, int *); ++long accessByteArray(JNIEnv *, jobject, const char *, unsigned char **, int *); + + + /******************************************************************************* +@@ -120,7 +120,7 @@ + * !=0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long releaseByteArray(JNIEnv *, jobject, char *, unsigned char *); ++long releaseByteArray(JNIEnv *, jobject, const char *, unsigned char *); + + + /******************************************************************************* +@@ -141,7 +141,7 @@ + * NULL - problem occurred, exception was thrown + * + ******************************************************************************/ +-const char *accessStringField(JNIEnv *, jobject, char *); ++const char *accessStringField(JNIEnv *, jobject, const char *); + + + /******************************************************************************* +@@ -160,5 +160,5 @@ + * != 0 - problem occurred, exception was thrown + * + ******************************************************************************/ +-long releaseStringField(JNIEnv *, jobject, char *, const char *); ++long releaseStringField(JNIEnv *, jobject, const char *, const char *); + diff --git a/devel/ocfpcsc/pkg-descr b/devel/ocfpcsc/pkg-descr new file mode 100644 index 000000000000..340d31017874 --- /dev/null +++ b/devel/ocfpcsc/pkg-descr @@ -0,0 +1,5 @@ +A library to provide a means to use Open Card Framework to talk +to PC/SC supported smartcard readers. + +Author: David Corcoran +WWW: http://www.musclecard.com/middleware/ diff --git a/devel/ocfpcsc/pkg-plist b/devel/ocfpcsc/pkg-plist new file mode 100644 index 000000000000..7255d5806a9f --- /dev/null +++ b/devel/ocfpcsc/pkg-plist @@ -0,0 +1,7 @@ +%%PLUGIN%%lib/browser_plugins/libOCFPCSC1.so +%%PLUGIN%%lib/browser_plugins/libWINSCARD.so +lib/libOCFPCSC1.so +lib/libOCFPCSC1.so.1 +lib/libWINSCARD.so +lib/libWINSCARD.so.1 +%%PLUGIN%%@dirrmtry lib/browser_plugins |