diff options
author | ehaupt <ehaupt@FreeBSD.org> | 2011-01-05 17:43:57 +0800 |
---|---|---|
committer | ehaupt <ehaupt@FreeBSD.org> | 2011-01-05 17:43:57 +0800 |
commit | 6659210b9da95459418c8b86250dc6e84c44dc6b (patch) | |
tree | 0ca3b1252cc391f110ef536c7d13748ba393f092 | |
parent | 39ac7c5b5029b89f79331cc0e819f534ca64df5c (diff) | |
download | freebsd-ports-gnome-6659210b9da95459418c8b86250dc6e84c44dc6b.tar.gz freebsd-ports-gnome-6659210b9da95459418c8b86250dc6e84c44dc6b.tar.zst freebsd-ports-gnome-6659210b9da95459418c8b86250dc6e84c44dc6b.zip |
Add remserial, a communication bridge between a TCP/IP network port and a
character-oriented device.
-rw-r--r-- | comms/Makefile | 1 | ||||
-rw-r--r-- | comms/remserial/Makefile | 32 | ||||
-rw-r--r-- | comms/remserial/distinfo | 2 | ||||
-rw-r--r-- | comms/remserial/files/patch-define.h | 4 | ||||
-rw-r--r-- | comms/remserial/files/patch-remserial.c | 20 | ||||
-rw-r--r-- | comms/remserial/files/patch-stty.c | 49 | ||||
-rw-r--r-- | comms/remserial/pkg-descr | 13 |
7 files changed, 121 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile index 439d1d224b83..6522e068b37e 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -115,6 +115,7 @@ SUBDIR += qpage SUBDIR += qrq SUBDIR += qsstv + SUBDIR += remserial SUBDIR += ruby-serialport SUBDIR += ruby-termios SUBDIR += rubygem-callsign diff --git a/comms/remserial/Makefile b/comms/remserial/Makefile new file mode 100644 index 000000000000..60d77d94bba8 --- /dev/null +++ b/comms/remserial/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: remserial +# Date created: 05 Jan 2011 +# Whom: Emanuel Haupt <ehaupt@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= remserial +PORTVERSION= 1.4 +CATEGORIES= comms +MASTER_SITES= http://lpccomp.bc.ca/remserial/ \ + CRITICAL + +MAINTAINER= ehaupt@FreeBSD.org +COMMENT= Bridge between a TCP/IP network port and a character-oriented device + +USE_DOS2UNIX= yes +MAKE_JOBS_SAFE= yes + +PLIST_FILES= bin/remserial +PORTDOCS= README.txt + +CFLAGS+= -DOSVERSION=\"${OSVERSION}\" + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/comms/remserial/distinfo b/comms/remserial/distinfo new file mode 100644 index 000000000000..dec9a5c68b40 --- /dev/null +++ b/comms/remserial/distinfo @@ -0,0 +1,2 @@ +SHA256 (remserial-1.4.tar.gz) = 4cbe9c754a2be4926789500bafb84bda54e11b01aab522a3ce71ec4db615fefb +SIZE (remserial-1.4.tar.gz) = 7497 diff --git a/comms/remserial/files/patch-define.h b/comms/remserial/files/patch-define.h new file mode 100644 index 000000000000..dd028c545db5 --- /dev/null +++ b/comms/remserial/files/patch-define.h @@ -0,0 +1,4 @@ +--- ./define.h.orig 2011-01-05 10:31:12.000000000 +0100 ++++ ./define.h 2011-01-05 10:31:12.000000000 +0100 +@@ -0,0 +1 @@ ++#define VERSION "1.4" diff --git a/comms/remserial/files/patch-remserial.c b/comms/remserial/files/patch-remserial.c new file mode 100644 index 000000000000..a776f3897fb0 --- /dev/null +++ b/comms/remserial/files/patch-remserial.c @@ -0,0 +1,20 @@ +--- ./remserial.c.orig 2011-01-05 10:31:12.000000000 +0100 ++++ ./remserial.c 2011-01-05 10:31:12.000000000 +0100 +@@ -34,6 +34,8 @@ + #include <netinet/in.h> + #include <netdb.h> + ++#include "define.h" ++ + struct sockaddr_in addr,remoteaddr; + int sockfd = -1; + int port = 23000; +@@ -417,7 +419,7 @@ + } + + void usage(char *progname) { +- printf("Remserial version 1.3. Usage:\n"); ++ printf("Remserial version %s. Usage:\n", VERSION); + printf("remserial [-r machinename] [-p netport] [-s \"stty params\"] [-m maxconnect] device\n\n"); + + printf("-r machinename The remote machine name to connect to. If not\n"); diff --git a/comms/remserial/files/patch-stty.c b/comms/remserial/files/patch-stty.c new file mode 100644 index 000000000000..ec2a3e8298c5 --- /dev/null +++ b/comms/remserial/files/patch-stty.c @@ -0,0 +1,49 @@ +--- ./stty.c.orig 2011-01-05 10:31:12.000000000 +0100 ++++ ./stty.c 2011-01-05 10:33:33.000000000 +0100 +@@ -29,6 +29,37 @@ + #define RFLG 4 + #define BFLG 5 + ++#ifdef __FreeBSD__ ++#define BSDLY 0020000 ++#define IUCLC 0001000 ++#define OFILL 0000100 ++#define OFDEL 0000200 ++#define NLDLY 0000400 ++#define BS0 0000000 ++#define BS1 0020000 ++#define CR0 0000000 ++#define CR1 0001000 ++#define CR2 0002000 ++#define CR3 0003000 ++#define CRDLY 0003000 ++#define FF0 0000000 ++#define FF1 0100000 ++#define FFDLY 0100000 ++#define NL0 0000000 ++#define NL1 0000400 ++#define TAB1 0004000 ++#define TAB2 0010000 ++#define VT0 0000000 ++#define VT1 0040000 ++#define VTDLY 0040000 ++#if OSVERSION < 800000 ++/* for older FreeBSD versions */ ++#define TAB0 0000000 ++#define TAB3 0014000 ++#define TABDLY 0014000 ++#endif ++#endif ++ + extern int errno; + + static struct sttyset { +@@ -91,7 +122,7 @@ + { "inlcr", IFLG, INLCR, INLCR }, + { "igncr", IFLG, IGNCR, IGNCR }, + { "icrnl", IFLG, ICRNL, ICRNL }, +-#ifdef IUCLC // Missing on OSX, FreeBSD ++#ifdef __FreeBSD__ // Missing on OSX, FreeBSD + { "iuclc", IFLG, IUCLC, IUCLC }, + #endif + { "ixon", IFLG, IXON, IXON }, diff --git a/comms/remserial/pkg-descr b/comms/remserial/pkg-descr new file mode 100644 index 000000000000..f9936e5e3629 --- /dev/null +++ b/comms/remserial/pkg-descr @@ -0,0 +1,13 @@ +Remserial acts as a communications bridge between a TCP/IP network port and a +device such as a serial port. Any character-oriented /dev device will work. + +The program can operate as a server accepting network connections from other +machines, or as a client, connecting to remote machine that is running the +remserial program or some other program that accepts a raw network connection. +The network connection passes data as-is, there is no control protocol over the +network socket. + +Multiple copies of the program can run on the same computer at the same time +assuming each is using a different network port and device. + +WWW: http://lpccomp.bc.ca/remserial/ |