commit:     962a094e5e7db16e2b9d26a8a69564329f7dee4b
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  8 16:22:52 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Oct  8 17:07:41 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=962a094e

media-libs/alsa-lib: add upstream fix for cross-compiling

The configure script would blindly ignore $CC when cross-compiling.
Add the upstream commit that deletes that insanity.

 media-libs/alsa-lib/alsa-lib-1.0.29.ebuild         |  1 +
 .../files/alsa-lib-1.0.29-cross-compile.patch      | 46 ++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/media-libs/alsa-lib/alsa-lib-1.0.29.ebuild 
b/media-libs/alsa-lib/alsa-lib-1.0.29.ebuild
index 288a03f..4e127b0 100644
--- a/media-libs/alsa-lib/alsa-lib-1.0.29.ebuild
+++ b/media-libs/alsa-lib/alsa-lib-1.0.29.ebuild
@@ -34,6 +34,7 @@ pkg_setup() {
 
 src_prepare() {
        find . -name Makefile.am -exec sed -i -e '/CFLAGS/s:-g -O2::' {} + || 
die
+       epatch "${FILESDIR}"/${P}-cross-compile.patch
        # https://bugs.gentoo.org/509886
        use elibc_uclibc && { sed -i -e 's:oldapi queue_timer:queue_timer:' 
test/Makefile.am || die; }
        epatch_user

diff --git a/media-libs/alsa-lib/files/alsa-lib-1.0.29-cross-compile.patch 
b/media-libs/alsa-lib/files/alsa-lib-1.0.29-cross-compile.patch
new file mode 100644
index 0000000..11fd99a
--- /dev/null
+++ b/media-libs/alsa-lib/files/alsa-lib-1.0.29-cross-compile.patch
@@ -0,0 +1,46 @@
+fix from upstream
+
+From c82417650a1ea4446c19dd82bfab9d8e6cd5a969 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 15 Sep 2015 18:48:02 +0300
+Subject: [PATCH] build: Do not try to detect cross-compiler
+
+cross compilers are passed via path may not be a gcc based cross
+compiler in such cases this check fails and try's to force gcc based
+cross compiler detection, This code is a convenience that limits the
+build system
+
+Signed-off-by: Khem Raj <[email protected]>
+Signed-off-by: Takashi Iwai <[email protected]>
+---
+ configure.ac | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a482b3e..a14e52d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,20 +27,6 @@ AC_PREFIX_DEFAULT(/usr)
+ 
+ dnl Checks for programs.
+ 
+-dnl try to gues cross-compiler if not set
+-if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
+-then
+-  AC_MSG_CHECKING(for cross-compiler)
+-
+-  which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
+-  which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
+-  && CC=${host_cpu}-${host_os}-gcc
+-  which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
+-  && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
+-
+-  AC_MSG_RESULT($CC)
+-fi
+-          
+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
+ 
+ 
+-- 
+2.5.2
+

Reply via email to