mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-22 04:17:44 +00:00
- Update to 3.08 linrad
- remove patches for code accepted upstream
This commit is contained in:
parent
e7d3d12606
commit
b4bcd1ab92
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=242775
@ -6,14 +6,13 @@
|
||||
#
|
||||
|
||||
PORTNAME= linrad
|
||||
PORTVERSION= 3.03
|
||||
PORTVERSION= 3.08
|
||||
CATEGORIES= comms hamradio
|
||||
MASTER_SITES= http://www.nitehawk.com/sm5bsz/linuxdsp/archive/\
|
||||
http://g7rau.demon.co.uk/sm5bsz/linuxdsp/archive/\
|
||||
http://www.sm5bsz.com/linuxdsp/archive/
|
||||
DISTNAME= lir03-03
|
||||
DISTNAME= lir03-08
|
||||
EXTRACT_SUFX= .tbz
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
|
||||
MAINTAINER= db@FreeBSD.org
|
||||
COMMENT= Amateur Radio DSP utility (SDR)
|
||||
@ -24,6 +23,8 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-0${PORTVERSION}
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --prefix=${PREFIX} --sysconfdir=${PREFIX}
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
USE_GMAKE= yes
|
||||
USE_BZIP2= yes
|
||||
ALL_TARGET= xlinrad
|
||||
@ -31,15 +32,21 @@ USE_XORG= x11
|
||||
ONLY_FOR_ARCHS= i386
|
||||
LINRAD_DOCFILES= z_APM.txt z_BUFFERS.txt z_CALIBRATE.txt \
|
||||
z_COPYRIGHT.txt z_GIFINFO.txt \
|
||||
z_MOUSE.txt z_NETWORK.txt \
|
||||
z_MORSE_DECODING.txt z_MOUSE.txt z_NETWORK.txt \
|
||||
z_PARALLEL_PORT.txt z_SETTINGS.txt \
|
||||
z_USERS_EXTRA.txt z_USERS_HWARE.txt
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
||||
-e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g'\
|
||||
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
||||
${WRKSRC}/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}/|' \
|
||||
${WRKSRC}/help.c
|
||||
.if ${OSVERSION} >= 800000
|
||||
@${REINPLACE_CMD} -e "s|ttyd|ttyu|" \
|
||||
${WRKSRC}/lxsys.c
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${DATADIR}
|
||||
@ -60,4 +67,4 @@ do-install:
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (linrad/lir03-03.tbz) = 40000e4e282289638bc8293914ae714a
|
||||
SHA256 (linrad/lir03-03.tbz) = fb1bd4507de1327d546fdaf2487adcdbeeb6522d8eab9da734df4affa61b071a
|
||||
SIZE (linrad/lir03-03.tbz) = 543243
|
||||
MD5 (lir03-08.tbz) = 0c433e8a24175aa6ef5bc208c7ae80bc
|
||||
SHA256 (lir03-08.tbz) = 0d3363501afcd88ebb5b3e307bd5b8553f2ac33657737baa44cae01868ded541
|
||||
SIZE (lir03-08.tbz) = 559203
|
||||
|
@ -1,41 +1,44 @@
|
||||
--- Makefile.in.orig 2009-03-09 17:29:26.000000000 -0400
|
||||
+++ Makefile.in 2009-03-22 15:53:31.000000000 -0400
|
||||
@@ -4,7 +4,7 @@
|
||||
--- Makefile.in.orig 2009-10-03 11:39:34.000000000 -0400
|
||||
+++ Makefile.in 2009-10-13 09:48:32.000000000 -0400
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# ----------- Compilers ----------------
|
||||
# Use gcc to compile files for Linux.
|
||||
-CC=gcc
|
||||
+CC?=gcc
|
||||
# Name the output files *.ol instead of *.o
|
||||
# so we definitely know it is for Linux.
|
||||
# (*.o files can be present by mistake)
|
||||
-LCC = gcc -D_FILE_OFFSET_BITS=64
|
||||
+LCC = ${CC} -D_FILE_OFFSET_BITS=64
|
||||
WCC = /usr/bin/i586-mingw32msvc-gcc
|
||||
WINWCC = C:\mingw\bin\mingw32-gcc
|
||||
NASM = nasm
|
||||
@@ -14,10 +14,7 @@
|
||||
@@ -15,10 +15,8 @@
|
||||
# so we definitely know it is for Windows.
|
||||
# (*.o files can be present by mistake)
|
||||
# Always use the same flags.
|
||||
-CFL = -g -O -DOSNUM=1 -W -Wall -Wimplicit -Wreturn-type -Wformat \
|
||||
-@MEM@ -Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \
|
||||
-CFL = -g -O -DOSNUM=1 @X11@ -W -Wall -Wimplicit -Wreturn-type -Wformat \
|
||||
--m32 -Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \
|
||||
--Wparentheses -Wstrict-prototypes -Werror -ffast-math -Wundef \
|
||||
--fomit-frame-pointer -c -o
|
||||
+CFL = ${CFLAGS} -DOSNUM=1 -I/usr/local/include -c -o
|
||||
+CFL = -O -DOSNUM=1 @X11@ -I%%LOCALBASE%%/include -m32 -ffast-math \
|
||||
+ -fomit-frame-pointer -c -o
|
||||
|
||||
CFW = -g -O -DOSNUM=2 -W -Wall -Wimplicit -Wreturn-type -Wformat \
|
||||
-Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \
|
||||
@@ -645,7 +642,7 @@
|
||||
@@ -646,7 +644,7 @@
|
||||
meter_graph.ol fonts.ol screensub.ol tx_graph.ol txssb.ol lxsys.ol
|
||||
|
||||
|
||||
- gcc @MEM@ -olinrad -lvgagl -lvga -lpthread -lm @ALSALIB@ \
|
||||
+ gcc @MEM@ -olinrad -lvgagl -lvga -pthread -lm @ALSALIB@ \
|
||||
- ${CC} -m32 -olinrad -lvgagl -lvga -lpthread -lm @ALSALIB@ -lrt \
|
||||
+ ${CC} -m32 -olinrad -lvgagl -lvga -lpthread -lm @ALSALIB@ \
|
||||
-Wl,-Map,linrad.lmap,-warn-common \
|
||||
lmain.ol lvar.ol ui.ol lsetad.ol fft1.ol buf.ol radar.ol \
|
||||
mouse.ol wide_graph.ol getiq.ol fft0.ol adtest.ol hires_graph.ol \
|
||||
@@ -692,7 +689,7 @@
|
||||
@@ -703,8 +701,8 @@
|
||||
|
||||
|
||||
|
||||
- gcc @MEM@ -oxlinrad -L/usr/X11R6/lib -lX11 -lpthread -lm @ALSALIB@ \
|
||||
+ ${CC} @MEM@ -oxlinrad -L/usr/local/lib -lX11 -lpthread -lm \
|
||||
-Wl,-Map,linrad.xmap,-warn-common \
|
||||
- ${CC} -m32 -oxlinrad -L/usr/X11R6/lib @SHMLIB@ -lX11 -lpthread \
|
||||
--lm @ALSALIB@ -lrt -Wl,-Map,linrad.xmap,-warn-common \
|
||||
+ ${CC} -m32 -oxlinrad -L%%LOCALBASE%%/lib -L%%LOCALBASE%%/X11R6/lib @SHMLIB@ -lX11 -lpthread \
|
||||
+-lm @ALSALIB@ -Wl,-Map,linrad.xmap,-warn-common \
|
||||
xmain.ol xvar.ol ui.ol lsetad.ol fft1.ol buf.ol lvar.ol radar.ol \
|
||||
mouse.ol wide_graph.ol getiq.ol fft0.ol adtest.ol hires_graph.ol \
|
||||
fftasm.ol baseb_graph.ol mix2.ol afc_graph.ol hwaredriver.ol \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- help.c.orig 2009-03-09 17:29:26.000000000 -0400
|
||||
+++ help.c 2009-03-22 16:09:52.000000000 -0400
|
||||
@@ -430,7 +430,7 @@
|
||||
--- help.c.orig 2009-08-26 18:48:32.000000000 -0400
|
||||
+++ help.c 2009-09-01 19:16:42.000000000 -0400
|
||||
@@ -434,7 +434,7 @@
|
||||
printf("\n%s",s);
|
||||
DEB"\n%s",s);
|
||||
}
|
||||
@ -9,7 +9,7 @@
|
||||
line=3;
|
||||
if(screen_mode)
|
||||
{
|
||||
@@ -445,7 +445,7 @@
|
||||
@@ -449,7 +449,7 @@
|
||||
{
|
||||
int line;
|
||||
if(msg_no < 0)return;
|
||||
|
@ -1,80 +0,0 @@
|
||||
--- lxsys.c.orig 2009-03-09 17:29:26.000000000 -0400
|
||||
+++ lxsys.c 2009-03-22 15:37:47.000000000 -0400
|
||||
@@ -1,12 +1,14 @@
|
||||
-
|
||||
-#include <sys/io.h>
|
||||
+#include <sys/cdefs.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <machine/cpufunc.h>
|
||||
+#include <machine/sysarch.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
+#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <semaphore.h>
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
-#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include "globdef.h"
|
||||
@@ -18,7 +20,8 @@
|
||||
#include "hwaredef.h"
|
||||
|
||||
struct termios old_options;
|
||||
-char serport_name[]="/dev/ttyS?";
|
||||
+char serport_name[]="/dev/ttyd?";
|
||||
+extern int saved_euid;
|
||||
|
||||
void perseus_input(void){};
|
||||
|
||||
@@ -231,15 +234,13 @@
|
||||
|
||||
int lir_parport_permission(void)
|
||||
{
|
||||
-int i;
|
||||
+int i=0;
|
||||
// Get permission to write to the parallel port
|
||||
if(ui.parport < 0x400-4)
|
||||
{
|
||||
- i=ioperm(ui.parport,4,1);
|
||||
- }
|
||||
-else
|
||||
- {
|
||||
- i=iopl(3);
|
||||
+ seteuid(saved_euid);
|
||||
+ i=i386_set_ioperm(ui.parport,4,1);
|
||||
+ seteuid(getuid());
|
||||
}
|
||||
if(i != 0)
|
||||
{
|
||||
@@ -397,11 +398,9 @@
|
||||
int i;
|
||||
if(ui.parport < 0x400-4)
|
||||
{
|
||||
- i=ioperm(ui.parport,4,1);
|
||||
- }
|
||||
-else
|
||||
- {
|
||||
- i=iopl(3);
|
||||
+ seteuid(saved_euid);
|
||||
+ i=i386_set_ioperm(ui.parport,4,1);
|
||||
+ seteuid(getuid());
|
||||
}
|
||||
if(i!=0)lirerr(764921);
|
||||
i=1000;
|
||||
@@ -414,11 +413,9 @@
|
||||
int i;
|
||||
if(ui.parport < 0x400-4)
|
||||
{
|
||||
- i=ioperm(ui.parport,4,1);
|
||||
- }
|
||||
-else
|
||||
- {
|
||||
- i=iopl(3);
|
||||
+ seteuid(saved_euid);
|
||||
+ i=i386_set_ioperm(ui.parport,4,1);
|
||||
+ seteuid(getuid());
|
||||
}
|
||||
if(i!=0)lirerr(764921);
|
||||
return inb(port);
|
@ -1,9 +0,0 @@
|
||||
--- rusage.h.in.orig 2009-01-11 19:50:51.000000000 -0500
|
||||
+++ rusage.h.in 2009-01-11 19:51:17.000000000 -0500
|
||||
@@ -1,5 +1,5 @@
|
||||
#if OSNUM == OS_FLAG_LINUX
|
||||
-#define RUSAGE_OLD @RUSAGE@
|
||||
+#define RUSAGE_OLD 1
|
||||
#else
|
||||
#define RUSAGE_OLD 0
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
--- xmain.c.orig 2009-03-09 17:29:28.000000000 -0400
|
||||
+++ xmain.c 2009-03-22 15:38:09.000000000 -0400
|
||||
@@ -29,6 +29,7 @@
|
||||
extern Window xwin;
|
||||
extern Colormap lir_colormap;
|
||||
|
||||
+int saved_euid=-1;
|
||||
|
||||
typedef struct {
|
||||
unsigned short int red;
|
||||
@@ -54,6 +55,8 @@
|
||||
Cursor cross_cursor;
|
||||
unsigned short int *ipalette;
|
||||
XColor xco;
|
||||
+saved_euid=geteuid();
|
||||
+setuid(getuid()); /* XXX drop perms! */
|
||||
for(i=0; i<MAX_LIRSEM; i++)lirsem_flag[i]=0;
|
||||
XInitThreads();
|
||||
if(DUMPFILE)
|
@ -5,5 +5,3 @@ operates by sampling sound on line-in channel of an audio card. In the future
|
||||
boards sampling directly at RF frequencies will be available.
|
||||
|
||||
WWW: http://www.nitehawk.com/sm5bsz/linuxdsp/linrad.htm
|
||||
|
||||
db@db.net
|
||||
|
@ -7,6 +7,7 @@ bin/xlinrad
|
||||
%%PORTDOCS%%%%DOCSDIR%%/z_CALIBRATE.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/z_COPYRIGHT.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/z_GIFINFO.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/z_MORSE_DECODING.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/z_MOUSE.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/z_NETWORK.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/z_PARALLEL_PORT.txt
|
||||
|
Loading…
Reference in New Issue
Block a user