mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
New port: Java Communication API, FreeBSD implementation.
PR: 31689 Submitted by: Ari Suutari <ari.suutari@syncrontech.com>
This commit is contained in:
parent
37fad82f21
commit
18e35939d7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=64167
@ -19,6 +19,7 @@
|
||||
SUBDIR += hylafax
|
||||
SUBDIR += ixj
|
||||
SUBDIR += java-commapi
|
||||
SUBDIR += java-commapi-freebsd
|
||||
SUBDIR += kermit
|
||||
SUBDIR += lrzsz
|
||||
SUBDIR += ltmdm
|
||||
|
26
comms/java-commapi-freebsd/Makefile
Normal file
26
comms/java-commapi-freebsd/Makefile
Normal file
@ -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>
|
1
comms/java-commapi-freebsd/distinfo
Normal file
1
comms/java-commapi-freebsd/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (CommAPI.tgz) = 9c462f5a5ea081a6a559f4a9f4fb06be
|
81
comms/java-commapi-freebsd/files/patch-aa
Normal file
81
comms/java-commapi-freebsd/files/patch-aa
Normal file
@ -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
|
||||
|
71
comms/java-commapi-freebsd/files/patch-ab
Normal file
71
comms/java-commapi-freebsd/files/patch-ab
Normal file
@ -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));
|
||||
|
1
comms/java-commapi-freebsd/pkg-comment
Normal file
1
comms/java-commapi-freebsd/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
Java Communication API for FreeBSD
|
3
comms/java-commapi-freebsd/pkg-descr
Normal file
3
comms/java-commapi-freebsd/pkg-descr
Normal file
@ -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.
|
4
comms/java-commapi-freebsd/pkg-plist
Normal file
4
comms/java-commapi-freebsd/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user