Add echolinux, an EchoLink client for UNIX.

PR:		ports/68587
Submitted by:	Diane Bruce <db@night.db.net>
This commit is contained in:
Pav Lucistnik 2004-07-04 23:28:32 +00:00
parent 96aa7f4a69
commit b764749dc7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=112929
12 changed files with 246 additions and 0 deletions

View file

@ -14,6 +14,7 @@
SUBDIR += comserv
SUBDIR += conserver
SUBDIR += conserver-com
SUBDIR += echolinux
SUBDIR += ecu
SUBDIR += efax
SUBDIR += efax-gtk

52
comms/echolinux/Makefile Normal file
View file

@ -0,0 +1,52 @@
# ports collection makefile for: echolinux
# Date created: 25 June 2004
# Whom: db
#
# $FreeBSD$
#
PORTNAME= echolinux
PORTVERSION= 0.16a
CATEGORIES= comms
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= cqinet
EXTRACT_SUFX= .tgz
MAINTAINER= db@db.net
COMMENT= Amateur Radio Echolink client for UNIX
LIB_DEPENDS= forms.1:${PORTSDIR}/x11-toolkits/xforms
USE_REINPLACE= yes
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/echolinux/Makefile \
${WRKSRC}/echogui/Makefile
@${REINPLACE_CMD} -e 's|gcc|$${CC}|' -e 's|/usr/include/X11|$${X11BASE}/include|' \
-e 's|-o echogui -L/usr/X11R6/lib -lX11 -lXpm -lforms -lm -lpthread|$${CFLAGS} -o echogui -L$${X11BASE}/lib -lX11 -lXpm -lforms -lm ${PTHREAD_LIBS}|' \
-e 's|CARGS|CFLAGS|' -e 's|= -DNodeFont=FL_TINY_SIZE|+= ${PTHREAD_CFLAGS} -DNodeFont=FL_TINY_SIZE|' \
${WRKSRC}/echogui/Makefile
@${REINPLACE_CMD} -e 's|<linux/soundcard.h>|<sys/soundcard.h>|' \
${WRKSRC}/echogui/testgui_cb.c ${WRKSRC}/echogui/testgui_main.c \
${WRKSRC}/echolinux/control.c ${WRKSRC}/echolinux/vox.c
@${REINPLACE_CMD} -e 's|CC = gcc -O3|#CC = gcc -O3|' -e 's|^CFLAGS =|CFLAGS +=|' \
${WRKSRC}/echolinux/Makefile
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README
@${INSTALL_DATA} ${WRKSRC}/Using_EchoLinux.txt ${DOCSDIR}/Using_EchoLinux.txt
@${ECHO} ""
@${ECHO} "echolinux docs installed in ${DOCSDIR}"
@${ECHO} ""
.endif
@${MKDIR} ${PREFIX}/share/echolinux
@${INSTALL_DATA} ${WRKSRC}/echolinux.desktop ${PREFIX}/share/echolinux
@${MKDIR} ${PREFIX}/share/echolinux/pixmaps
@${INSTALL_DATA} ${WRKSRC}/pixmaps/echolinux_48x48.png ${PREFIX}/share/echolinux/pixmaps
@${ECHO} ""
@${ECHO} "echolinux desktop examples installed in ${PREFIX}/share/echolinux"
@${ECHO} ""
.include <bsd.port.mk>

2
comms/echolinux/distinfo Normal file
View file

@ -0,0 +1,2 @@
MD5 (echolinux-0.16a.tgz) = 374b4f26858e7f46935147d48d6322b9
SIZE (echolinux-0.16a.tgz) = 61913

View file

