Ubreak on -head

Pet portlint
regenerate distinfo
Clean up Makefile

Reported by:	pkg-fallout@
This commit is contained in:
Diane Bruce 2020-03-17 17:17:58 +00:00
parent 73122d8fa2
commit a5f6343b69
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528587
8 changed files with 98 additions and 26 deletions

View File

@ -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>

View File

@ -1,2 +1,3 @@
TIMESTAMP = 1584458832
SHA256 (lir04-02.tbz) = f9fe2bad9dc255309b8150afeb6c917bf297bb1ca4c7f49c281a60e64fb346fa
SIZE (lir04-02.tbz) = 880754

View File

@ -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));

View File

@ -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

View File

@ -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)

View File

@ -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",

View File

@ -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)

View File

@ -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)