diff options
Diffstat (limited to 'comms/rxtx')
-rw-r--r-- | comms/rxtx/Makefile | 10 | ||||
-rw-r--r-- | comms/rxtx/distinfo | 4 | ||||
-rw-r--r-- | comms/rxtx/files/patch-RXTXCommDriver.java | 25 | ||||
-rw-r--r-- | comms/rxtx/files/patch-SerialImp.c | 159 | ||||
-rw-r--r-- | comms/rxtx/files/patch-SerialImp.cpp | 53 | ||||
-rw-r--r-- | comms/rxtx/files/patch-SerialImp.h | 16 | ||||
-rw-r--r-- | comms/rxtx/files/patch-configure | 11 | ||||
-rw-r--r-- | comms/rxtx/files/patch-src-ParallelImp.c (renamed from comms/rxtx/files/patch-ParallelImp.c) | 2 | ||||
-rw-r--r-- | comms/rxtx/files/patch-src-gnu-io-RXTXCommDriver.java | 13 | ||||
-rw-r--r-- | comms/rxtx/pkg-descr | 2 | ||||
-rw-r--r-- | comms/rxtx/pkg-plist | 4 |
11 files changed, 24 insertions, 275 deletions
diff --git a/comms/rxtx/Makefile b/comms/rxtx/Makefile index eab9ca3c6866..6af484eaa755 100644 --- a/comms/rxtx/Makefile +++ b/comms/rxtx/Makefile @@ -6,14 +6,14 @@ # PORTNAME= rxtx -PORTVERSION= 2.1.7r2 -PORTREVISION= 7 +PORTVERSION= 2.2p2 CATEGORIES= comms java -MASTER_SITES= ftp://jarvi.dsl.frii.com/pub/rxtx/ +MASTER_SITES= http://rxtx.qbang.org/pub/rxtx/ \ + ftp://jarvi.dsl.frii.com/pub/rxtx/ PKGNAMESUFFIX= -${JAVA_PORT:S/java\///} -DISTNAME= ${PORTNAME}-${PORTVERSION:C/\.([^\.]*)$/-\1/:S/p/pre/} +DISTNAME= ${PORTNAME}-${PORTVERSION:S/p/pre/} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= mirror176@cox.net COMMENT= Native interface to serial ports in Java USE_ZIP= yes diff --git a/comms/rxtx/distinfo b/comms/rxtx/distinfo index bac6b3313519..7a3e196a7d8a 100644 --- a/comms/rxtx/distinfo +++ b/comms/rxtx/distinfo @@ -1,2 +1,2 @@ -SHA256 (rxtx-2.1-7r2.zip) = 31db3852a86105766758975519b27d262407c96cacad4f34ad0de5aae26addd9 -SIZE (rxtx-2.1-7r2.zip) = 1345757 +SHA256 (rxtx-2.2pre2.zip) = 3c30373e760f444def3650c76c5a00ae12fb1d860ec008750d084f4880495b03 +SIZE (rxtx-2.2pre2.zip) = 1491209 diff --git a/comms/rxtx/files/patch-RXTXCommDriver.java b/comms/rxtx/files/patch-RXTXCommDriver.java deleted file mode 100644 index 6003de29a9ce..000000000000 --- a/comms/rxtx/files/patch-RXTXCommDriver.java +++ /dev/null @@ -1,25 +0,0 @@ -Apply patch. - -Patch attached with submission follows: - -*** src/RXTXCommDriver.java.orig Sun Jan 29 23:37:49 2006 ---- src/RXTXCommDriver.java Sun Nov 1 19:36:18 2009 -*************** -*** 588,597 **** ---- 588,601 ---- - else if(osName.equals("FreeBSD")) //FIXME this is probably wrong - { - String[] Temp = { - "ttyd", //general purpose serial ports - "cuaa", //dialout serial ports -+ "ttyu", //general purpose serial ports (uart) -+ "cuau", //dialout serial ports (uart) -+ "ttyU", //USB serial ports -+ "cuaU", //USB dial in serial ports - "ttyA", //Specialix SI/XIO dialin ports - "cuaA", //Specialix SI/XIO dialout ports - "ttyD", //Digiboard - 16 dialin ports - "cuaD", //Digiboard - 16 dialout ports - "ttyE", //Stallion EasyIO (stl) dialin ports - - diff --git a/comms/rxtx/files/patch-SerialImp.c b/comms/rxtx/files/patch-SerialImp.c deleted file mode 100644 index 9a7f0495b59b..000000000000 --- a/comms/rxtx/files/patch-SerialImp.c +++ /dev/null @@ -1,159 +0,0 @@ ---- src/SerialImp.c.orig 2006-01-29 14:19:04.000000000 -0800 -+++ src/SerialImp.c 2010-12-05 22:41:39.000000000 -0800 -@@ -1528,11 +1528,11 @@ - ----------------------------------------------------------*/ - JNIEXPORT jboolean JNICALL RXTXPort(nativeDrain)( JNIEnv *env, - jobject jobj, jboolean interrupted ) - { - int fd = get_java_var( env, jobj,"fd","I" ); -- struct event_info_struct *eis = ( struct event_info_struct * ) get_java_var( env, jobj, "eis", "J" ); -+ struct event_info_struct *eis = ( struct event_info_struct * ) get_java_varP( env, jobj, "eis", "J" ); // does not deref - int result, count=0; - - char message[80]; - - ENTER( "SerialImp.c:drain()" ); -@@ -1545,16 +1545,21 @@ - - sprintf( message, "RXTXPort:drain() returns: %i\n", result ); - report_verbose( message ); - #if defined(__sun__) - /* FIXME: No time to test on all OS's for production */ -+ deref_java_object(env, jobj); - return( JNI_TRUE ); - #endif /* __sun__ */ - LEAVE( "RXTXPort:drain()" ); - if( result ) throw_java_exception( env, IO_EXCEPTION, "nativeDrain", - strerror( errno ) ); -- if( interrupted ) return( JNI_FALSE ); -+ if( interrupted ) -+ { -+ deref_java_object(env, jobj); -+ return( JNI_FALSE ); -+ } - #if !defined(TIOCSERGETLSR) && !defined(WIN32) - if( eis && eis->writing ) - { - eis->writing=JNI_FALSE; - eis->output_buffer_empty_flag = 0; -@@ -1565,10 +1570,12 @@ - struct event_info_struct myeis = - build_threadsafe_eis( env, &jobj, eis ); - send_event( &myeis, SPE_OUTPUT_BUFFER_EMPTY, 1 ); - } - report_time_end( ); -+ -+ deref_java_object(env, jobj); - return( JNI_FALSE ); - } - - /*---------------------------------------------------------- - RXTXPort.sendBreak -@@ -2937,11 +2944,11 @@ - struct timeval tv, *tvP; - fd_set rset; - /* TRENT */ - int flag, count = 0; - struct event_info_struct *eis = ( struct event_info_struct * ) -- get_java_var( env, *jobj,"eis","J" ); -+ get_java_varP( env, *jobj,"eis","J" ); // does not dereference object (pointer remains valid) - - report_time_start(); - flag = eis->eventflags[SPE_DATA_AVAILABLE]; - eis->eventflags[SPE_DATA_AVAILABLE] = 0; - /* -@@ -2957,10 +2964,11 @@ - if (timeout >= 0) { - now = GetTickCount(); - if ( now-start >= timeout ) - { - eis->eventflags[SPE_DATA_AVAILABLE] = flag; -+ deref_java_object( env, *jobj ); - return bytes; - } - } - - FD_ZERO(&rset); -@@ -2983,22 +2991,25 @@ - #endif /* WIN32 */ - if (ret == -1){ - report( "read_byte_array: select returned -1\n" ); - LEAVE( "read_byte_array" ); - eis->eventflags[SPE_DATA_AVAILABLE] = flag; -+ deref_java_object( env, *jobj ); - return -1; - } - else if (ret > 0) - { - if ((ret = READ( fd, buffer + bytes, left )) < 0 ){ - if (errno != EINTR && errno != EAGAIN){ - report( "read_byte_array: read returned -1\n" ); - LEAVE( "read_byte_array" ); - eis->eventflags[SPE_DATA_AVAILABLE] = flag; -+ deref_java_object( env, *jobj ); - return -1; - } - eis->eventflags[SPE_DATA_AVAILABLE] = flag; -+ deref_java_object( env, *jobj ); - return -1; - } - else if ( ret ) { - bytes += ret; - left -= ret; -@@ -3031,10 +3042,12 @@ - report( msg ); - LEAVE( "read_byte_array" ); - report_time_end(); - */ - eis->eventflags[SPE_DATA_AVAILABLE] = flag; -+ -+ deref_java_object( env, *jobj ); - return bytes; - } - - #ifdef asdf - int read_byte_array( JNIEnv *env, -@@ -4898,10 +4911,43 @@ - LEAVE( "get_java_var" ); - */ - return result; - } - -+void deref_java_object( JNIEnv *env, jobject jobj ) -+{ -+ jclass jclazz = (*env)->GetObjectClass( env, jobj ); -+ (*env)->DeleteLocalRef( env, jclazz ); -+} -+ -+void * get_java_varP( JNIEnv *env, jobject jobj, char *id, char *type ) -+{ -+ void * result = 0; -+ jclass jclazz = (*env)->GetObjectClass( env, jobj ); -+ jfieldID jfd = (*env)->GetFieldID( env, jclazz, id, type ); -+ -+/* -+ ENTER( "get_java_var" ); -+*/ -+ if( !jfd ) { -+ (*env)->ExceptionDescribe( env ); -+ (*env)->ExceptionClear( env ); -+ (*env)->DeleteLocalRef( env, jclazz ); -+ LEAVE( "get_java_var" ); -+ return result; -+ } -+ result = (void *)( (*env)->GetObjectField( env, jobj, jfd ) ); -+/* ct7 & gel * Added DeleteLocalRef */ -+// (*env)->DeleteLocalRef( env, jclazz ); -+ if(!strncmp( "fd",id,2) && result == 0) -+ report_error( "get_java_var: invalid file descriptor\n" ); -+/* -+ LEAVE( "get_java_var" ); -+*/ -+ return result; -+} -+ - /*---------------------------------------------------------- - throw_java_exception - - accept: env (keyhole to java) - *exc (exception class name) diff --git a/comms/rxtx/files/patch-SerialImp.cpp b/comms/rxtx/files/patch-SerialImp.cpp deleted file mode 100644 index 0a2688dab8d3..000000000000 --- a/comms/rxtx/files/patch-SerialImp.cpp +++ /dev/null @@ -1,53 +0,0 @@ ---- src/SerialImp.cpp.orig 2004-10-12 01:59:27.000000000 -0700 -+++ src/SerialImp.cpp 2010-12-06 21:48:20.000000000 -0800 -@@ -1736,10 +1736,50 @@ - report("invalid file descriptor\n"); - #endif - return result; - } - -+void deref_java_object( JNIEnv *env, jobject jobj ) -+{ -+ jclass jclazz = env->GetObjectClass( env, jobj ); -+ env->DeleteLocalRef( env, jclazz ); -+} -+ -+void * get_java_varP( JNIEnv *env, jobject jobj, char *id, char *type ) -+{ -+ -+ -+ ////////////////// Open Log File ///////////////////// -+ fp = fopen("RXTXOut.log", "a"); -+ fprintf(fp, "Brian is inside get_java_varP\n"); // !!! -+ fclose(fp); -+ ////////////////// Close Log File //////////////////// -+ -+ void * result = 0; -+ //jclass jclazz = (*env)->GetObjectClass( env, jobj ); -+ jclass jclazz = env->GetObjectClass( jobj ); // !!! -+ //jfieldID jfd = (*env)->GetFieldID( env, jclazz, id, type ); -+ jfieldID jfd = env->GetFieldID( jclazz, id, type ); // !!! -+ -+ if( !jfd ) { -+ //(*env)->ExceptionDescribe( env ); -+ env->ExceptionDescribe(); // !!! -+ //(*env)->ExceptionClear( env ); -+ env->ExceptionClear(); // !!! -+ return result; -+ } -+ //result = (int)( (*env)->GetIntField( env, jobj, jfd ) ); -+ result = (void *)( env->GetIntField( jobj, jfd ) ); // !!! -+/* ct7 & gel * Added DeleteLocalRef */ -+ //(*env)->DeleteLocalRef( env, jclazz ); -+// env->DeleteLocalRef( jclazz ); // !!! -+#ifdef DEBUG -+ if(!strncmp("fd",id,2) && result == 0) -+ report("invalid file descriptor\n"); -+#endif -+ return result; -+} - /*---------------------------------------------------------- - throw_java_exception - - accept: env (keyhole to java) - *exc (exception class name) diff --git a/comms/rxtx/files/patch-SerialImp.h b/comms/rxtx/files/patch-SerialImp.h deleted file mode 100644 index 2bc501079634..000000000000 --- a/comms/rxtx/files/patch-SerialImp.h +++ /dev/null @@ -1,16 +0,0 @@ ---- src/SerialImp.h.orig 2005-07-05 10:47:21.000000000 -0700 -+++ src/SerialImp.h 2010-12-05 21:47:42.000000000 -0800 -@@ -438,8 +438,13 @@ - void system_does_not_unlock( const char *, int ); - int check_group_uucp(); - int check_lock_pid( const char *, int ); - int printj(JNIEnv *env, wchar_t *fmt, ...); - -+// BBB added -+void deref_java_object( JNIEnv *env, jobject jobj ); -+void * get_java_varP( JNIEnv *env, jobject jobj, char *id, char *type ); -+ -+ - #define UNEXPECTED_LOCK_FILE "RXTX Error: Unexpected lock file: %s\n Please report to the RXTX developers\n" - #define LINUX_KERNEL_VERSION_ERROR "\n\n\nRXTX WARNING: This library was compiled to run with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n" - #define UUCP_ERROR "\n\n\nRXTX WARNING: This library requires the user running applications to be in\ngroup uucp. Please consult the INSTALL documentation. More information is\navaiable under the topic 'How can I use Lock Files with rxtx?'\n" diff --git a/comms/rxtx/files/patch-configure b/comms/rxtx/files/patch-configure deleted file mode 100644 index 29e685742757..000000000000 --- a/comms/rxtx/files/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.orig 2008-09-08 22:26:51.000000000 +0200 -+++ configure 2008-09-08 22:27:59.000000000 +0200 -@@ -21611,7 +21611,7 @@ - TARGETLIB="\$(target_triplet)/librxtxSerial.la \ - \$(target_triplet)/librxtxParallel.la" - case $JAVA_VERSION in -- 1.2*|1.3*|1.4*|1.5*) -+ 1.2*|1.3*|1.4*|1.5*|1.6*) - #fix_parameters $JPATH/jre/lib/javax.comm.properties - CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1` - RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" diff --git a/comms/rxtx/files/patch-ParallelImp.c b/comms/rxtx/files/patch-src-ParallelImp.c index 24b304efdb6f..c0c42431b6b6 100644 --- a/comms/rxtx/files/patch-ParallelImp.c +++ b/comms/rxtx/files/patch-src-ParallelImp.c @@ -1,4 +1,4 @@ -$FreeBSD$ +$FreeBSD: /tmp/pcvs/ports/comms/rxtx/files/patch-src-ParallelImp.c,v 1.1 2011-09-17 14:55:56 pawel Exp $ --- src/ParallelImp.c.orig Fri Apr 9 23:31:09 2004 +++ src/ParallelImp.c Fri Apr 9 23:35:01 2004 diff --git a/comms/rxtx/files/patch-src-gnu-io-RXTXCommDriver.java b/comms/rxtx/files/patch-src-gnu-io-RXTXCommDriver.java new file mode 100644 index 000000000000..24e5312590b4 --- /dev/null +++ b/comms/rxtx/files/patch-src-gnu-io-RXTXCommDriver.java @@ -0,0 +1,13 @@ +--- src/gnu/io/RXTXCommDriver.java.orig 2011-03-07 01:33:36.824057319 -0700 ++++ src/gnu/io/RXTXCommDriver.java 2011-03-07 01:33:39.527398898 -0700 +@@ -648,6 +648,10 @@ + String[] Temp = { + "ttyd", //general purpose serial ports + "cuaa", //dialout serial ports ++ "ttyu", //general purpose serial ports (uart) ++ "cuau", //dialout serial ports (uart) ++ "ttyU", //USB serial ports ++ "cuaU", //USB dial in serial ports + "ttyA", //Specialix SI/XIO dialin ports + "cuaA", //Specialix SI/XIO dialout ports + "ttyD", //Digiboard - 16 dialin ports diff --git a/comms/rxtx/pkg-descr b/comms/rxtx/pkg-descr index 9e64ad0c5aa1..6b947ae9651a 100644 --- a/comms/rxtx/pkg-descr +++ b/comms/rxtx/pkg-descr @@ -2,4 +2,4 @@ RXTX: serial and parallel I/O libraries supporting Sun's CommAPI. Open-source implementation of the Java Communications API. Native interface to serial ports in Java. -WWW: http://www.rxtx.org/ +WWW: http://rxtx.qbang.org diff --git a/comms/rxtx/pkg-plist b/comms/rxtx/pkg-plist index 67b07d8a0401..e759292a1fe5 100644 --- a/comms/rxtx/pkg-plist +++ b/comms/rxtx/pkg-plist @@ -1,7 +1,7 @@ lib/ext/RXTXcomm.jar -lib/%%ARCH%%/librxtxParallel-2.1-7.so +lib/%%ARCH%%/librxtxParallel-2.2pre1.so lib/%%ARCH%%/librxtxParallel.la lib/%%ARCH%%/librxtxParallel.so -lib/%%ARCH%%/librxtxSerial-2.1-7.so +lib/%%ARCH%%/librxtxSerial-2.2pre1.so lib/%%ARCH%%/librxtxSerial.la lib/%%ARCH%%/librxtxSerial.so |