- Renamed bogus patch names
- Make build under clang11 - Fixed bogus /etc dir reference - pet portlint
This commit is contained in:
parent
840a4c40b5
commit
f34877a202
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=546089
@ -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}
|
||||
|
@ -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);
|
||||
|
@ -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. */
|
||||
|
||||
|
29
comms/echolinux/files/patch-echogui_testgui__cb.c
Normal file
29
comms/echolinux/files/patch-echogui_testgui__cb.c
Normal file
@ -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);
|
||||
}
|
||||
|
||||
/**********************/
|
32
comms/echolinux/files/patch-echogui_testgui__main.c
Normal file
32
comms/echolinux/files/patch-echogui_testgui__main.c
Normal file
@ -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");
|
||||
}
|
||||
}
|
@ -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>
|
@ -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>
|
18
comms/echolinux/files/patch-echogui_threadFuncs.c
Normal file
18
comms/echolinux/files/patch-echogui_threadFuncs.c
Normal file
@ -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);
|
62
comms/echolinux/files/patch-echolinux_control.c
Normal file
62
comms/echolinux/files/patch-echolinux_control.c
Normal file
@ -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);
|
@ -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;
|
||||
|
111
comms/echolinux/files/patch-echolinux_vox.c
Normal file
111
comms/echolinux/files/patch-echolinux_vox.c
Normal file
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user