. Update to 0.2.
PR: 48658 Submitted by: Ari Suutari <ari.suutari@syncrontech.com> (maintainer)
This commit is contained in:
parent
6fda2ec978
commit
9a18dba351
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=82702
4 changed files with 10 additions and 164 deletions
|
@ -6,22 +6,20 @@
|
|||
#
|
||||
|
||||
PORTNAME= java-commapi-freebsd
|
||||
PORTVERSION= 0.1
|
||||
PORTVERSION= 0.2
|
||||
CATEGORIES= comms java
|
||||
MASTER_SITES= http://homepages.ulb.ac.be/~jdricot/commapi/
|
||||
DISTNAME= CommAPI
|
||||
EXTRACT_SUFX= .tgz
|
||||
MASTER_SITES= http://www.syncrontech.org/freebsd/
|
||||
DISTNAME= freebsd-commapi-0.2
|
||||
|
||||
MAINTAINER= ari.suutari@syncrontech.com
|
||||
COMMENT= Java Communication API for FreeBSD
|
||||
|
||||
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
|
||||
BUILD_DEPENDS= ${JDKDIR}/bin/javac:${PORTSDIR}/java/jdk13 \
|
||||
${JDKDIR}/jre/lib/ext/comm.jar:${PORTSDIR}/comms/java-commapi
|
||||
RUN_DEPENDS= ${JDKDIR}/bin/java:${PORTSDIR}/java/jdk13 \
|
||||
${JDKDIR}/jre/lib/ext/comm.jar:${PORTSDIR}/comms/java-commapi
|
||||
|
||||
JDK13DIR= ${LOCALBASE}/jdk1.3.1
|
||||
WRKSRC= ${WRKDIR}/FreeBSD_CommAPI
|
||||
USE_GMAKE= yes
|
||||
JDKDIR= ${LOCALBASE}/jdk1.3.1
|
||||
MAKE_ENV= JAVA_HOME=${JDKDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1 +1 @@
|
|||
MD5 (CommAPI.tgz) = 9c462f5a5ea081a6a559f4a9f4fb06be
|
||||
MD5 (freebsd-commapi-0.2.tar.gz) = 06161a300cf239e35f9fdf4100b308dd
|
||||
|
|
|
@ -1,81 +0,0 @@
|
|||
*** 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
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
*** 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));
|
||||
|
Loading…
Reference in a new issue