gnu: glib: Fix CVE-2021-28153.
[jackhill/guix/guix.git] / gnu / packages / patches / libtheora-config-guess.patch
1 Minimally patch libtheora's ancient config.guess to support mips64.
2
3 --- libtheora/config.guess.orig 2009-02-23 22:50:50.000000000 -0500
4 +++ libtheora/config.guess 2013-10-31 23:49:48.155999944 -0400
5 @@ -798,25 +798,24 @@
6 m68*:Linux:*:*)
7 echo ${UNAME_MACHINE}-unknown-linux-gnu
8 exit 0 ;;
9 - mips:Linux:*:*)
10 + mips:Linux:*:* | mips64:Linux:*:*)
11 eval $set_cc_for_build
12 sed 's/^ //' << EOF >$dummy.c
13 #undef CPU
14 - #undef mips
15 - #undef mipsel
16 + #undef ${UNAME_MACHINE}
17 + #undef ${UNAME_MACHINE}el
18 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
19 - CPU=mipsel
20 + CPU=${UNAME_MACHINE}el
21 #else
22 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
23 - CPU=mips
24 + CPU=${UNAME_MACHINE}
25 #else
26 CPU=
27 #endif
28 #endif
29 EOF
30 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
31 - rm -f $dummy.c && rmdir $tmpdir
32 - test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
33 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
34 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit 0; }
35 ;;
36 ppc:Linux:*:*)
37 echo powerpc-unknown-linux-gnu