summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-10-31 23:59:00 -0400
committerMark H Weaver <mhw@netris.org>2013-11-03 23:26:27 -0500
commit46acd054010134eba293c3b978e82edb9ebc21fb (patch)
tree42999dfdbbdf8b1c998804eb888d9e8bb7c17dc9
parentbcd94e192a8459107ba43f03694fc82a35af6447 (diff)
gnu: libtheora: patch ancient config.guess to support mips64.
* gnu/packages/patches/libtheora-config-guess.patch: New file. * gnu/packages/oggvorbis.scm (libtheora): Add patch. * gnu-system.am (dist_patch_DATA): Add patch.
-rw-r--r--gnu-system.am1
-rw-r--r--gnu/packages/oggvorbis.scm3
-rw-r--r--gnu/packages/patches/libtheora-config-guess.patch37
3 files changed, 40 insertions, 1 deletions
diff --git a/gnu-system.am b/gnu-system.am
index 6f2b4d12ce..2d9ac98ece 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -240,6 +240,7 @@ dist_patch_DATA = \
gnu/packages/patches/hop-bigloo-4.0b.patch \
gnu/packages/patches/libevent-dns-tests.patch \
gnu/packages/patches/libffi-mips-n32-fix.patch \
+ gnu/packages/patches/libtheora-config-guess.patch \
gnu/packages/patches/libtool-skip-tests.patch \
gnu/packages/patches/libtool-skip-tests-for-mips.patch \
gnu/packages/patches/m4-gets-undeclared.patch \
diff --git a/gnu/packages/oggvorbis.scm b/gnu/packages/oggvorbis.scm
index 1b1630e1fb..e2084b06b3 100644
--- a/gnu/packages/oggvorbis.scm
+++ b/gnu/packages/oggvorbis.scm
@@ -100,7 +100,8 @@ polyphonic) audio and music at fixed and variable bitrates from 16 to
version ".tar.xz"))
(sha256
(base32
- "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk"))))
+ "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk"))
+ (patches (list (search-patch "libtheora-config-guess.patch")))))
(build-system gnu-build-system)
(inputs `(("libvorbis" ,libvorbis)))
;; The .pc files refer to libogg.
diff --git a/gnu/packages/patches/libtheora-config-guess.patch b/gnu/packages/patches/libtheora-config-guess.patch
new file mode 100644
index 0000000000..9529ea7101
--- /dev/null
+++ b/gnu/packages/patches/libtheora-config-guess.patch
@@ -0,0 +1,37 @@
+Minimally patch libtheora's ancient config.guess to support mips64.
+
+--- libtheora/config.guess.orig 2009-02-23 22:50:50.000000000 -0500
++++ libtheora/config.guess 2013-10-31 23:49:48.155999944 -0400
+@@ -798,25 +798,24 @@
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+- mips:Linux:*:*)
++ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+- #undef mips
+- #undef mipsel
++ #undef ${UNAME_MACHINE}
++ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+- CPU=mipsel
++ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+- CPU=mips
++ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+- rm -f $dummy.c && rmdir $tmpdir
+- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit 0; }
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu