ports/comms/linrad/files/patch-configure
Diane Bruce 9a22bc1933 Fix linrad on latest gcc
I checked linrad upstream, and they still haven't fixed these two bugs.  I am surprised they haven't been reported yet.  Without these fixes, linrad cannot be built with gcc5.

the menu.c patch simply reverses the order of the condition.  One must check the bounds constraint first!  It's a pretty dumb mistake but I've seen this kind before.

The second one fails because -Werror is set.  This took me a while because I couldn't figure out the relationship between ADCHANS and rxchan.  In any case, setting 4 locations per channel did indeed allow the array to be big enough.  (at first I thought the loop was running too high, but I finally determined the array was too small).

These were found on DragonFly that uses gcc5.

This patch has not been tested on FreeBSD but I can't how it could possibly fail.

It would be good if the ham@ maintainer reports the issue upstream.

Updated patch files using make makepatch

PR:			ports/199737
Submitted by:		marino
2015-05-01 16:25:48 +00:00

43 lines
1.1 KiB
Text

--- configure.orig 2014-11-04 10:25:00 UTC
+++ configure
@@ -1832,11 +1832,6 @@ fi
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"
@@ -1853,7 +1848,9 @@ else
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
@@ -4025,6 +4022,9 @@ ALSA32_OK="0"
ALSA64_OK="0"
ALSA32_INSTALLED="0"
ALSA64_INSTALLED="0"
+ALSA32_LD=""
+ALSA64_LD=""
+<<DISABLE_ALSA
ALSA32_LD="libasound.${LIBEXT}"
X=`./libfind1 libasound.${LIBEXT}`
ALSA32_INC=`./libfind2 1 "$X"`
@@ -4090,6 +4090,7 @@ if test "$ALSA64_OK" = "1"; then
ALSA64_LD=""
fi
fi
+DISABLE_ALSA