summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorDiane Bruce <db@FreeBSD.org>2020-03-17 17:17:58 +0000
committerDiane Bruce <db@FreeBSD.org>2020-03-17 17:17:58 +0000
commita5f6343b6924e2dac668c18513b96e548e101f05 (patch)
treeb5fb284b01e45bf27e5515523235077d5c120889 /comms
parentbenchmarks/phoronix-test-suite: Update to 9.4.1 (diff)
Ubreak on -head
Pet portlint regenerate distinfo Clean up Makefile Reported by: pkg-fallout@
Notes
Notes: svn path=/head/; revision=528587
Diffstat (limited to 'comms')
-rw-r--r--comms/linrad/Makefile25
-rw-r--r--comms/linrad/distinfo1
-rw-r--r--comms/linrad/files/patch-buf.c20
-rw-r--r--comms/linrad/files/patch-extio.c29
-rw-r--r--comms/linrad/files/patch-help.c4
-rw-r--r--comms/linrad/files/patch-libfind1.c9
-rw-r--r--comms/linrad/files/patch-lxsys.c25
-rw-r--r--comms/linrad/files/patch-rxin.c11
8 files changed, 98 insertions, 26 deletions
diff --git a/comms/linrad/Makefile b/comms/linrad/Makefile
index f6cc22b13458..fd8f3730b1eb 100644
--- a/comms/linrad/Makefile
+++ b/comms/linrad/Makefile
@@ -2,29 +2,33 @@
PORTNAME= linrad
PORTVERSION= 4.02
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= comms hamradio
MASTER_SITES= http://www.nitehawk.com/sm5bsz/linuxdsp/archive/\
http://www.sm5bsz.com/linuxdsp/archive/
DISTNAME= lir04-02
-EXTRACT_SUFX= .tbz
MAINTAINER= hamradio@FreeBSD.org
COMMENT= Amateur Radio DSP utility (SDR)
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
LIB_DEPENDS= librtlsdr.so:comms/rtl-sdr \
libportaudio.so:audio/portaudio \
libftdi.so:devel/libftdi
BUILD_DEPENDS= nasm:devel/nasm
+USES= gmake tar:tbz xorg
+
WRKSRC= ${WRKDIR}/${PORTNAME}-0${PORTVERSION}
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --sysconfdir=${PREFIX}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-USES= gmake tar:bzip2 xorg
-USE_XORG= x11
+USE_XORG= x11 xext
+
LINRAD_DOCFILES= z_APM.txt z_BUFFERS.txt z_CALIBRATE.txt \
z_COPYRIGHT.txt z_GIFINFO.txt \
z_MORSE_DECODING.txt z_MOUSE.txt z_NETWORK.txt \
@@ -46,19 +50,10 @@ BINFILE= xlinrad64
ALL_TARGET= ${BINFILE}
post-patch:
-# These extensions seem to be Windows only
-# @${CP} ${WRKSRC}/extra_w3sz.c ${WRKSRC}/users_extra.c
-# @${CP} ${WRKSRC}/users_tr.c ${WRKSRC}/users_hwaredriver.c
- @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
- ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}/|' \
${WRKSRC}/help.c
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}/|' \
- ${WRKSRC}/libfind1.c
-# NOTE: The code that actually does anything in users.c is currently
-# #ifdef'd out because it's just a non-working example
- @${REINPLACE_CMD} -e "s|ttyd|ttyu|" \
- ${WRKSRC}/lxsys.c
+ ${WRKSRC}/libfind1.c ${WRKSRC}/help.c
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}
@@ -70,7 +65,7 @@ do-install:
${INSTALL_PROGRAM} -m0555 ${WRKSRC}/${BINFILE} ${STAGEDIR}${PREFIX}/bin/x${PORTNAME}
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${LINRAD_DOCFILES}
- @${INSTALL_DATA} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}/$f
+ ${INSTALL_DATA} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}/$f
.endfor
.include <bsd.port.post.mk>
diff --git a/comms/linrad/distinfo b/comms/linrad/distinfo
index d861a47d1416..10b48c769506 100644
--- a/comms/linrad/distinfo
+++ b/comms/linrad/distinfo
@@ -1,2 +1,3 @@
+TIMESTAMP = 1584458832
SHA256 (lir04-02.tbz) = f9fe2bad9dc255309b8150afeb6c917bf297bb1ca4c7f49c281a60e64fb346fa
SIZE (lir04-02.tbz) = 880754
diff --git a/comms/linrad/files/patch-buf.c b/comms/linrad/files/patch-buf.c
index cb8d3a7da332..feac79e80c84 100644
--- a/comms/linrad/files/patch-buf.c
+++ b/comms/linrad/files/patch-buf.c
@@ -1,6 +1,24 @@
--- buf.c.orig 2014-11-04 10:25:00 UTC
+++ buf.c
-@@ -1328,7 +1328,7 @@ if( (ui.network_flag & NET_RXIN_FFT1) ==
+@@ -583,7 +583,7 @@ else
+ }
+ t1+=5;
+ t1*=timf3_sampling_speed;
+-if(t1*genparm[MIX1_NO_OF_CHANNELS]*2*twice_rxchan*sizeof(float) > 0x7fffffff)
++if((unsigned long)(t1*genparm[MIX1_NO_OF_CHANNELS]*2*twice_rxchan*sizeof(float)) > 0x7fffffffUL)
+ {
+ t1=0x7fffffff/(genparm[MIX1_NO_OF_CHANNELS]*2*twice_rxchan*sizeof(float));
+ }
+@@ -672,7 +672,7 @@ else
+ fft1afc_flag=1;
+ }
+ t1=max_fft1_sumsq*fft1_size*sizeof(float);
+-if(t1 > 0x3ffffff)
++if((unsigned long)t1 > 0x3ffffffUL)
+ {
+ max_fft1_sumsq=0x3fffffff/(fft1_size*sizeof(float));
+ }
+@@ -1328,7 +1328,7 @@ if( (ui.network_flag & NET_RXIN_FFT1) == 0)
memset(fft1_char,0,fft1_bytes);
memset(liminfo,0,2*fft1_size*sizeof(float));
memset(liminfo_wait,0,fft1_size*sizeof(unsigned char));
diff --git a/comms/linrad/files/patch-extio.c b/comms/linrad/files/patch-extio.c
new file mode 100644
index 000000000000..6f3f444ce8a3
--- /dev/null
+++ b/comms/linrad/files/patch-extio.c
@@ -0,0 +1,29 @@
+--- extio.c.orig 2014-11-04 10:25:00 UTC
++++ extio.c
+@@ -335,7 +335,7 @@ if(cnt >= 0 && thread_status_flag[THREAD_EXTIO_INPUT]
+ for(i=0; i<j; i++)
+ {
+ iz=(int*)&timf1_char[timf1p_sdr];
+- iz[0]=(int)(0x7fffffff*z[i]);
++ iz[0]=(int)((float)0x7fffffff*z[i]);
+ timf1p_sdr=(timf1p_sdr+4)&timf1_bytemask;
+ }
+ break;
+@@ -369,7 +369,7 @@ char *dirs[]={"./",
+ "/usr/lib",
+ "/usr/lib32",
+ "/usr/lib32/lib",
+- "/usr/local/lib",
++ "%%LOCALBASE%%/lib",
+ "/usr/local32/lib",
+ "/emul/ia32-linux/lib",
+ "/emul/ia32-linux/usr/lib",
+@@ -381,7 +381,7 @@ char *dirs[]={"./",
+ "/lib64",
+ "/usr/lib",
+ "/usr/lib64",
+- "/usr/local/lib",
++ "%%LOCALBASE%%/lib",
+ "/usr/lib/x86_64-linux-gnu",
+ "X"};
+ #endif
diff --git a/comms/linrad/files/patch-help.c b/comms/linrad/files/patch-help.c
index 67ad9f31c4c4..04b90fb9d2ed 100644
--- a/comms/linrad/files/patch-help.c
+++ b/comms/linrad/files/patch-help.c
@@ -1,12 +1,12 @@
--- help.c.orig 2014-11-04 10:25:00 UTC
+++ help.c
-@@ -583,7 +583,10 @@ void write_from_msg_file(int *line, int
+@@ -583,7 +583,10 @@ void write_from_msg_file(int *line, int msg_no,
char s[512];
char chr;
int i,j,k;
-msg_file=fopen(msg_filename, "r");
+char *fn;
-+asprintf(&fn, "%s/%s", "/usr/local/share/linrad/", msg_filename);
++asprintf(&fn, "%s/%s", "%%LOCALBASE%%share/linrad/", msg_filename);
+msg_file=fopen(fn, "r");
+free(fn);
if(msg_file == NULL)
diff --git a/comms/linrad/files/patch-libfind1.c b/comms/linrad/files/patch-libfind1.c
index 71c7e8cef605..b5e59f52940f 100644
--- a/comms/linrad/files/patch-libfind1.c
+++ b/comms/linrad/files/patch-libfind1.c
@@ -1,11 +1,12 @@
--- libfind1.c.orig 2014-11-04 10:25:00 UTC
+++ libfind1.c
-@@ -39,6 +39,8 @@ char *dirs[]={"/lib/i386-linux-gnu",
+@@ -38,7 +38,8 @@ char *dirs[]={"/lib/i386-linux-gnu",
+ "/usr/lib64/lib",
"/usr/lib32",
"/usr/lib64",
- "/usr/local/lib",
-+ "/usr/local/lib/portaudio2",
-+ "/usr/local/lib32",
+- "/usr/local/lib",
++ "%%LOCALBASE%%lib",
++ "%%LOCALBASE%%lib32",
"/usr/local/lib64",
"/usr/local32/lib",
"/usr/lib",
diff --git a/comms/linrad/files/patch-lxsys.c b/comms/linrad/files/patch-lxsys.c
index 9c8eacc401f9..618202abe831 100644
--- a/comms/linrad/files/patch-lxsys.c
+++ b/comms/linrad/files/patch-lxsys.c
@@ -9,14 +9,31 @@
#else
char serport_name[]="/dev/ttyS....?";
#endif
-@@ -120,9 +120,9 @@ char *fmmx=" mmx";
- char *fsse=" sse";
- char *fht=" ht";
+@@ -122,7 +122,6 @@ char *fht=" ht";
char *fprocessor="processor";
-+int no_of_ht;
#endif
int xxprint;
-int no_of_ht;
// If there is no mmx, do not use simd either.
tickspersec = sysconf(_SC_CLK_TCK);
xxprint=0;
+@@ -422,8 +421,8 @@ float lir_noisegen(int level)
+ // Return a number distributed following a gaussian
+ // Mean value is 0 and sigma pow(2,level)
+ float x, y, z;
+-y = (float)(random()+0.5)/RAND_MAX;
+-z = (float)(random()+0.5)/RAND_MAX;
++y = (float)(random()+0.5)/(float)RAND_MAX;
++z = (float)(random()+0.5)/(float)RAND_MAX;
+ x = z * 2*PI_L;
+ return sin(x)*sqrt(-2*log(y))*pow(2.,level);
+ }
+@@ -888,7 +887,7 @@ return port;
+
+ float lir_random(void)
+ {
+-return (float)(random())/RAND_MAX;
++return (float)(random())/(float)RAND_MAX;
+ }
+
+ void lir_srandom(void)
diff --git a/comms/linrad/files/patch-rxin.c b/comms/linrad/files/patch-rxin.c
new file mode 100644
index 000000000000..7ef73977f10c
--- /dev/null
+++ b/comms/linrad/files/patch-rxin.c
@@ -0,0 +1,11 @@
+--- rxin.c.orig 2020-03-17 01:07:28 UTC
++++ rxin.c
+@@ -1399,7 +1399,7 @@ wait:;
+ while(j > 0)
+ {
+ j--;
+- rxin_int[j]=0x7fffffff*z[j];
++ rxin_int[j]=(float)0x7fffffff*z[j];
+ }
+ }
+ if(i != (int)snd[RXAD].block_bytes)