Date: Fri, 9 Jul 2004 13:54:07 -0400 (EDT) From: Diane Bruce <db@db.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/68873: New port: comms/linrad Amateur Radio DSP utility (SDR) Message-ID: <200407091754.i69Hs7No007857@heceta.db.net> Resent-Message-ID: <200407091800.i69I0dwp007760@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 68873 >Category: ports >Synopsis: New port: comms/linrad Amateur Radio DSP utility (SDR) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 09 18:00:38 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Diane Bruce >Release: FreeBSD 4.9-RELEASE i386 >Organization: Diane Bruce >Environment: System: FreeBSD heceta.db.net 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003 root@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC i386 >Description: >How-To-Repeat: >Fix: --- linrad.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # linrad # linrad/Makefile # linrad/pkg-descr # linrad/files # linrad/files/patch-configure.in # linrad/files/patch-modesub.c # linrad/files/patch-uivar.c # linrad/files/patch-setad.c # linrad/files/patch-hwaredriver.c # linrad/files/patch-tune.c # linrad/files/patch-Makefile.in # linrad/files/patch-uidef.h # linrad/files/patch-wcw.c # linrad/files/patch-main.c # linrad/distinfo # linrad/pkg-plist # echo c - linrad mkdir -p linrad > /dev/null 2>&1 echo x - linrad/Makefile sed 's/^X//' >linrad/Makefile << 'END-of-linrad/Makefile' X# ports collection makefile for: linrad X# Date created: 7 July 2004 X# Whom: db X# X# $FreeBSD$ X# X XPORTNAME= linrad XPORTVERSION= 0.16a XCATEGORIES= comms XMASTER_SITES= http://www.nitehawk.com/sm5bsz/linuxdsp/archive/ XDISTNAME= lir01-20 XEXTRACT_SUFX= .tbz XDIST_SUBDIR= ${PORTNAME} X XMAINTAINER= db@db.net XCOMMENT= Amateur Radio DSP utility (SDR) X XLIB_DEPENDS= vga.1:${PORTSDIR}/graphics/svgalib XBUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm X XWRKSRC= ${WRKDIR}/${PORTNAME}-01.20 X XUSE_AUTOCONF_VER= 253 XHAS_CONFIGURE= yes XUSE_BZIP2= yes XUSE_REINPLACE= yes X Xpost-patch: X @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/configure.in X Xdo-install: X @${INSTALL_PROGRAM} -m04555 ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME} X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X @${INSTALL_DATA} ${WRKSRC}/z_APM.txt ${DOCSDIR}/z_APM.txt X @${INSTALL_DATA} ${WRKSRC}/z_BUFFERS.txt ${DOCSDIR}/z_BUFFERS.txt X @${INSTALL_DATA} ${WRKSRC}/z_CALIBRATE.txt ${DOCSDIR}/z_CALIBRATE.txt X @${INSTALL_DATA} ${WRKSRC}/z_COPYRIGHT.txt ${DOCSDIR}/z_COPYRIGHT.txt X @${INSTALL_DATA} ${WRKSRC}/z_GIFINFO.txt ${DOCSDIR}/z_GIFINFO.txt X @${INSTALL_DATA} ${WRKSRC}/z_INSTALL.txt ${DOCSDIR}/z_INSTALL.txt X @${INSTALL_DATA} ${WRKSRC}/z_MLOCK.txt ${DOCSDIR}/z_MLOCK.txt X @${INSTALL_DATA} ${WRKSRC}/z_SETTINGS.txt ${DOCSDIR}/z_SETTINGS.txt X @${INSTALL_DATA} ${WRKSRC}/z_SPEED.txt ${DOCSDIR}/z_SPEED.txt X @${INSTALL_DATA} ${WRKSRC}/z_SVGALIB.txt ${DOCSDIR}/z_SVGALIB.txt X @${INSTALL_DATA} ${WRKSRC}/z_USERS_HWARE.txt ${DOCSDIR}/z_USERS_HWARE.txt X @${INSTALL_DATA} ${WRKSRC}/z_USLEEP.txt ${DOCSDIR}/z_USLEEP.txt X @${ECHO} "" X @${ECHO} "linrad docs installed in ${DOCSDIR}" X @${ECHO} "" X.endif X X.include <bsd.port.mk> END-of-linrad/Makefile echo x - linrad/pkg-descr sed 's/^X//' >linrad/pkg-descr << 'END-of-linrad/pkg-descr' XAmateur Radio DSP utility (SDR) X XWWW: http://www.nitehawk.com/sm5bsz/linuxdsp/linrad.htm X X- Diane Bruce, VA3DB Xdb@db.net END-of-linrad/pkg-descr echo c - linrad/files mkdir -p linrad/files > /dev/null 2>&1 echo x - linrad/files/patch-configure.in sed 's/^X//' >linrad/files/patch-configure.in << 'END-of-linrad/files/patch-configure.in' X--- configure.in.orig Tue May 18 09:43:30 2004 X+++ configure.in Fri Jul 9 12:49:33 2004 X@@ -2,13 +2,13 @@ X rm -f conf.h X AC_INIT(main.c) X AC_CHECK_FILE( /usr/lib/oss/soundcard.h, OSSN="1") X-AC_CHECK_FILE( /usr/local/lib/oss/soundcard.h, OSSN="3") X+AC_CHECK_FILE( %%LOCALBASE%%/lib/oss/soundcard.h, OSSN="3") X AC_CHECK_FILE( /lib/oss/soundcard.h, OSSN="5") X AC_CHECK_FILE( /var/lib/oss/soundcard.h, OSSN="7") X AC_CHECK_FILE( /opt/oss/soundcard.h, OSSN="9") X AC_CHECK_FILE( /root/oss/soundcard.h, OSSN="11") X AC_CHECK_FILE( /usr/lib/oss/include/sys/soundcard.h, OSSN="2") X-AC_CHECK_FILE( /usr/local/lib/oss/include/sys/soundcard.h, OSSN="4") X+AC_CHECK_FILE( %%LOCALBASE%%/lib/oss/include/sys/soundcard.h, OSSN="4") X AC_CHECK_FILE( /lib/oss/include/sys/soundcard.h, OSSN="6") X AC_CHECK_FILE( /var/lib/oss/include/sys/soundcard.h, OSSN="8") X AC_CHECK_FILE( /opt/oss/include/sys/soundcard.h, OSSN="10") X@@ -25,10 +25,10 @@ X AC_SUBST(USERHWDEF) X AC_CHECK_FILE( ./users_hwaredef.h, DEPS2="users_hwaredef.h") X AC_SUBST(DEPS2) X-AC_CHECK_HEADER(vga.h,, AC_MSG_ERROR( X+AC_CHECK_HEADER(%%LOCALBASE%%/include/vga.h,, AC_MSG_ERROR( X Must have svgalib package installed to compile X vga.h missing!!!)) X-AC_CHECK_HEADER(vgagl.h,, AC_MSG_ERROR( X+AC_CHECK_HEADER(%%LOCALBASE%%/include/vgagl.h,, AC_MSG_ERROR( X Must have svgalib package installed to compile X vgagl.h missing!!!)) X AC_CHECK_FILE( /usr/include/png.h, IMGFMT="1") END-of-linrad/files/patch-configure.in echo x - linrad/files/patch-modesub.c sed 's/^X//' >linrad/files/patch-modesub.c << 'END-of-linrad/files/patch-modesub.c' X--- modesub.c.orig Tue May 18 09:43:30 2004 X+++ modesub.c Fri Jul 9 11:17:15 2004 X@@ -5,7 +5,7 @@ X #include <unistd.h> X #include <ctype.h> X #include <sys/mman.h> X-#include <sys/io.h> X+#include <machine/cpufunc.h> X #include "globdef.h" X #include "uidef.h" X #include "fft1def.h" X@@ -1068,6 +1068,7 @@ X j++; X if(j > 1000) X { X+#if 0 X if(mlockall(MCL_CURRENT) != 0) X { X handle[0]=(int)(chk_free(testbuf)); X@@ -1075,6 +1076,7 @@ X return 0; X } X j=0; X+#endif X } X } X } X@@ -1597,7 +1599,9 @@ X idle_start=recent_time; X if(ui.memlock == 0) X { X+#if 0 X if(mlockall(MCL_CURRENT) != 0)lir_status=LIR_MEMERR; X+#endif X } X work_flag=0; X END-of-linrad/files/patch-modesub.c echo x - linrad/files/patch-uivar.c sed 's/^X//' >linrad/files/patch-uivar.c << 'END-of-linrad/files/patch-uivar.c' X--- uivar.c.orig Tue May 18 09:43:30 2004 X+++ uivar.c Thu Jul 8 14:17:52 2004 X@@ -2,7 +2,7 @@ X #include "globdef.h" X #include "uidef.h" X #include "conf.h" X- X+#include <netinet/in.h> X X X ROUTINE par_from_keyboard_routine; END-of-linrad/files/patch-uivar.c echo x - linrad/files/patch-setad.c sed 's/^X//' >linrad/files/patch-setad.c << 'END-of-linrad/files/patch-setad.c' X--- setad.c.orig Tue May 18 09:43:30 2004 X+++ setad.c Thu Jul 8 14:17:52 2004 X@@ -16,11 +16,11 @@ X #define ABOVE_MAX_SPEED 768000 X #if SND_DEV == 1 X #define DEVNAME_SIZE 12 X-char devname[DEVNAME_SIZE]="/dev/dsp "; X+char dev_name[DEVNAME_SIZE]="/dev/dsp "; X #define DEVNAMPOS 8 X #else X #define DEVNAME_SIZE 18 X-char devname[DEVNAME_SIZE]="/dev/sound/dsp "; X+char dev_name[DEVNAME_SIZE]="/dev/sound/dsp "; X #define DEVNAMPOS 14 X #endif X X@@ -36,7 +36,7 @@ X sync(); X } X X-void make_devname(int n) X+void make_dev_name(int n) X { X int k,num,m; X if(n < 0)end_program(9235); X@@ -47,13 +47,13 @@ X m=num/10; X if(m > 0) X { X- devname[k]=m+'0'; X+ dev_name[k]=m+'0'; X k++; X } X-devname[k]=num-m*10+'0'; X-if(devname[k]<'0')devname[k]=0; X+dev_name[k]=num-m*10+'0'; X+if(dev_name[k]<'0')dev_name[k]=0; X k++; X-devname[k]=0; X+dev_name[k]=0; X } X X void set_da_parms(void) X@@ -148,14 +148,14 @@ X if(disksave_flag == 2 || network_flag == 2)return; X if( (ui.input_mode&NO_DUPLEX) != 0 && audio_out != -1)return; X if( (audio_in) != -1)end_program(1000); X-make_devname(ui.ad_device_no&255); X-audio_in=open( devname ,ui.ad_device_mode , 0); X+make_dev_name(ui.ad_device_no&255); X+audio_in=open( dev_name ,ui.ad_device_mode , 0); X if(audio_in == -1)end_program(1007); X if(ui.ad_device_no > 255) X { X i=ui.ad_device_no/255-1; X- make_devname(i); X- audio_in2=open( devname ,ui.ad_device_mode , 0); X+ make_dev_name(i); X+ audio_in2=open( dev_name ,ui.ad_device_mode , 0); X if(audio_in2 == -1)end_program(1174); X } X if(ui.ad_frag != 0) X@@ -238,8 +238,8 @@ X if(disksave_flag >=2) X { X if(audio_in != -1)end_program(9865); X- make_devname(ui.ad_device_no&255); X- audio_out=open( devname ,O_WRONLY , 0); X+ make_dev_name(ui.ad_device_no&255); X+ audio_out=open( dev_name ,O_WRONLY , 0); X if(audio_out == -1)end_program(1086); X goto set_da; X } X@@ -275,8 +275,8 @@ X } X else X { X- make_devname(ui.da_device_no); X- audio_out=open( devname ,O_WRONLY|O_NONBLOCK , 0); X+ make_dev_name(ui.da_device_no); X+ audio_out=open( dev_name ,O_WRONLY|O_NONBLOCK , 0); X if(audio_out == -1)end_program(1017); X set_da:; X // Set a small fragment size so we can stop playing quickly. X@@ -397,24 +397,24 @@ X for(device_no=0; device_no<MAX_DEVNAMES; device_no++) X { X dev_flag[device_no]=0; X- make_devname(device_no); X- fprintf(sndlog,"Checking %s\n",devname); X+ make_dev_name(device_no); X+ fprintf(sndlog,"Checking %s\n",dev_name); X flush_sync(); X for(mode=0; mode<3; mode++) X { X k=1<<mode; X sprintf(s, X "Trying to open %s %s. Device defective if system hangs here. Read %s ", X- devname, devmode_txt[mode],logfile_name); X+ dev_name, devmode_txt[mode],logfile_name); X flush_sync(); X settextcolor(12); X xytext(0,line+1,s); X settextcolor(7); X- audio_out=open( devname, devmodes[mode]|O_NONBLOCK, 0); X+ audio_out=open( dev_name, devmodes[mode]|O_NONBLOCK, 0); X if(audio_out != -1) X { X for(nn=0; nn<80; nn++)fprintf(sndlog,"-"); X- fprintf(sndlog,"\n%s opened as %s ",devname, devmode_txt[mode]); X+ fprintf(sndlog,"\n%s opened as %s ",dev_name, devmode_txt[mode]); X flush_sync(); X rdwr_fmt=16; X rdwr_channels=0; X@@ -575,7 +575,7 @@ X if( (dev_flag[device_no]&1) == 1) X { X sprintf(ss,"\n%02d:%12s %7d Hz %d Chan. %d bit", X- device_no,devname,dev_rd_speed[device_no], X+ device_no,dev_name,dev_rd_speed[device_no], X dev_rd_channels[device_no], X dev_rd_bits[device_no]); X } X@@ -584,7 +584,7 @@ X if( (dev_flag[device_no]&2) == 2) X { X sprintf(ss,"\n%02d:%12s %7d Hz %d Chan. %d bit", X- device_no,devname,dev_wr_speed[device_no], X+ device_no,dev_name,dev_wr_speed[device_no], X dev_wr_channels[device_no], X dev_wr_bits[device_no]); X } X@@ -631,11 +631,11 @@ X color=0x17; X sprintf(&ss[maxcolumn], X "\n%02d:%12s %7d Hz %d Chan. %d bit %s", X- device_no,devname,dev_wr_speed[device_no], X+ device_no,dev_name,dev_wr_speed[device_no], X dev_wr_channels[device_no], X dev_wr_bits[device_no],devmode_txt[1]); X sprintf(ss,"\n%02d:%12s %7d Hz %d Chan. %d bit %s", X- device_no,devname,dev_rd_speed[device_no], X+ device_no,dev_name,dev_rd_speed[device_no], X dev_rd_channels[device_no], X dev_rd_bits[device_no],devmode_txt[0]); X } X@@ -649,17 +649,17 @@ X color=0x17; X sprintf(&ss[2*maxcolumn], X "\n%02d:%12s %7d Hz %d Chan. %d bit %s", X- device_no,devname,dev_wr_speed[device_no], X+ device_no,dev_name,dev_wr_speed[device_no], X dev_wr_channels[device_no], X dev_wr_bits[device_no],devmode_txt[1]); X sprintf(&ss[maxcolumn], X "\n%02d:%12s %7d Hz %d Chan. %d bit %s", X- device_no,devname,dev_rd_speed[device_no], X+ device_no,dev_name,dev_rd_speed[device_no], X dev_rd_channels[device_no], X dev_rd_bits[device_no],devmode_txt[0]); X sprintf(ss, X "\n%02d:%12s %7d Hz %d Chan. %d bit %s", X- device_no,devname,dev_rdwr_speed[device_no], X+ device_no,dev_name,dev_rdwr_speed[device_no], X dev_rdwr_channels[device_no], X dev_rdwr_bits[device_no],devmode_txt[2]); X } X@@ -672,12 +672,12 @@ X color=0x17; X sprintf(&ss[maxcolumn], X "\n%02d:%12s %7d Hz %d Chan. %d bit %s", X- device_no,devname,dev_wr_speed[device_no], X+ device_no,dev_name,dev_wr_speed[device_no], X dev_wr_channels[device_no], X dev_wr_bits[device_no],devmode_txt[1]); X sprintf(ss, X "\n%02d:%12s %7d Hz %d Chan. %d bit %s %s", X- device_no,devname,dev_rd_speed[device_no], X+ device_no,dev_name,dev_rd_speed[device_no], X dev_rd_channels[device_no], dev_rd_bits[device_no], X devmode_txt[0],devmode_txt[2]); X } X@@ -686,12 +686,12 @@ X color=0x1d; X sprintf(&ss[maxcolumn], X "\n%02d:%12s %7d Hz %d Chan. %d bit %s %s", X- device_no,devname,dev_wr_speed[device_no], X+ device_no,dev_name,dev_wr_speed[device_no], X dev_wr_channels[device_no], dev_wr_bits[device_no], X devmode_txt[1],devmode_txt[2]); X sprintf(ss, X "\n%02d:%12s %7d Hz %d Chan. %d bit %s", X- device_no,devname,dev_rd_speed[device_no], X+ device_no,dev_name,dev_rd_speed[device_no], X dev_rd_channels[device_no], dev_rd_bits[device_no], X devmode_txt[0]); X } X@@ -777,8 +777,8 @@ X } X } X vga_clear(); X-make_devname(ui.ad_device_no); X-fprintf(sndlog,"\n\n %s selected by user for input.",devname); X+make_dev_name(ui.ad_device_no); X+fprintf(sndlog,"\n\n %s selected by user for input.",dev_name); X fprintf(sndlog," dev_flag=%d",dev_flag[ui.ad_device_no]); X flush_sync(); X // High end users might need two devices to read four A/D channels. X@@ -819,8 +819,8 @@ X if(vga_inkey != 'Y')goto gt_dual; X vga_clear(); X fprintf(sndlog,"\nUser wants to try to open two read devices"); X- make_devname(ui.ad_device_no); X- audio_in=open( devname, O_RDONLY, 0); X+ make_dev_name(ui.ad_device_no); X+ audio_in=open( dev_name, O_RDONLY, 0); X if(audio_in == -1)end_program(1102); X // Check for DSP_CAP_TRIGGER capability X if(ioctl(audio_in, SNDCTL_DSP_GETCAPS,&caps) == -1)end_program(1182); X@@ -834,14 +834,14 @@ X if(ioctl(audio_in, SNDCTL_DSP_CHANNELS, &j) == -1)end_program(1185); X if(j != 2)end_program(1186); X } X- make_devname(i); X- audio_in2=open( devname, O_RDONLY|O_NONBLOCK, 0); X+ make_dev_name(i); X+ audio_in2=open( dev_name, O_RDONLY|O_NONBLOCK, 0); X if(audio_in2 != -1) X { X line++; X- fprintf(sndlog,"\n%s opened as second read device",devname); X+ fprintf(sndlog,"\n%s opened as second read device",dev_name); X sprintf(s,"\n%02d:%12s %7d Hz %d Chan. %d bit", X- i,devname,dev_rd_speed[i], dev_rd_channels[i], X+ i,dev_name,dev_rd_speed[i], dev_rd_channels[i], X dev_rd_bits[i]); X xytext(0,line,s); X close(audio_in2); X@@ -866,13 +866,13 @@ X goto get_addev2; X } X // We store the second A/D device in the second byte of ad_device_no X- make_devname(i); X+ make_dev_name(i); X ui.ad_device_no+=256*(i+1); X for(i=0; i<MAX_DEVNAMES; i++) X { X dev_flag[i]&=255; X } X- audio_in2=open( devname, O_RDONLY|O_NONBLOCK, 0); X+ audio_in2=open( dev_name, O_RDONLY|O_NONBLOCK, 0); X if(audio_in2 == -1)end_program(1172); X // Check for DSP_CAP_TRIGGER capability X if(ioctl(audio_in2, SNDCTL_DSP_GETCAPS,&caps) == -1)end_program(1182); X@@ -883,7 +883,7 @@ X close(audio_in2); X goto skip_dual_devices; X } X- fprintf(sndlog,"\n %s is second input device.",devname); X+ fprintf(sndlog,"\n %s is second input device.",dev_name); X ui.input_mode=TWO_CHANNELS+IQ_DATA; X ui.rx_channels=2; X ui.ad_channels=4; X@@ -894,7 +894,7 @@ X } X // Now that we decided what device to use for input, open it and let X // the user decide how to use it. X-make_devname(ui.ad_device_no); X+make_dev_name(ui.ad_device_no); X flush_sync(); X ui.ad_device_mode=O_RDONLY; X mode=0; X@@ -903,7 +903,7 @@ X if( (1 & dev_flag[ui.ad_device_no]) != 0) X { X gt_rdo:; X- sprintf(s,"Open %s as RDONLY or RDWR? (O/W)\n=>",devname); X+ sprintf(s,"Open %s as RDONLY or RDWR? (O/W)\n=>",dev_name); X xytext(10,10,s); X vga_inkey=vga_getkey(); X clean_vga_inkey(); X@@ -925,9 +925,9 @@ X } X flush_sync(); X vga_clear(); X-sprintf(s,"For analog input: %s opened in %s mode",devname,devmode_txt[mode]); X+sprintf(s,"For analog input: %s opened in %s mode",dev_name,devmode_txt[mode]); X xytext(0,0,s); X-audio_in=open( devname, ui.ad_device_mode, 0); X+audio_in=open( dev_name, ui.ad_device_mode, 0); X if(audio_in == -1)end_program(1038); X j=dev_rd_channels[ui.ad_device_no]; X xytext(0,10,"Select radio interface:"); X@@ -1123,7 +1123,7 @@ X X X settextcolor(12); X-sprintf(s,"Trying to read %s",devname); X+sprintf(s,"Trying to read %s",dev_name); X xytext(10,10,s); X xytext(0,12,"If you see this message for more than 2 seconds READ failed"); X xytext(0,13,"Then try another device"); X@@ -1176,7 +1176,7 @@ X } X fprintf(sndlog,"\nRead test OK"); X for(i=10; i<14; i++)xytext(0,i,ss); X-sprintf(s,"Now trying to open a second device while %s is open",devname); X+sprintf(s,"Now trying to open a second device while %s is open",dev_name); X xytext(0,6,s); X xytext(0,7,"This may cause your system to hang. Try ctrlC to exit (or reboot)"); X xytext(0,8,"Try another input device or install another sound system."); X@@ -1192,9 +1192,9 @@ X read(audio_in, testbuff, 1024); X if(ioctl(audio_in,SNDCTL_DSP_GETISPACE,&ad_info) == -1)end_program(1093); X } X- make_devname(i); X+ make_dev_name(i); X cn=0; X- sprintf(s,"%02d:%12s",i,devname); X+ sprintf(s,"%02d:%12s",i,dev_name); X xytext(0,line,s); X column=0; X while(s[column] != 0)column++; X@@ -1206,7 +1206,7 @@ X if( (ui.input_mode&DWORD_INPUT) != 0 || ui.ad_channels > 2) X { X sprintf(&s[column], X- " RDWR useless (too many bits or channels) %d: %s",i,devname); X+ " RDWR useless (too many bits or channels) %d: %s",i,dev_name); X dev_flag[i]=0; X } X else X@@ -1224,10 +1224,10 @@ X dev_flag[i]&=0xffff-4; X if( (dev_flag[i]&2) != 0 ) X { X- audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0); X+ audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0); X if(audio_out != -1) X { X- fprintf(sndlog,"\n%s opened as WRONLY",devname); X+ fprintf(sndlog,"\n%s opened as WRONLY",dev_name); X flush_sync(); X if(ioctl(audio_in, SNDCTL_DSP_GETISPACE, X &ad_info) == -1)end_program(1094); X@@ -1380,17 +1380,17 @@ X line=0; X for(i=0; i<MAX_DEVNAMES; i++) X { X- make_devname(i); X- fprintf(sndlog,"\n%s ",devname); X+ make_dev_name(i); X+ fprintf(sndlog,"\n%s ",dev_name); X cn=0; X- sprintf(s,"%02d:%12s",i,devname); X+ sprintf(s,"%02d:%12s",i,dev_name); X xytext(0,line,s); X column=0; X while(s[column] != 0)column++; X- audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0); X+ audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0); X if(audio_out != -1) X { X- fprintf(sndlog,"\n%s opened as WRONLY with no input open.",devname); X+ fprintf(sndlog,"\n%s opened as WRONLY with no input open.",dev_name); X flush_sync(); X j=AFMT_U8; X if(ioctl(audio_out, SNDCTL_DSP_SETFMT, &j) == -1) X@@ -1528,8 +1528,8 @@ X ui.da_device_no=j; X if( (6 & dev_flag[ui.da_device_no]) == 0) goto get_dadev; X } X-make_devname(ui.da_device_no); X-fprintf(sndlog,"\nUser selected %s for output.",devname); X+make_dev_name(ui.da_device_no); X+fprintf(sndlog,"\nUser selected %s for output.",dev_name); X for(i=6; i<=line; i++)xytext(0,i,ss); X xytext(0,8,"Use close and reopen for D/A when"); X xytext(0,9,"a new signal is selected? (Y/N)"); X@@ -1563,8 +1563,8 @@ X } X else X { X- audio_out=open( devname ,O_WRONLY , 0); X- sprintf(s,"\nUsing %s for output",devname); X+ audio_out=open( dev_name ,O_WRONLY , 0); X+ sprintf(s,"\nUsing %s for output",dev_name); X xytext(0,6,s); X if(audio_out == -1)end_program(1068); X da_wrbuf = NULL; END-of-linrad/files/patch-setad.c echo x - linrad/files/patch-hwaredriver.c sed 's/^X//' >linrad/files/patch-hwaredriver.c << 'END-of-linrad/files/patch-hwaredriver.c' X--- hwaredriver.c.orig Tue May 18 09:43:30 2004 X+++ hwaredriver.c Fri Jul 9 11:26:15 2004 X@@ -1,6 +1,6 @@ X X #include <vga.h> X-#include <sys/io.h> X+#include <machine/cpufunc.h> X #include <ctype.h> X #include "conf.h" X #include "globdef.h" X@@ -169,7 +169,7 @@ X void users_open_devices(void) X { X // Get permission to write to the parallel port X-ioperm(HWARE_PORT,4,1); X+i386_set_ioperm(HWARE_PORT,4,1); X allow_parport=1; X } X END-of-linrad/files/patch-hwaredriver.c echo x - linrad/files/patch-tune.c sed 's/^X//' >linrad/files/patch-tune.c << 'END-of-linrad/files/patch-tune.c' X--- tune.c.orig Tue May 18 09:43:30 2004 X+++ tune.c Fri Jul 9 12:25:02 2004 X@@ -1,10 +1,9 @@ X X- X-#include <sys/io.h> X+#include <sys/types.h> X #include <vga.h> X #include <vgagl.h> X #include <unistd.h> X- X+#include <machine/cpufunc.h> X #include "globdef.h" X #include "uidef.h" X #include "fft1def.h" END-of-linrad/files/patch-tune.c echo x - linrad/files/patch-Makefile.in sed 's/^X//' >linrad/files/patch-Makefile.in << 'END-of-linrad/files/patch-Makefile.in' X--- Makefile.in.orig Tue May 18 09:43:30 2004 X+++ Makefile.in Fri Jul 9 00:43:44 2004 X@@ -1,11 +1,14 @@ X+INCLUDE= /usr/local/include X+LIBS= /usr/local/lib X+ X X .c.o: X-# gcc -I/usr/local/include -c -o $*.o $< X- gcc -O -W -Wimplicit -Wreturn-type -Wformat \ X--Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \ X--Wparentheses -Wstrict-prototypes -Werror -ffast-math -fforce-mem \ X--fomit-frame-pointer -c -o $*.o \ X-$< X+ ${CC} -I${INCLUDE} -c -o $*.o $< X+# gcc -O -W -Wimplicit -Wreturn-type -Wformat \ X+#-Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \ X+#-Wparentheses -Wstrict-prototypes -Werror -ffast-math -fforce-mem \ X+#-fomit-frame-pointer -c -o $*.o \ X+#$< X X .s.o: X nasm -w-orphan-labels -felf -s $< X@@ -23,7 +26,7 @@ X tune.o txtest.o network.o mouse.o freq_control.o vgatest mousetest morse.o \ X cwspeed.o coh_osc.o cw_carrier.o X X- gcc -olinrad -lvgagl -lvga -lm \ X+ ${CC} -I${INCLUDE} -L${LIBS} -olinrad -lvgagl -lvga -lm \ X -Wl,-s,-Map,linrad.map,-warn-common,--cref\ X main.o ui.o setvga.o setad.o fft1.o buf.o mouse.o wide_graph.o \ X getiq.o fft0.o rxtest.o hires_graph.o fftasm.o baseb_graph.o mix2.o \ X@@ -37,10 +40,10 @@ X cw_carrier.o fft3.o X X vgatest: vgatest.o X- gcc -ovgatest -lvgagl -lvga -lm -Wl -s vgatest.o X+ ${CC} -I${INCLUDE} -ovgatest -L${LIBS} -lvgagl -lvga -lm -Wl -s vgatest.o X X mousetest: mousetest.o X- gcc -omousetest -lvgagl -lvga -lm -Wl -s mousetest.o X+ ${CC} -I${INCLUDE} -omousetest -L${LIBS} -lvgagl -lvga -lm -Wl -s mousetest.o X X afc_graph.o : globdef.h uidef.h fft1def.h fft2def.h screendef.h vernr.h \ X seldef.h llsqdef.h sigdef.h X@@ -126,3 +129,11 @@ X configure : Makefile.in conf.h.in configure.in X rm -f configure X autoconf X+ X+all: vgatest mousetest linrad X+ X+clean: X+ rm -f vgatest mousetest linrad *.o X+ X+install: X+ install -oroot -m04566 linrad ${PREFIX}/bin/linrad END-of-linrad/files/patch-Makefile.in echo x - linrad/files/patch-uidef.h sed 's/^X//' >linrad/files/patch-uidef.h << 'END-of-linrad/files/patch-uidef.h' X--- uidef.h.orig Tue May 18 09:43:30 2004 X+++ uidef.h Thu Jul 8 18:27:42 2004 X@@ -1,4 +1,5 @@ X-#include <arpa/inet.h> X+#include <sys/types.h> X+#include <netinet/in.h> X X #define MAX_FLOWCNT 31 X END-of-linrad/files/patch-uidef.h echo x - linrad/files/patch-wcw.c sed 's/^X//' >linrad/files/patch-wcw.c << 'END-of-linrad/files/patch-wcw.c' X--- wcw.c.orig Thu Jul 8 18:22:12 2004 X+++ wcw.c Thu Jul 8 18:22:55 2004 X@@ -116,10 +116,12 @@ X int syncflag, baseb_graph_time; X audio_buf_info ad_info, ad_info2; X touch_stack(); X+#if 0 X if(ui.memlock == 0) X { X if(mlockall(MCL_CURRENT) != 0)end_program(1165); X } X+#endif X baseb_graph_time=0; X get_buffers(0); X if(lir_status != LIR_OK)return; X@@ -181,10 +183,12 @@ X diskread_timer=recent_time; X latest_idle_time=recent_time; X lirsta=RX_LOW_PRIO; X+#if 0 X if(ui.memlock == 0) X { X if(mlockall(MCL_CURRENT) != 0)lir_status=LIR_MEMERR; X } X+#endif X if(lir_status != LIR_OK)goto wcw_exit; X // ******************************************************* X // MAIN RECEIVE LOOP END-of-linrad/files/patch-wcw.c echo x - linrad/files/patch-main.c sed 's/^X//' >linrad/files/patch-main.c << 'END-of-linrad/files/patch-main.c' X--- main.c.orig Thu Jul 8 18:24:25 2004 X+++ main.c Thu Jul 8 18:25:02 2004 X@@ -355,7 +355,9 @@ X end_program(436); X } X lir_errors:; X+#if 0 X if(ui.memlock == 0)munlockall(); X+#endif X close_all_except_vga(); X if(lir_status > LIR_OK) X { X@@ -640,7 +642,9 @@ X { X bufreduce:; X vga_clear(); X+#if 0 X if(ui.memlock == 0)munlockall(); X+#endif X settextcolor(15); X switch (lir_status) X { X@@ -854,12 +858,14 @@ X else X { X if(chr != 'Y')goto gtswap; X+#if 0 X if(mlockall(MCL_CURRENT) != 0) X { X if(errno == EPERM)end_program(1168); X if(errno == ENOMEM)end_program(1169); X end_program(1170); X } X+#endif X } X clearscreen(); X printf("Use usleep when the CPU is not needed\nRead z_USLEEP.txt for info."); END-of-linrad/files/patch-main.c echo x - linrad/distinfo sed 's/^X//' >linrad/distinfo << 'END-of-linrad/distinfo' XMD5 (linrad/lir01-20.tbz) = 34b6f5ef52adf8b9a8af444db43ddf70 XSIZE (linrad/lir01-20.tbz) = 330472 END-of-linrad/distinfo echo x - linrad/pkg-plist sed 's/^X//' >linrad/pkg-plist << 'END-of-linrad/pkg-plist' Xbin/linrad X%%PORTDOCS%%%%DOCSDIR%%/z_APM.txt X%%PORTDOCS%%%%DOCSDIR%%/z_BUFFERS.txt X%%PORTDOCS%%%%DOCSDIR%%/z_CALIBRATE.txt X%%PORTDOCS%%%%DOCSDIR%%/z_COPYRIGHT.txt X%%PORTDOCS%%%%DOCSDIR%%/z_GIFINFO.txt X%%PORTDOCS%%%%DOCSDIR%%/z_INSTALL.txt X%%PORTDOCS%%%%DOCSDIR%%/z_MLOCK.txt X%%PORTDOCS%%%%DOCSDIR%%/z_SETTINGS.txt X%%PORTDOCS%%%%DOCSDIR%%/z_SPEED.txt X%%PORTDOCS%%%%DOCSDIR%%/z_SVGALIB.txt X%%PORTDOCS%%%%DOCSDIR%%/z_USERS_HWARE.txt X%%PORTDOCS%%%%DOCSDIR%%/z_USLEEP.txt X%%PORTDOCS%%@dirrm %%DOCSDIR%% END-of-linrad/pkg-plist exit --- linrad.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407091754.i69Hs7No007857>