diff options
author | pav <pav@FreeBSD.org> | 2004-07-05 07:28:32 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-07-05 07:28:32 +0800 |
commit | 32d4cacad9aa21e35dc046c3b6d1a8e4f2fe9f01 (patch) | |
tree | f2adbde97a61a31d95118409a6668d51adc6ff06 /comms/echolinux | |
parent | c24451f14fb3f103c8f1bff516db9c5109a60131 (diff) | |
download | freebsd-ports-gnome-32d4cacad9aa21e35dc046c3b6d1a8e4f2fe9f01.tar.gz freebsd-ports-gnome-32d4cacad9aa21e35dc046c3b6d1a8e4f2fe9f01.tar.zst freebsd-ports-gnome-32d4cacad9aa21e35dc046c3b6d1a8e4f2fe9f01.zip |
Add echolinux, an EchoLink client for UNIX.
PR: ports/68587
Submitted by: Diane Bruce <db@night.db.net>
Diffstat (limited to 'comms/echolinux')
-rw-r--r-- | comms/echolinux/Makefile | 52 | ||||
-rw-r--r-- | comms/echolinux/distinfo | 2 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_servercode.c | 64 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui.c | 10 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui_cb.c | 34 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui_main.c | 14 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echolinux_control.c | 12 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echolinux_echolinux.h | 30 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echolinux_vox.c | 11 | ||||
-rw-r--r-- | comms/echolinux/pkg-descr | 6 | ||||
-rw-r--r-- | comms/echolinux/pkg-plist | 10 |
11 files changed, 245 insertions, 0 deletions
diff --git a/comms/echolinux/Makefile b/comms/echolinux/Makefile new file mode 100644 index 000000000000..37f2e671e65c --- /dev/null +++ b/comms/echolinux/Makefile @@ -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> diff --git a/comms/echolinux/distinfo b/comms/echolinux/distinfo new file mode 100644 index 000000000000..44ab38069ca0 --- /dev/null +++ b/comms/echolinux/distinfo @@ -0,0 +1,2 @@ +MD5 (echolinux-0.16a.tgz) = 374b4f26858e7f46935147d48d6322b9 +SIZE (echolinux-0.16a.tgz) = 61913 diff --git a/comms/echolinux/files/patch-echogui_servercode.c b/comms/echolinux/files/patch-echogui_servercode.c new file mode 100644 index 000000000000..5a0ca98d7f5d --- /dev/null +++ b/comms/echolinux/files/patch-echogui_servercode.c @@ -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){ diff --git a/comms/echolinux/files/patch-echogui_testgui.c b/comms/echolinux/files/patch-echogui_testgui.c new file mode 100644 index 000000000000..f00f1913ebf6 --- /dev/null +++ b/comms/echolinux/files/patch-echogui_testgui.c @@ -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" + diff --git a/comms/echolinux/files/patch-echogui_testgui_cb.c b/comms/echolinux/files/patch-echogui_testgui_cb.c new file mode 100644 index 000000000000..706e1e6ab09f --- /dev/null +++ b/comms/echolinux/files/patch-echogui_testgui_cb.c @@ -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, diff --git a/comms/echolinux/files/patch-echogui_testgui_main.c b/comms/echolinux/files/patch-echogui_testgui_main.c new file mode 100644 index 000000000000..0d38fe396706 --- /dev/null +++ b/comms/echolinux/files/patch-echogui_testgui_main.c @@ -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" diff --git a/comms/echolinux/files/patch-echolinux_control.c b/comms/echolinux/files/patch-echolinux_control.c new file mode 100644 index 000000000000..c1645e7e1ac2 --- /dev/null +++ b/comms/echolinux/files/patch-echolinux_control.c @@ -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> diff --git a/comms/echolinux/files/patch-echolinux_echolinux.h b/comms/echolinux/files/patch-echolinux_echolinux.h new file mode 100644 index 000000000000..5e90f9f61795 --- /dev/null +++ b/comms/echolinux/files/patch-echolinux_echolinux.h @@ -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); + } + } + diff --git a/comms/echolinux/files/patch-echolinux_vox.c b/comms/echolinux/files/patch-echolinux_vox.c new file mode 100644 index 000000000000..1d0e83647de6 --- /dev/null +++ b/comms/echolinux/files/patch-echolinux_vox.c @@ -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){ diff --git a/comms/echolinux/pkg-descr b/comms/echolinux/pkg-descr new file mode 100644 index 000000000000..1f5797a02132 --- /dev/null +++ b/comms/echolinux/pkg-descr @@ -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 diff --git a/comms/echolinux/pkg-plist b/comms/echolinux/pkg-plist new file mode 100644 index 000000000000..ba8874a87861 --- /dev/null +++ b/comms/echolinux/pkg-plist @@ -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 |