aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshurd <shurd@FreeBSD.org>2014-07-02 02:28:17 +0800
committershurd <shurd@FreeBSD.org>2014-07-02 02:28:17 +0800
commit1df3ea90f423a3118e9cb7ec6a46fa88ba219117 (patch)
tree7ac29b54fb2ecd21f0e2d1c83ebf8b4ddb08f988
parent023d69ca1ace328685a2ad91ef611fd5a59ba073 (diff)
downloadfreebsd-ports-gnome-1df3ea90f423a3118e9cb7ec6a46fa88ba219117.tar.gz
freebsd-ports-gnome-1df3ea90f423a3118e9cb7ec6a46fa88ba219117.tar.zst
freebsd-ports-gnome-1df3ea90f423a3118e9cb7ec6a46fa88ba219117.zip
STAGEify and update to 4.00
Portaudio support Improved AGC Voice squelch Spur removal Support for the rtlsdr library Reviewed by: db, skreuzer Approved by: db, skreuzer (mentors)
-rw-r--r--comms/linrad/Makefile46
-rw-r--r--comms/linrad/distinfo4
-rw-r--r--comms/linrad/files/patch-Makefile.in107
-rw-r--r--comms/linrad/files/patch-afedri.c10
-rw-r--r--comms/linrad/files/patch-buf.c11
-rw-r--r--comms/linrad/files/patch-configure34
-rw-r--r--comms/linrad/files/patch-help.c32
-rw-r--r--comms/linrad/files/patch-libfind1.c13
-rw-r--r--comms/linrad/files/patch-libfind2.c38
-rw-r--r--comms/linrad/files/patch-pcie9842.c10
-rw-r--r--comms/linrad/files/patch-si570.c11
-rw-r--r--comms/linrad/files/patch-usb2lpd.c11
-rw-r--r--comms/linrad/files/patch-users.c18
13 files changed, 273 insertions, 72 deletions
diff --git a/comms/linrad/Makefile b/comms/linrad/Makefile
index aeec005a3efe..d341ae3596be 100644
--- a/comms/linrad/Makefile
+++ b/comms/linrad/Makefile
@@ -2,17 +2,20 @@
# $FreeBSD$
PORTNAME= linrad
-PORTVERSION= 3.08
+PORTVERSION= 4.00
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-08
+DISTNAME= lir04-00
EXTRACT_SUFX= .tbz
-MAINTAINER= db@FreeBSD.org
+MAINTAINER= hamradio@FreeBSD.org
COMMENT= Amateur Radio DSP utility (SDR)
+LIB_DEPENDS= librtlsdr.so:${PORTSDIR}/comms/rtl-sdr \
+ portaudio2/libportaudio.so:${PORTSDIR}/audio/portaudio2 \
+ libftdi.so:${PORTSDIR}/devel/libftdi
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
WRKSRC= ${WRKDIR}/${PORTNAME}-0${PORTVERSION}
@@ -22,45 +25,52 @@ CONFIGURE_ARGS= --prefix=${PREFIX} --sysconfdir=${PREFIX}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USES= gmake tar:bzip2
-ALL_TARGET= xlinrad
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_MORSE_DECODING.txt z_MOUSE.txt z_NETWORK.txt \
z_PARALLEL_PORT.txt z_SETTINGS.txt \
z_USERS_EXTRA.txt z_USERS_HWARE.txt
-NO_STAGE= yes
.include <bsd.port.pre.mk>
+.if ${ARCH} == "i386"
+BINFILE= xlinrad
+.else
+BINFILE= xlinrad64
+.endif
+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|-lpthread|${PTHREAD_LIBS}|g'\
-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
.if ${OSVERSION} >= 800000
@${REINPLACE_CMD} -e "s|ttyd|ttyu|" \
${WRKSRC}/lxsys.c
.endif
do-install:
- ${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/errors.lir ${DATADIR}/errors.lir
- ${INSTALL_DATA} ${WRKSRC}/help.lir ${DATADIR}/help.lir
- ${INSTALL_SCRIPT} -m04555 ${FILESDIR}/linrad ${PREFIX}/bin/linrad
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/errors.lir ${STAGEDIR}${DATADIR}/errors.lir
+ ${INSTALL_DATA} ${WRKSRC}/help.lir ${STAGEDIR}${DATADIR}/help.lir
+ ${INSTALL_SCRIPT} -m0555 ${FILESDIR}/linrad ${STAGEDIR}${PREFIX}/bin/linrad
# Some day we may want the svga version as well.
-# ${INSTALL_PROGRAM} -m04555 ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}.svga
- ${INSTALL_PROGRAM} -m04555 ${WRKSRC}/x${PORTNAME} ${PREFIX}/bin/x${PORTNAME}
+# ${INSTALL_PROGRAM} -m0555 ${WRKSRC}/${PORTNAME} $(STAGEDIR}${PREFIX}/bin/${PORTNAME}.svga
+ ${INSTALL_PROGRAM} -m0555 ${WRKSRC}/${BINFILE} ${STAGEDIR}${PREFIX}/bin/x${PORTNAME}
.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${LINRAD_DOCFILES}
- @${INSTALL_DATA} ${WRKSRC}/$f ${DOCSDIR}/$f
+ @${INSTALL_DATA} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}/$f
.endfor
- @${ECHO} ""
- @${ECHO} "linrad docs installed in ${DOCSDIR}"
- @${ECHO} ""
.endif
- @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/comms/linrad/distinfo b/comms/linrad/distinfo
index 31892b09bf50..a4c439c4c3cd 100644
--- a/comms/linrad/distinfo
+++ b/comms/linrad/distinfo
@@ -1,2 +1,2 @@
-SHA256 (lir03-08.tbz) = 0d3363501afcd88ebb5b3e307bd5b8553f2ac33657737baa44cae01868ded541
-SIZE (lir03-08.tbz) = 559203
+SHA256 (lir04-00.tbz) = cd9fe11a51ff95daea28c053b6f9f7939cfbcb42c828cbc48e59c0a901b1764a
+SIZE (lir04-00.tbz) = 887240
diff --git a/comms/linrad/files/patch-Makefile.in b/comms/linrad/files/patch-Makefile.in
index b23d1eb94ad4..285598850b4f 100644
--- a/comms/linrad/files/patch-Makefile.in
+++ b/comms/linrad/files/patch-Makefile.in
@@ -1,44 +1,85 @@
---- 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 @@
+--- Makefile.in.orig 2014-03-20 18:05:17.000000000 -0700
++++ Makefile.in 2014-06-27 18:16:06.000000000 -0700
+@@ -23,7 +23,7 @@
#
# ----------- Compilers ----------------
- # Use gcc to compile files for Linux.
+ # 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)
-@@ -15,10 +15,8 @@
- # so we definitely know it is for Windows.
- # (*.o files can be present by mistake)
+ # Name the output files *.ol instead of *.o
+ # so we definitely know it is for Linux.
+ # (*.o files can be present by mistake)
+@@ -42,7 +42,7 @@
+ # (*.o files can be present by mistake)
# Always use the same flags.
--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 = -O -DOSNUM=1 @X11@ -I%%LOCALBASE%%/include -m32 -ffast-math \
-+ -fomit-frame-pointer -c -o
+ # -Wconversion -Wno-sign-conversion -Wunreachable-code
+-CFL = -g -O2 -DOSNUM=1 -DMEMREF_T=int @X11_32_INC@ -W -Wall \
++CFL = -O2 -DOSNUM=1 -DMEMREF_T=int @X11_32_INC@ \
+ @PORTAUDIO32_INC@ -DCPU=@CPU@ -DLIBBLADERF_PRESENT=@LIBBLADERF32_OK@ \
+ -DSHM_INSTALLED=@LIBXEXT32_OK@ -DPERSEUSLIB_PRESENT=@PERSEUS32_OK@ -Wimplicit \
+ -DALSA_PRESENT=@ALSA32_OK@ -DPA_OK=@PORTAUDIO32_OK@ -DREALT=@PA_REALT32@ \
+@@ -51,9 +51,7 @@
+ -DLIBUSB1_PRESENT=@LIBUSB1_32_OK@ -DLIBFTDI_PRESENT=@LIBFTDI32_OK@ @DARWIN@ \
+ -DLIBUDEV_PRESENT=@LIBUDEV_32_OK@ -DPCIE9842_PRESENT=@LIBWD_DASK_32_OK@ \
+ -DLIBMIRISDR_PRESENT=@LIBMIRISDR32_OK@ -DSERVER=@MAKE_SERVER@ \
+--Wreturn-type -Wformat @M32@ -Wunused -Wcomment -Wchar-subscripts -Wshadow \
+--Wuninitialized -Wparentheses -Wstrict-prototypes -Werror -ffast-math \
+--Wundef -fomit-frame-pointer -c -o
++@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 \
-@@ -646,7 +644,7 @@
- meter_graph.ol fonts.ol screensub.ol tx_graph.ol txssb.ol lxsys.ol
+ CFLN = -g -O2 -DOSNUM=1 -DMEMREF_T=int @X11_32_INC@ -W -Wall \
+ @PORTAUDIO32_INC@ -DCPU=@CPU@ -DLIBBLADERF_PRESENT=@LIBBLADERF32_OK@ \
+@@ -1217,7 +1215,7 @@
+ @LIBWD_DASK_32_LD@ \
+ @LIBBLADERF32_LD@ \
+ @LIBMIRISDR32_LD@ \
+--lpthread @LIBRT@ -lm -ldl
++-lpthread @LIBRT@ -lm
+ @echo " "
+ @echo "You may want to disable pulseaudio in Ubuntu with this command:"
+@@ -1324,7 +1322,7 @@
+ @LIBWD_DASK_32_LD@ \
+ @LIBBLADERF32_LD@ \
+ @LIBMIRISDR32_LD@ \
+--lpthread @LIBRT@ -lm -ldl
++-lpthread @LIBRT@ -lm
-- ${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 \
-@@ -703,8 +701,8 @@
+ @echo " "
+ @echo "You may want to disable pulseaudio in Ubuntu with this command:"
+@@ -1407,7 +1405,7 @@
+ @LIBWD_DASK_32_LD@ \
+ @LIBBLADERF32_LD@ \
+ @LIBMIRISDR32_LD@ \
+--lpthread @LIBRT@ -lm -ldl
++-lpthread @LIBRT@ -lm
+ @echo " "
+ @echo "You may want to disable pulseaudio in Ubuntu with this command:"
+@@ -1726,7 +1724,7 @@
+ @LIBWD_DASK_64_LD@ \
+ @LIBBLADERF64_LD@ \
+ @LIBMIRISDR64_LD@ \
+--lpthread @LIBRT@ -lm -ldl
++-lpthread @LIBRT@ -lm
+ @echo " "
+ @echo "You may want to disable pulseaudio in Ubuntu with this command:"
+@@ -1821,7 +1819,7 @@
+ @LIBWD_DASK_64_LD@ \
+ @LIBBLADERF64_LD@ \
+ @LIBMIRISDR64_LD@ \
+--lpthread @LIBRT@ -lm -ldl
++-lpthread @LIBRT@ -lm
-- ${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 \
+ @echo " "
+ @echo "You may want to disable pulseaudio in Ubuntu with this command:"
+@@ -1905,7 +1903,7 @@
+ @LIBWD_DASK_64_LD@ \
+ @LIBBLADERF64_LD@ \
+ @LIBMIRISDR64_LD@ \
+--lpthread @LIBRT@ -lm -ldl
++-lpthread @LIBRT@ -lm
+
+ @echo " "
+ @echo "You may want to disable pulseaudio in Ubuntu with this command:"
diff --git a/comms/linrad/files/patch-afedri.c b/comms/linrad/files/patch-afedri.c
new file mode 100644
index 000000000000..d9a4d43ebb8e
--- /dev/null
+++ b/comms/linrad/files/patch-afedri.c
@@ -0,0 +1,10 @@
+--- afedri.c.orig 2014-06-27 17:35:06.000000000 -0700
++++ afedri.c 2014-06-27 17:35:14.000000000 -0700
+@@ -22,7 +22,6 @@
+
+
+ #include <stdio.h>
+-#include <malloc.h>
+ #include <wchar.h>
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/comms/linrad/files/patch-buf.c b/comms/linrad/files/patch-buf.c
new file mode 100644
index 000000000000..b34ffe922870
--- /dev/null
+++ b/comms/linrad/files/patch-buf.c
@@ -0,0 +1,11 @@
+--- buf.c.orig 2014-06-27 18:11:24.000000000 -0700
++++ buf.c 2014-06-27 18:11:33.000000000 -0700
+@@ -1292,7 +1292,7 @@
+ memset(fft1_char,0,fft1_bytes);
+ memset(liminfo,0,2*fft1_size*sizeof(float));
+ memset(liminfo_wait,0,fft1_size*sizeof(unsigned char));
+-memset(fft1_slowsum,0.1,fft1_size*sizeof(float));
++memset(fft1_slowsum,0,fft1_size*sizeof(float));
+ if(fft1_correlation_flag)memset(fft1_slowcorr,0,2*fft1_size*sizeof(float));
+ memset(wg_waterf_sum,0,fft1_size*sizeof(float));
+ memset(timf1_char,0,timf1_bytes);
diff --git a/comms/linrad/files/patch-configure b/comms/linrad/files/patch-configure
new file mode 100644
index 000000000000..2a09cc92cc79
--- /dev/null
+++ b/comms/linrad/files/patch-configure
@@ -0,0 +1,34 @@
+--- configure.orig 2014-03-21 16:56:05.000000000 -0700
++++ configure 2014-06-27 20:23:16.000000000 -0700
+@@ -1883,11 +1883,6 @@
+ ELF32=""
+ ELF64=""
+ if test ${OS} != "Darwin"; then
+- ldconfig /lib32 /lib64 /usr/lib32 /usr/lib64 /usr/lib32/lib /usr/local/lib \
+- /usr/local32/lib /emul/ia32-linux/lib /emul/ia32-linux/usr/lib /usr/X11/lib \
+- /usr/PCBSD/local/lib /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu \
+- /usr/X11R6/lib /opt/local/lib /usr/lib/arm-linux-gnueabihf \
+- /usr/local/lib64
+ ELF64="-felf64"
+ LIBEXT="so"
+ S_OS_TYPE="OS_LINUX"
+@@ -1904,7 +1899,9 @@
+ fi
+
+ # Find out whether we have gcc
+-CC=gcc
++if test "${CC}" = ""; then
++ CC=gcc
++fi
+ # Extract the first word of "${CC} ", so it can be a program name with args.
+ set dummy ${CC} ; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+@@ -4318,7 +4315,7 @@
+ # Look for the libusb-1.0 package that we need for Perseus.
+ LIBUSB1_32_OK="0"
+ LIBUSB1_64_OK="0"
+-X=`./libfind1 libusb-1.0.${LIBEXT}`
++X=`./libfind1 libusb.${LIBEXT}`
+ LIBUSB1_32_INC=`./libfind2 1 "$X"`
+ LIBUSB1_64_INC=`./libfind2 2 "$X"`
+ Y=`./libfind2 0 "$X"`
diff --git a/comms/linrad/files/patch-help.c b/comms/linrad/files/patch-help.c
index ad1956fd4d1d..eeb3da5caf8d 100644
--- a/comms/linrad/files/patch-help.c
+++ b/comms/linrad/files/patch-help.c
@@ -1,20 +1,14 @@
---- 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);
- }
--msg_filename="errors.lir";
-+msg_filename="%%DATADIR%%/errors.lir";
- line=3;
- if(screen_mode)
+--- help.c.orig 2014-03-20 18:05:17.000000000 -0700
++++ help.c 2014-06-27 21:52:48.000000000 -0700
+@@ -584,7 +584,10 @@
+ char s[512];
+ char chr;
+ int i,j,k;
+-msg_file=fopen(msg_filename, "r");
++char *fn;
++asprintf(&fn, "%s/%s", "%%DATADIR%%", msg_filename);
++msg_file=fopen(fn, "r");
++free(fn);
+ if(msg_file == NULL)
{
-@@ -449,7 +449,7 @@
- {
- int line;
- if(msg_no < 0)return;
--msg_filename="help.lir";
-+msg_filename="%%DATADIR%%/help.lir";
- line=0;
- settextcolor(15);
- clear_screen();
+ sprintf(s,"Could not find %s",msg_filename);
diff --git a/comms/linrad/files/patch-libfind1.c b/comms/linrad/files/patch-libfind1.c
new file mode 100644
index 000000000000..83e28fd849d5
--- /dev/null
+++ b/comms/linrad/files/patch-libfind1.c
@@ -0,0 +1,13 @@
+--- libfind1.c.orig 2014-03-20 18:05:17.000000000 -0700
++++ libfind1.c 2014-06-27 21:45:49.000000000 -0700
+@@ -38,7 +38,9 @@
+ "/usr/lib64/lib",
+ "/usr/lib32",
+ "/usr/lib64",
+- "/usr/local/lib",
++ "%%LOCALBASE%%lib",
++ "%%LOCALBASE%%lib/portaudio2",
++ "%%LOCALBASE%%lib32",
+ "/usr/local/lib64",
+ "/usr/local32/lib",
+ "/usr/lib",
diff --git a/comms/linrad/files/patch-libfind2.c b/comms/linrad/files/patch-libfind2.c
new file mode 100644
index 000000000000..0ded3c9b6b98
--- /dev/null
+++ b/comms/linrad/files/patch-libfind2.c
@@ -0,0 +1,38 @@
+--- libfind2.c.orig 2014-06-27 19:49:15.000000000 -0700
++++ libfind2.c 2014-06-27 19:50:30.000000000 -0700
+@@ -83,7 +83,7 @@
+ argv[2][i-2] == '1' &&
+ argv[2][i-1] == '1')
+ {
+- sprintf(&argv[2][j],"include/X11");
++ sprintf(&argv[2][j],"include");
+ }
+ else
+ {
+@@ -140,7 +140,7 @@
+ argv[2][i-6] == '1' &&
+ argv[2][i-5] == '1')
+ {
+- sprintf(&argv[2][j],"include/X11");
++ sprintf(&argv[2][j],"include");
+ }
+ else
+ {
+@@ -211,7 +211,7 @@
+ argv[2][i-2] == '1' &&
+ argv[2][i-1] == '1')
+ {
+- sprintf(&argv[2][j],"include/X11");
++ sprintf(&argv[2][j],"include");
+ }
+ else
+ {
+@@ -257,7 +257,7 @@
+ argv[2][i-2] == '1' &&
+ argv[2][i-1] == '1')
+ {
+- sprintf(&argv[2][j],"include/X11");
++ sprintf(&argv[2][j],"include");
+ }
+ else
+ {
diff --git a/comms/linrad/files/patch-pcie9842.c b/comms/linrad/files/patch-pcie9842.c
new file mode 100644
index 000000000000..1e465813d194
--- /dev/null
+++ b/comms/linrad/files/patch-pcie9842.c
@@ -0,0 +1,10 @@
+--- pcie9842.c.orig 2014-06-27 17:35:42.000000000 -0700
++++ pcie9842.c 2014-06-27 17:35:49.000000000 -0700
+@@ -2,7 +2,6 @@
+ #if PCIE9842_PRESENT == 1
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <unistd.h>
+ #include <pthread.h>
+ #include <string.h>
diff --git a/comms/linrad/files/patch-si570.c b/comms/linrad/files/patch-si570.c
new file mode 100644
index 000000000000..d391e47b053a
--- /dev/null
+++ b/comms/linrad/files/patch-si570.c
@@ -0,0 +1,11 @@
+--- si570.c.orig 2014-06-27 18:12:23.000000000 -0700
++++ si570.c 2014-06-27 18:12:39.000000000 -0700
+@@ -376,7 +376,7 @@
+ #if LIBUSB_VERSION == 1
+
+
+-#include <libusb-1.0/libusb.h>
++#include <libusb.h>
+
+
+ libusb_device_handle *global_si570usb_handle = NULL;
diff --git a/comms/linrad/files/patch-usb2lpd.c b/comms/linrad/files/patch-usb2lpd.c
new file mode 100644
index 000000000000..3ed6fbae5fbf
--- /dev/null
+++ b/comms/linrad/files/patch-usb2lpd.c
@@ -0,0 +1,11 @@
+--- usb2lpt.c.orig 2014-06-27 18:13:15.000000000 -0700
++++ usb2lpt.c 2014-06-27 18:13:45.000000000 -0700
+@@ -47,7 +47,7 @@
+ #if LIBUSB_VERSION == 1
+
+
+-#include <libusb-1.0/libusb.h>
++#include <libusb.h>
+ #else
+ #include <usb.h>
+ #include "usbdefs.h"
diff --git a/comms/linrad/files/patch-users.c b/comms/linrad/files/patch-users.c
new file mode 100644
index 000000000000..f3aa47368d72
--- /dev/null
+++ b/comms/linrad/files/patch-users.c
@@ -0,0 +1,18 @@
+--- users.c.orig 2014-06-28 18:33:12.000000000 -0700
++++ users.c 2014-06-28 18:33:19.000000000 -0700
+@@ -130,6 +130,7 @@
+ // Leaving the port open the whole time could leave it in an
+ // undefined state if Linrad crashes.
+ //
++#if 0
+ int n;
+ int serport_baudrate;
+ int serport_stopbits;
+@@ -142,6 +143,7 @@
+ 0); // RTS mode = 0
+ n=lir_write_serport(serport_message,10);
+ lir_close_serport();
++#endif
+ }
+
+ void users_close_devices(void)