summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-05-15 12:21:22 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-05-15 12:21:22 +0000
commita3c8948050ca18c65bce63565a59d6c0bd55f050 (patch)
tree85b4ac951f15a72c6e2496178f19f59e1774695e /media-libs/libvpx
parentremove old (diff)
downloadgentoo-2-a3c8948050ca18c65bce63565a59d6c0bd55f050.tar.gz
gentoo-2-a3c8948050ca18c65bce63565a59d6c0bd55f050.tar.bz2
gentoo-2-a3c8948050ca18c65bce63565a59d6c0bd55f050.zip
backport patch merged upstream to fix build on multilib portage and cross-compilation
(Portage version: 2.2.0_alpha105/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/libvpx')
-rw-r--r--media-libs/libvpx/ChangeLog7
-rw-r--r--media-libs/libvpx/files/libvpx-1.1.0-chost.patch36
-rw-r--r--media-libs/libvpx/libvpx-1.1.0.ebuild6
3 files changed, 46 insertions, 3 deletions
diff --git a/media-libs/libvpx/ChangeLog b/media-libs/libvpx/ChangeLog
index dbd04ada77f6..9100dca1a9fe 100644
--- a/media-libs/libvpx/ChangeLog
+++ b/media-libs/libvpx/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/libvpx
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libvpx/ChangeLog,v 1.58 2012/05/12 18:06:50 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libvpx/ChangeLog,v 1.59 2012/05/15 12:21:22 aballier Exp $
+
+ 15 May 2012; Alexis Ballier <aballier@gentoo.org> libvpx-1.1.0.ebuild,
+ +files/libvpx-1.1.0-chost.patch:
+ backport patch merged upstream to fix build on multilib portage and
+ cross-compilation
12 May 2012; Alexis Ballier <aballier@gentoo.org> libvpx-1.1.0.ebuild,
libvpx-9999.ebuild:
diff --git a/media-libs/libvpx/files/libvpx-1.1.0-chost.patch b/media-libs/libvpx/files/libvpx-1.1.0-chost.patch
new file mode 100644
index 000000000000..eb6b286cd66b
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.1.0-chost.patch
@@ -0,0 +1,36 @@
+commit 871bd23e4c41bb0fb94b72832b270766de540dea
+Author: Alexis Ballier <alexis.ballier@gmail.com>
+Date: Sat May 12 15:45:13 2012 -0400
+
+ Allow target autodetection to work when cross-compiling.
+
+ Allow CHOST to override the gcc -dumpmachine output. This allows to
+ use the target autodetection code when cross compiling by setting the
+ CHOST variable.
+
+ On Gentoo, we would like to support easy cross-compilation, and for
+ libvpx this would basically mean copying the code in
+ build/make/configure.sh to setup the right --target option. It seems a
+ lot easier to let it guess by itself.
+
+ Another option I considered was using CROSS-gcc instead but this would
+ not work for our multilib setups: They use gcc -m32 to build 32bits
+ binaries and gcc -m32 -dumpmachine will output the 64bits version,
+ which would then make libvpx wrongly believe it is building for a
+ 64bits architecture.
+
+ Change-Id: I05a19be402228f749e23be7473ca53ae74fd2186
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 3c772e5..3118c0a 100755
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -549,7 +549,7 @@ setup_gnu_toolchain() {
+
+ process_common_toolchain() {
+ if [ -z "$toolchain" ]; then
+- gcctarget="$(gcc -dumpmachine 2> /dev/null)"
++ gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}"
+
+ # detect tgt_isa
+ case "$gcctarget" in
diff --git a/media-libs/libvpx/libvpx-1.1.0.ebuild b/media-libs/libvpx/libvpx-1.1.0.ebuild
index bbaf07dfb024..9b3f288a6585 100644
--- a/media-libs/libvpx/libvpx-1.1.0.ebuild
+++ b/media-libs/libvpx/libvpx-1.1.0.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libvpx/libvpx-1.1.0.ebuild,v 1.8 2012/05/12 18:06:50 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libvpx/libvpx-1.1.0.ebuild,v 1.9 2012/05/15 12:21:22 aballier Exp $
EAPI=4
-inherit multilib toolchain-funcs
+inherit multilib toolchain-funcs base
if [[ ${PV} == *9999* ]]; then
inherit git-2
@@ -39,6 +39,8 @@ REQUIRED_USE="
sse2? ( mmx )
"
+PATCHES=( "${FILESDIR}/${P}-chost.patch" )
+
src_configure() {
#let the build system decide which AS to use (it honours $AS but
#then feeds it with yasm flags without checking...) bug 345161