diff options
author | Ernst de Haan <znerd@FreeBSD.org> | 2002-08-07 19:44:31 +0000 |
---|---|---|
committer | Ernst de Haan <znerd@FreeBSD.org> | 2002-08-07 19:44:31 +0000 |
commit | 18e35939d7ef3cc5db4a3c6d330e57938ec5c1ec (patch) | |
tree | eed45318717022a76c83a6590b15330c27a65db3 /comms | |
parent | 37fad82f2129c458da0350fc75d645f1c39616f5 (diff) | |
download | ports-18e35939d7ef3cc5db4a3c6d330e57938ec5c1ec.tar.gz ports-18e35939d7ef3cc5db4a3c6d330e57938ec5c1ec.zip |
Notes
Diffstat (limited to 'comms')
-rw-r--r-- | comms/Makefile | 1 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/Makefile | 26 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/distinfo | 1 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/files/patch-aa | 81 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/files/patch-ab | 71 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/pkg-comment | 1 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/pkg-descr | 3 | ||||
-rw-r--r-- | comms/java-commapi-freebsd/pkg-plist | 4 |
8 files changed, 188 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile index 6dd828103e04..741e5e80a8e6 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -19,6 +19,7 @@ SUBDIR += hylafax SUBDIR += ixj SUBDIR += java-commapi + SUBDIR += java-commapi-freebsd SUBDIR += kermit SUBDIR += lrzsz SUBDIR += ltmdm diff --git a/comms/java-commapi-freebsd/Makefile b/comms/java-commapi-freebsd/Makefile new file mode 100644 index 000000000000..0e638817f048 --- /dev/null +++ b/comms/java-commapi-freebsd/Makefile @@ -0,0 +1,26 @@ +# New ports collection makefile for: java freebsd-commapi +# Date created: 2001/07/01 +# Whom: Ari Suutari <ari.suutari@syncrontech.com> +# +# $FreeBSD$ +# + +PORTNAME= java-commapi-freebsd +PORTVERSION= 0.1 +CATEGORIES= comms java +MASTER_SITES= http://homepages.ulb.ac.be/~jdricot/commapi/ +DISTNAME= CommAPI +EXTRACT_SUFX= .tgz + +MAINTAINER= ari.suutari@syncrontech.com + +BUILD_DEPENDS= ${JDK13DIR}/bin/javac:${PORTSDIR}/java/jdk13 \ + ${JDK13DIR}/jre/lib/ext/comm.jar:${PORTSDIR}/comms/java-commapi +RUN_DEPENDS= ${JDK13DIR}/bin/java:${PORTSDIR}/java/jdk13 \ + ${JDK13DIR}/jre/lib/ext/comm.jar:${PORTSDIR}/comms/java-commapi + +JDK13DIR= ${LOCALBASE}/jdk1.3.1 +WRKSRC= ${WRKDIR}/FreeBSD_CommAPI +USE_GMAKE= yes + +.include <bsd.port.mk> diff --git a/comms/java-commapi-freebsd/distinfo b/comms/java-commapi-freebsd/distinfo new file mode 100644 index 000000000000..de2ee023fcd7 --- /dev/null +++ b/comms/java-commapi-freebsd/distinfo @@ -0,0 +1 @@ +MD5 (CommAPI.tgz) = 9c462f5a5ea081a6a559f4a9f4fb06be 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)); + diff --git a/comms/java-commapi-freebsd/pkg-comment b/comms/java-commapi-freebsd/pkg-comment new file mode 100644 index 000000000000..0654fa93f7f9 --- /dev/null +++ b/comms/java-commapi-freebsd/pkg-comment @@ -0,0 +1 @@ +Java Communication API for FreeBSD diff --git a/comms/java-commapi-freebsd/pkg-descr b/comms/java-commapi-freebsd/pkg-descr new file mode 100644 index 000000000000..19868732771b --- /dev/null +++ b/comms/java-commapi-freebsd/pkg-descr @@ -0,0 +1,3 @@ +This is the offical port of Sun's Java Communication API for FreeBSD. +This API allows communications across RS-232 and +parallel lines using Java technology under FreeBSD. diff --git a/comms/java-commapi-freebsd/pkg-plist b/comms/java-commapi-freebsd/pkg-plist new file mode 100644 index 000000000000..39cd27844688 --- /dev/null +++ b/comms/java-commapi-freebsd/pkg-plist @@ -0,0 +1,4 @@ +jdk1.3.1/jre/lib/ext/CommDriver.jar +jdk1.3.1/jre/lib/i386/libSerial.so +jdk1.3.1/jre/lib/i386/libParallel.so +jdk1.3.1/jre/lib/javax.comm.properties |