diff options
author | znerd <znerd@FreeBSD.org> | 2002-08-08 03:44:31 +0800 |
---|---|---|
committer | znerd <znerd@FreeBSD.org> | 2002-08-08 03:44:31 +0800 |
commit | 71559ae328812a26a34ec707b4645282289b9b3e (patch) | |
tree | 197cf8a45f2c07184c0c2de98c94df7b886e62ec /comms/java-commapi-freebsd/files | |
parent | 28d5117eb77d82649f5b9649d77739a07a7e3c02 (diff) | |
download | freebsd-ports-gnome-71559ae328812a26a34ec707b4645282289b9b3e.tar.gz freebsd-ports-gnome-71559ae328812a26a34ec707b4645282289b9b3e.tar.zst freebsd-ports-gnome-71559ae328812a26a34ec707b4645282289b9b3e.zip |
New port: Java Communication API, FreeBSD implementation.
PR: 31689
Submitted by: Ari Suutari <ari.suutari@syncrontech.com>
Diffstat (limited to 'comms/java-commapi-freebsd/files')
-rw-r--r-- | comms/java-commapi-freebsd/files/patch-aa | 81 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/files/patch-ab | 71 |
2 files changed, 152 insertions, 0 deletions
diff --git a/comms/java-commapi-freebsd/files/patch-aa b/comms/java-commapi-freebsd/files/patch-aa new file mode 100644 index 000000000000..9894113e4628 --- /dev/null +++ b/comms/java-commapi-freebsd/files/patch-aa @@ -0,0 +1,81 @@ +*** Makefile.old Fri Jul 23 20:58:57 1999 +--- Makefile Mon Jul 2 09:49:54 2001 +*************** +*** 4,15 **** + obj/org/freebsd/io/comm/FreebsdParallel.class \ + + +! JAVAC=javac + OBJDIR= obj + JARFILE=jar/CommDriver.jar + JFLAGS= +! LIBDIR=/usr/local/lib +! CFLAGS= -O2 -shared -I /usr/java/include -I /usr/java/include/freebsd -L /usr/java/lib/i386/green_threads/ + obj/%.class: src/%.java + cd src;\ + $(JAVAC) ../$< $(JFLAGS) -d ../obj +--- 4,16 ---- + obj/org/freebsd/io/comm/FreebsdParallel.class \ + + +! JDKDIR=/usr/local/jdk1.3.1 +! JAVAC=$(JDKDIR)/bin/javac + OBJDIR= obj + JARFILE=jar/CommDriver.jar + JFLAGS= +! LIBDIR=$(JDKDIR)/jre/lib/i386 +! CFLAGS= -O2 -shared -I $(JDKDIR)/include -I $(JDKDIR)/include/freebsd + obj/%.class: src/%.java + cd src;\ + $(JAVAC) ../$< $(JFLAGS) -d ../obj +*************** +*** 18,24 **** + + $(JARFILE): $(OBJ) + cd obj; \ +! jar -cvf0 ../$(JARFILE) org/freebsd/io/comm/ + cp jar/* tests/sun/ + cp jar/* tests/java/ + +--- 19,25 ---- + + $(JARFILE): $(OBJ) + cd obj; \ +! $(JDKDIR)/bin/jar -cvf0 ../$(JARFILE) org/freebsd/io/comm/ + cp jar/* tests/sun/ + cp jar/* tests/java/ + +*************** +*** 44,54 **** + + src/org/freebsd/io/comm/org_freebsd_io_comm_FreebsdParallel.h: src/org/freebsd/io/comm/libParallel.c + cd obj; \ +! javah -jni -d ../src/org/freebsd/io/comm/ org.freebsd.io.comm.FreebsdParallel + + src/org/freebsd/io/comm/org_freebsd_io_comm_FreebsdSerial.h: src/org/freebsd/io/comm/libSerial.c + cd obj; \ +! javah -jni -d ../src/org/freebsd/io/comm/ org.freebsd.io.comm.FreebsdSerial + + lib/libParallel.so: src/org/freebsd/io/comm/libParallel.c src/org/freebsd/io/comm/org_freebsd_io_comm_FreebsdParallel.h + gcc $(CFLAGS) -o lib/libParallel.so src/org/freebsd/io/comm/libParallel.c +--- 45,55 ---- + + src/org/freebsd/io/comm/org_freebsd_io_comm_FreebsdParallel.h: src/org/freebsd/io/comm/libParallel.c + cd obj; \ +! $(JDKDIR)/bin/javah -classpath .:$(JDKDIR)/jre/lib/ext/comm.jar -jni -d ../src/org/freebsd/io/comm/ org.freebsd.io.comm.FreebsdParallel + + src/org/freebsd/io/comm/org_freebsd_io_comm_FreebsdSerial.h: src/org/freebsd/io/comm/libSerial.c + cd obj; \ +! $(JDKDIR)/bin/javah -classpath .:$(JDKDIR)/jre/lib/ext/comm.jar -jni -d ../src/org/freebsd/io/comm/ org.freebsd.io.comm.FreebsdSerial + + lib/libParallel.so: src/org/freebsd/io/comm/libParallel.c src/org/freebsd/io/comm/org_freebsd_io_comm_FreebsdParallel.h + gcc $(CFLAGS) -o lib/libParallel.so src/org/freebsd/io/comm/libParallel.c +*************** +*** 62,65 **** +--- 63,68 ---- + install: libs + install -c -o bin -g bin -m 0444 lib/libParallel.so $(LIBDIR) + install -c -o bin -g bin -m 0444 lib/libSerial.so $(LIBDIR) ++ install -c -o bin -g bin -m 0444 jar/CommDriver.jar $(JDKDIR)/jre/lib/ext ++ install -c -o bin -g bin -m 0444 javax.comm.properties $(JDKDIR)/jre/lib + diff --git a/comms/java-commapi-freebsd/files/patch-ab b/comms/java-commapi-freebsd/files/patch-ab new file mode 100644 index 000000000000..29bf69a5a28d --- /dev/null +++ b/comms/java-commapi-freebsd/files/patch-ab @@ -0,0 +1,71 @@ +*** src.orig/org/freebsd/io/comm/libSerial.c Mon Jul 19 08:45:04 1999 +--- src/org/freebsd/io/comm/libSerial.c Mon Jul 2 09:46:38 2001 +*************** +*** 42,47 **** +--- 42,48 ---- + #include <termios.h> + #include <sys/time.h> + #include <sys/ttycom.h> ++ #include <poll.h> + + #define IOEXCEPTION "java/io/IOException" + #define USCOEXCEPTION "javax/comm/UnsupportedCommOperationException" +*************** +*** 579,586 **** + { + int state,old_state; + int fd; +! fd_set rfds; +! struct timeval sleep; + int size; + int ret; + +--- 580,586 ---- + { + int state,old_state; + int fd; +! struct pollfd pollfds; + int size; + int ret; + +*************** +*** 595,605 **** + jthread = (*env)->FindClass( env, "java/lang/Thread" ); + interrupt = (*env)->GetStaticMethodID( env, jthread, "interrupted", "()Z" ); + +! FD_ZERO( &rfds ); +! FD_SET( fd, &rfds ); +! sleep.tv_sec = 1; /* Check every 1 second, or on receive data */ +! sleep.tv_usec = 0; +! + /* Initialization of the current tty state */ + ioctl( fd, TIOCMGET, &old_state); + +--- 595,604 ---- + jthread = (*env)->FindClass( env, "java/lang/Thread" ); + interrupt = (*env)->GetStaticMethodID( env, jthread, "interrupted", "()Z" ); + +! pollfds.fd = fd; +! pollfds.events = POLLIN; +! pollfds.revents = 0; +! + /* Initialization of the current tty state */ + ioctl( fd, TIOCMGET, &old_state); + +*************** +*** 607,613 **** + { + do + { +! ret=select( fd + 1, &rfds, NULL, NULL, &sleep ); + } + while ( (ret < 0) && (errno==EINTR)); + +--- 606,612 ---- + { + do + { +! ret=poll(&pollfds, 1, 1000); + } + while ( (ret < 0) && (errno==EINTR)); + |