@ -0,0 +1,64 @@
--- echogui/servercode.c.orig Tue Feb 3 04:48:41 2004
+++ echogui/servercode.c Mon Jul 5 00:11:42 2004
@@ -216,22 +216,13 @@
serverFd = fdopen(serverSocket, "r");
- memset(sendBuf, 0x6c, 1);
- result = write(serverSocket, sendBuf, 1);
-
/* Get the local time */
(void) time(&theTime);
tm_ptr = localtime(&theTime);
strftime(logTime, 6, "%H:%M", tm_ptr);
- strcpy(sendBuf, callsign);
- strcat(sendBuf,"\254\254");
- strcat(sendBuf, password);
- strcat(sendBuf, "\015ONLINE3.38(");
- strcat(sendBuf, logTime);
- strcat(sendBuf, ")\015");
- strcat(sendBuf,location);
- strcat(sendBuf,"\015");
+ sprintf(sendBuf,"\x6c%s\xac\xac%s\rONLINE3.38(%s)\r%s\r",
+ callsign, password, logTime, location);
result = write(serverSocket, sendBuf, strlen(sendBuf));
@@ -677,33 +668,9 @@
}
if(FD_ISSET(serverSocket, &testWriteFds)){
- doTimeout = 0;
- (void) time(&theTime);
- tm_ptr = localtime(&theTime);
- strftime(logTime, 20, "%H:%M:%S", tm_ptr);
- i = connect(serverSocket, (struct sockaddr *) &adr_srvr,len_inet);
- // printf("Connect returned a %d, errno = %s\n", i, strerror(errno));
- if(i){
- // printf("%s serverSocket has an error, %d: %s.\n",
- // logTime, errno, strerror(errno));
- FD_CLR(serverSocket, &exceptFds);
- FD_CLR(serverSocket, &writeFds);
- close(serverSocket);
- serverPortState == CLOSED;
- if(serverShutdown)
- quit = 1;
- else{
- pServerCurrent = pServerCurrent->next;
- openSocket();
- }
- }
- else{
- //printf("%s Cool, no error, server on socket %d.\n",
- // logTime, serverSocket);
- serverPortState = CONNECTED;
- FD_CLR(serverSocket, &writeFds);
- serverTask();
- }
+ serverPortState = CONNECTED;
+ FD_CLR(serverSocket, &writeFds);
+ serverTask();
}
if(serverState != IDLE){

View file

@ -0,0 +1,10 @@
--- echogui/testgui.c.orig Thu Feb 12 14:59:29 2004
+++ echogui/testgui.c Fri Jul 2 00:57:53 2004
@@ -1,6 +1,6 @@
/* Form definition file generated with fdesign. */
-#include "forms.h"
+#include <X11/forms.h>
#include <stdlib.h>
#include "testgui.h"

View file

@ -0,0 +1,34 @@
--- echogui/testgui_cb.c.orig Tue Feb 3 03:28:03 2004
+++ echogui/testgui_cb.c Mon Jul 5 00:14:13 2004
@@ -14,9 +14,10 @@
#include <linux/soundcard.h>
#include <sys/ioctl.h>
#include <fcntl.h>
-#include <forms.h>
+#include <X11/forms.h>
#include <math.h>
#include <signal.h>
+#include <pthread.h>
#include "testgui.h"
#include "serverglobals.h"
@@ -345,6 +346,7 @@
{
int error;
char line[3];
+ struct timeval timenow;
struct timespec timeout;
// kill(controlPid, SIGKILL);
@@ -354,8 +356,9 @@
line[1] = '\n';
write(controlOutPipe[1], line, 2);
- gettimeofday(&timeout);
- timeout.tv_sec += 5;
+ gettimeofday(&timenow, NULL);
+ timeout.tv_sec = timenow.tv_sec + 5;
+ timeout.tv_nsec = 0;
pthread_mutex_lock(&serverLoggedOffLock);
sendServerCommand(LOGOFF);
pthread_cond_timedwait(&serverLoggedOff,

View file

@ -0,0 +1,14 @@
--- echogui/testgui_main.c.orig Sun Feb 15 11:33:04 2004
+++ echogui/testgui_main.c Fri Jul 2 00:59:18 2004
@@ -16,9 +16,10 @@
#include <linux/soundcard.h>
#include <sys/ioctl.h>
#include <fcntl.h>
-#include <forms.h>
+#include <X11/forms.h>
#include <string.h>
#include <math.h>
+#include <pthread.h>
#include "testgui.h"
#include "serverglobals.h"

View file

@ -0,0 +1,12 @@
--- echolinux/control.c.orig Mon Feb 2 22:29:46 2004
+++ echolinux/control.c Fri Jul 2 00:58:38 2004
@@ -24,7 +24,8 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
-#include <wait.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include <signal.h>
#include <string.h>
#include <sys/time.h>

View file

@ -0,0 +1,30 @@
--- echolinux/echolinux.h.orig Sun Dec 22 04:11:34 2002
+++ echolinux/echolinux.h Mon Jul 5 00:16:32 2004
@@ -11,22 +11,17 @@
#define PORT_BASE 5198
-struct termio term_params, old_term_params;
+struct termios term_params, old_term_params;
void raw_tty(int flag){
if(flag){
- ioctl(fileno(stdin), TCGETA, &old_term_params);
+ tcgetattr(fileno(stdin), &old_term_params);
term_params = old_term_params;
- term_params.c_iflag &= ~(ICRNL|IXON|IXOFF); /* no cr translation */
- term_params.c_iflag &= ~(ISTRIP); /* no stripping of high order bit */
- term_params.c_oflag &= ~(OPOST); /* no output processing */
- term_params.c_lflag &= ~(ISIG|ICANON|ECHO); /* raw mode */
- term_params.c_cc[VMIN] = 0; /* satisfy read after 1 char */
- term_params.c_cc[VTIME] = 0; /* satisfy read after 1 char */
- ioctl(fileno(stdin), TCSETAF, &term_params);
+ cfmakeraw(&term_params);
+ tcsetattr(fileno(stdin), TCSAFLUSH, &term_params);
} else{
- ioctl(fileno(stdin), TCSETAF, &old_term_params);
+ tcsetattr(fileno(stdin), TCSAFLUSH, &old_term_params);
}
}

View file

@ -0,0 +1,11 @@
--- echolinux/vox.c.orig Tue Feb 3 01:12:09 2004
+++ echolinux/vox.c Fri Jul 2 00:58:47 2004
@@ -546,7 +546,7 @@
timeout.tv_sec = 1;
timeout.tv_usec = 0;
for(i=0;i<4;i++){
- temp = &(voicePacket->data);
+ temp = (unsigned char *)&(voicePacket->data);
gsm_decode(gsmh, temp+(i*33), sbuff);
ioctl(audiofd, SNDCTL_DSP_GETOSPACE, &info);
while(info.bytes < 320){

View file

@ -0,0 +1,6 @@
EchoLink client program for UNIX. EchoLink is a VoIP package used in Ham Radio.
WWW: http://cqinet.sourceforge.net/
- Diane Bruce, VA3DB
db@db.net

10
comms/echolinux/pkg-plist Normal file
View file

@ -0,0 +1,10 @@
bin/echoaudio
bin/echogui
bin/echolinux
share/echolinux/echolinux.desktop
share/echolinux/pixmaps/echolinux_48x48.png
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/Using_EchoLinux.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm share/echolinux/pixmaps
@dirrm share/echolinux