diff options
-rw-r--r-- | comms/echolinux/Makefile | 13 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_servercode.c | 15 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui.c | 4 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui__cb.c | 29 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui__main.c | 32 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui_cb.c | 11 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_testgui_main.c | 11 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echogui_threadFuncs.c | 18 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echolinux_control.c | 62 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echolinux_rtpacket.c | 13 | ||||
-rw-r--r-- | comms/echolinux/files/patch-echolinux_vox.c | 111 |
11 files changed, 280 insertions, 39 deletions
diff --git a/comms/echolinux/Makefile b/comms/echolinux/Makefile index c7c5faf85495..8973f55e2213 100644 --- a/comms/echolinux/Makefile +++ b/comms/echolinux/Makefile @@ -3,7 +3,7 @@ PORTNAME= echolinux PORTVERSION= 0.17a -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= comms hamradio MASTER_SITES= SF/cqinet/${PORTNAME}/${PORTNAME}-${PORTVERSION} @@ -16,7 +16,8 @@ LICENSE_FILE= ${WRKSRC}/gpl.txt LIB_DEPENDS= libforms.so:x11-toolkits/xforms \ libgsm.so:audio/gsm -USES= tar:tgz +USES= tar:tgz xorg +USE_XORG= x11 xpm OPTIONS_DEFINE= DOCS @@ -26,11 +27,10 @@ post-patch: -e 's|CARGS|CFLAGS|' -e 's|= -DNodeFont=FL_TINY_SIZE|+= -DNodeFont=FL_TINY_SIZE|' \ -e 's|/usr/local/bin/|${STAGEDIR}${PREFIX}/bin/|' \ ${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/vox.c @${REINPLACE_CMD} -e 's|CC = gcc -O3|#CC = gcc -O3|' -e 's|^CFLAGS =|CFLAGS +=|' \ ${WRKSRC}/echolinux/Makefile + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ + ${WRKSRC}/echolinux/vox.c ${WRKSRC}/echolinux/control.c @${REINPLACE_CMD} -e 's|LFLAGS = -lm|LFLAGS = -L${LOCALBASE}/lib -lm -lgsm|' \ -e 's|libgsm.a||' -e 's|-Igsm/inc|-I${LOCALBASE}/include|' \ -e 's|/usr/local/bin/|${STAGEDIR}${PREFIX}/bin/|' \ @@ -41,6 +41,9 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/echolinux.desktop ${STAGEDIR}${PREFIX}/share/echolinux @${MKDIR} ${STAGEDIR}${PREFIX}/share/echolinux/pixmaps ${INSTALL_DATA} ${WRKSRC}/pixmaps/echolinux_48x48.png ${STAGEDIR}${PREFIX}/share/echolinux/pixmaps + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/echogui + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/echolinux + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/echoaudio post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} diff --git a/comms/echolinux/files/patch-echogui_servercode.c b/comms/echolinux/files/patch-echogui_servercode.c index 08efae783e7a..d35ff68a818f 100644 --- a/comms/echolinux/files/patch-echogui_servercode.c +++ b/comms/echolinux/files/patch-echogui_servercode.c @@ -1,6 +1,15 @@ ---- echogui/servercode.c.orig 2013-12-27 22:13:30.194795239 -0500 -+++ echogui/servercode.c 2013-12-27 22:13:50.872793794 -0500 -@@ -641,7 +641,7 @@ +--- echogui/servercode.c.orig 2006-02-24 19:28:15 UTC ++++ echogui/servercode.c +@@ -82,7 +82,7 @@ fd_set writeFds, testWriteFds; + fd_set exceptFds, testExceptFds; + + int doTimeout = 0; +-struct timeval timeout; ++static struct timeval timeout; + struct tm *tm_ptr; + time_t theTime; + char logTime[20]; +@@ -641,7 +641,7 @@ int doServer(void *ptr){ FD_CLR(serverSocket, &exceptFds); FD_CLR(serverSocket, &writeFds); close(serverSocket); diff --git a/comms/echolinux/files/patch-echogui_testgui.c b/comms/echolinux/files/patch-echogui_testgui.c index 914032560030..9dc5c6a0b78c 100644 --- a/comms/echolinux/files/patch-echogui_testgui.c +++ b/comms/echolinux/files/patch-echogui_testgui.c @@ -1,5 +1,5 @@ ---- echogui/testgui.c.orig 2011-09-06 14:21:37.000000000 +0200 -+++ echogui/testgui.c 2011-09-06 14:21:42.000000000 +0200 +--- echogui/testgui.c.orig 2006-02-24 19:28:15 UTC ++++ echogui/testgui.c @@ -1,6 +1,6 @@ /* Form definition file generated with fdesign. */ 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..19befe8aeabd --- /dev/null +++ b/comms/echolinux/files/patch-echogui_testgui__cb.c @@ -0,0 +1,29 @@ +--- echogui/testgui_cb.c.orig 2006-02-24 19:28:15 UTC ++++ echogui/testgui_cb.c +@@ -8,13 +8,16 @@ $Log$ + + ****************************/ + ++#include <stdlib.h> + #include <string.h> ++#include <unistd.h> + #include <sys/wait.h> ++#include <sys/time.h> + #include <sys/types.h> +-#include <linux/soundcard.h> ++#include <sys/soundcard.h> + #include <sys/ioctl.h> + #include <fcntl.h> +-#include <X11/forms.h> ++#include <forms.h> + #include <math.h> + #include <signal.h> + #include <pthread.h> +@@ -429,6 +432,7 @@ int searchClose(FL_FORM *form, void *data){ + + // puts("In searchclose()"); + fl_hide_form(fd_searchForm->searchForm); ++ return (0); + } + + /**********************/ 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..049e153c91d7 --- /dev/null +++ b/comms/echolinux/files/patch-echogui_testgui__main.c @@ -0,0 +1,32 @@ +--- echogui/testgui_main.c.orig 2006-02-24 20:23:37 UTC ++++ echogui/testgui_main.c +@@ -13,10 +13,10 @@ $Log$ + #include <sys/types.h> + #include <sys/time.h> + #include <unistd.h> +-#include <linux/soundcard.h> ++#include <sys/soundcard.h> + #include <sys/ioctl.h> + #include <fcntl.h> +-#include <X11/forms.h> ++#include <forms.h> + #include <string.h> + #include <math.h> + #include <pthread.h> +@@ -33,6 +33,7 @@ extern int atClose(FL_FORM *, void *); + extern void dblNodeList(FL_OBJECT *, long); + extern void getlist(FL_OBJECT *, long); + extern int searchClose(FL_FORM *, void *); ++extern int serverInit(); + + FILE *gpfd; + +@@ -111,7 +112,7 @@ int main(int argc, char *argv[]) + close(controlInPipe[1]); + close(controlInPipe[0]); + +- execlp("echolinux", "echolinux", 0, 0); ++ execlp("echolinux", "echolinux", 0, NULL); + printf("We didn't execute execlp().\n"); + } + } diff --git a/comms/echolinux/files/patch-echogui_testgui_cb.c b/comms/echolinux/files/patch-echogui_testgui_cb.c deleted file mode 100644 index 12bc35c1185a..000000000000 --- a/comms/echolinux/files/patch-echogui_testgui_cb.c +++ /dev/null @@ -1,11 +0,0 @@ ---- echogui/testgui_cb.c.orig 2011-09-06 14:20:54.000000000 +0200 -+++ echogui/testgui_cb.c 2011-09-06 14:20:57.000000000 +0200 -@@ -14,7 +14,7 @@ - #include <linux/soundcard.h> - #include <sys/ioctl.h> - #include <fcntl.h> --#include <X11/forms.h> -+#include <forms.h> - #include <math.h> - #include <signal.h> - #include <pthread.h> diff --git a/comms/echolinux/files/patch-echogui_testgui_main.c b/comms/echolinux/files/patch-echogui_testgui_main.c deleted file mode 100644 index 86a5b0f77f5e..000000000000 --- a/comms/echolinux/files/patch-echogui_testgui_main.c +++ /dev/null @@ -1,11 +0,0 @@ ---- echogui/testgui_main.c.orig 2011-09-06 14:19:54.000000000 +0200 -+++ echogui/testgui_main.c 2011-09-06 14:20:09.000000000 +0200 -@@ -16,7 +16,7 @@ - #include <linux/soundcard.h> - #include <sys/ioctl.h> - #include <fcntl.h> --#include <X11/forms.h> -+#include <forms.h> - #include <string.h> - #include <math.h> - #include <pthread.h> diff --git a/comms/echolinux/files/patch-echogui_threadFuncs.c b/comms/echolinux/files/patch-echogui_threadFuncs.c new file mode 100644 index 000000000000..71acd5264d64 --- /dev/null +++ b/comms/echolinux/files/patch-echogui_threadFuncs.c @@ -0,0 +1,18 @@ +--- echogui/threadFuncs.c.orig 2004-02-03 02:28:03 UTC ++++ echogui/threadFuncs.c +@@ -1,5 +1,6 @@ + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <pthread.h> + #include <signal.h> + +@@ -47,7 +48,7 @@ void destroyApp(void){ + void sigHandler(int sig){ + + // puts("In signal handler"); +- if(sig = SIGINT){ ++ if(sig == SIGINT){ + // puts("It is a SIGINT"); + destroyApp(); + exit(0); diff --git a/comms/echolinux/files/patch-echolinux_control.c b/comms/echolinux/files/patch-echolinux_control.c new file mode 100644 index 000000000000..301d929c9a46 --- /dev/null +++ b/comms/echolinux/files/patch-echolinux_control.c @@ -0,0 +1,62 @@ +--- echolinux/control.c.orig 2006-02-24 19:28:15 UTC ++++ echolinux/control.c +@@ -12,6 +12,7 @@ $Log$ + + #include <stdio.h> + #include <stdlib.h> ++#include <ctype.h> + #include <sys/ioctl.h> + #include <sys/soundcard.h> + #include <sys/types.h> +@@ -44,7 +45,7 @@ int outControlSocket, inControlSocket; + int connectTimeout, sdesLength; + struct hostent *hp; + char *remoteNode = NULL; +-struct timeval timeout; ++static struct timeval timeout; + + int connected = 0, atemptingConnect = 0, quit = 0; + pid_t audioPid; +@@ -130,7 +131,7 @@ int makeConnection(char *host){ + close(audioInPipe[1]); + close(audioInPipe[0]); + +- execlp("echoaudio", "echoaudio", remoteNode, callsign, 0); ++ execlp("echoaudio", "echoaudio", remoteNode, callsign, NULL); + perror("echoaudio"); + exit(1); + } +@@ -179,12 +180,12 @@ int makeConnection(char *host){ + connectTimeout = 0; + timeout.tv_sec = 10; + timeout.tv_usec = 0; +- ++ return(1); + } + + /**** disconnect from remote node *********/ + +-int disconnect(int sendBye){ ++static void disconnect(int sendBye){ + + int i, length; + unsigned char *bye; +@@ -258,7 +259,8 @@ void readStdin(void){ + + int main(int argc, char *argv[]){ + +- int length, i, len_inet; ++ int length, i; ++ socklen_t len_inet; + char c, remoteName[40], line[80], *home; + struct rtcp_sdes_request sdesItems; + +@@ -277,7 +279,7 @@ int main(int argc, char *argv[]){ + strcat(line, "/.echoLinux/userdata.txt"); + userData = fopen(line, "r"); + if(userData == NULL){ +- userData = fopen("/etc/echolinux/userdata.txt", "r"); ++ userData = fopen("%%LOCALBASE%%/etc/echolinux/userdata.txt", "r"); + if(userData == NULL){ + perror("userData"); + exit(1); diff --git a/comms/echolinux/files/patch-echolinux_rtpacket.c b/comms/echolinux/files/patch-echolinux_rtpacket.c index 1ffd38ee227a..4e3839fc5e3e 100644 --- a/comms/echolinux/files/patch-echolinux_rtpacket.c +++ b/comms/echolinux/files/patch-echolinux_rtpacket.c @@ -1,5 +1,5 @@ ---- echolinux/rtpacket.c.orig 2002-12-21 22:10:48.000000000 -0500 -+++ echolinux/rtpacket.c 2013-12-27 22:10:06.275393036 -0500 +--- echolinux/rtpacket.c.orig 2002-12-22 03:10:48 UTC ++++ echolinux/rtpacket.c @@ -1,4 +1,8 @@ #include <stdio.h> +#include <stdlib.h> @@ -9,7 +9,7 @@ #include "rtp.h" #include "rtpacket.h" -@@ -11,6 +15,16 @@ +@@ -11,6 +15,16 @@ extern char callsign[], name[]; /*************** RTP_MAKE_SDES *************/ @@ -26,7 +26,7 @@ int rtp_make_sdes(pkt, ssrc_i, strict) char **pkt; unsigned long ssrc_i; -@@ -19,21 +33,12 @@ +@@ -19,20 +33,11 @@ int rtp_make_sdes(pkt, ssrc_i, strict) unsigned char zp[1500]; unsigned char *p = zp; rtcp_t *rp; @@ -36,7 +36,7 @@ int l, hl, i; struct passwd *pw; char s[256], ev[1024]; - +- - void addSDES(unsigned char item, char *text){ - *ap++ = item; - *ap++ = l = strlen(text); @@ -44,7 +44,6 @@ - ap += l; - } - -- + hl = 0; if (strict) { - *p++ = RTP_VERSION << 6; diff --git a/comms/echolinux/files/patch-echolinux_vox.c b/comms/echolinux/files/patch-echolinux_vox.c new file mode 100644 index 000000000000..130a03cf9cb5 --- /dev/null +++ b/comms/echolinux/files/patch-echolinux_vox.c @@ -0,0 +1,111 @@ +--- echolinux/vox.c.orig 2006-03-03 23:43:05 UTC ++++ echolinux/vox.c +@@ -14,7 +14,7 @@ $Log$ + #include <stdlib.h> + #include <sys/ioctl.h> + #include <sys/stat.h> +-#include <linux/soundcard.h> ++#include <sys/soundcard.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/ioctl.h> +@@ -70,7 +70,7 @@ int mode; + + /**************** read info file ***********/ + +-int sendInfoFile(void){ ++static int sendInfoFile(void){ + int count = 0, result; + char *temp, line[80]; + +@@ -79,7 +79,7 @@ int sendInfoFile(void){ + + infoFile = open(line, O_RDONLY); + if(infoFile < 0){ +- infoFile = open("/etc/echolinux/info.txt", O_RDONLY); ++ infoFile = open("%%LOCALBASE%%/etc/echolinux/info.txt", O_RDONLY); + if(infoFile < 0){ + perror("Openning info file."); + return(FALSE); +@@ -129,12 +129,12 @@ int sendInfoFile(void){ + (struct sockaddr *) &destAddr, + sizeof destAddr); + +- ++ return(TRUE); + } + + /****************************************/ + +-int soundInput(void){ ++static void soundInput(void){ + + // int arg, status; + int arg, status; +@@ -242,7 +242,7 @@ void sendNDATA(char *ndata){ + + /**************** Handle data from stdin ***********/ + +-int fromControl(void){ ++static void fromControl(void){ + int i; + char c; + char line[80], fileName[80], globalFileName[80]; +@@ -260,7 +260,7 @@ int fromControl(void){ + strcpy(fileName, echoLinuxDefaults); + line[strlen(line) - 1] = 0x00; + strcat(fileName, &line[2]); +- strcpy(globalFileName, "/etc/echolinux/"); ++ strcpy(globalFileName, "%%LOCALBASE%%/etc/echolinux/"); + strcat(globalFileName, &line[2]); + // strcat(fileName, "connect.wav"); + if(((audioEffect = open(fileName, O_RDONLY)) != -1) || (audioEffect = open(globalFileName, O_RDONLY)) != -1){ +@@ -305,14 +305,14 @@ int fromControl(void){ + + /******************* Audio sending routine **************/ + +-int sendAudio(void){ ++static void sendAudio(void){ + + static short seq = 1; + short count = 0, total = 0; + short i, result, *pTemp, j; + char c, *temp, line[20]; + fd_set readfds, testfds; +- int len_inet; ++ socklen_t len_inet; + // struct timeval timeout; + time_t startTime, timeNow; + long average; +@@ -399,7 +399,7 @@ int sendAudio(void){ + } + } + if(sendStrength){ +- sprintf(line, "%C %d", STRENGTH, average); ++ sprintf(line, "%C %ld", STRENGTH, average); + puts(line); + } + +@@ -477,11 +477,11 @@ int sendAudio(void){ + + /************ Audio Receiving Function *******/ + +-int recvAudio(void){ ++static void recvAudio(void){ + struct gsmVoice_t *voicePacket; + fd_set readfds, testfds; + short i, result, j, *pTemp; +- int len_inet; ++ socklen_t len_inet; + audio_buf_info info; + unsigned char *temp; + char c, line[20]; +@@ -559,7 +559,7 @@ int recvAudio(void){ + } + average = average / 320; + if(sendStrength){ +- sprintf(line, "%C %d", STRENGTH, average); ++ sprintf(line, "%C %ld", STRENGTH, average); + puts(line); + } + } |