summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-09-25 03:11:57 +0000
committerMike Frysinger <vapier@gentoo.org>2012-09-25 03:11:57 +0000
commit8fe551de123eaa50dd5af0aee608794945881e2f (patch)
treee3c72b8b9d8217486a68529becfba1bc912fd4be /media-libs/x264
parentStable ppc ppc64, bug #433351 (diff)
downloadgentoo-2-8fe551de123eaa50dd5af0aee608794945881e2f.tar.gz
gentoo-2-8fe551de123eaa50dd5af0aee608794945881e2f.tar.bz2
gentoo-2-8fe551de123eaa50dd5af0aee608794945881e2f.zip
Disable asm code for x32 so it at least runs #420241 by Xavier Miller.
(Portage version: 2.2.0_alpha131/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/x264')
-rw-r--r--media-libs/x264/ChangeLog7
-rw-r--r--media-libs/x264/files/x264-x32.patch34
-rw-r--r--media-libs/x264/x264-0.0.20120707.ebuild5
3 files changed, 42 insertions, 4 deletions
diff --git a/media-libs/x264/ChangeLog b/media-libs/x264/ChangeLog
index 7d7a16075298..830576199f01 100644
--- a/media-libs/x264/ChangeLog
+++ b/media-libs/x264/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-libs/x264
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.75 2012/09/01 10:21:10 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.76 2012/09/25 03:11:57 vapier Exp $
+
+ 25 Sep 2012; Mike Frysinger <vapier@gentoo.org> +files/x264-x32.patch,
+ x264-0.0.20120707.ebuild:
+ Disable asm code for x32 so it at least runs #420241 by Xavier Miller.
01 Sep 2012; Luca Barbato <lu_zero@gentoo.org> x264-0.0.20120707.ebuild:
Update to support prefix, fix bug #351219, thanks to the people involved
@@ -336,4 +340,3 @@
+x264-0.0.20080406.ebuild:
Initial commit, pkgmove from x264-svn. Version bump 0.0.20080406 using
upstream's nightly git snapshot tarball.
-
diff --git a/media-libs/x264/files/x264-x32.patch b/media-libs/x264/files/x264-x32.patch
new file mode 100644
index 000000000000..7af4405a8472
--- /dev/null
+++ b/media-libs/x264/files/x264-x32.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/420241
+
+initial x32 support -- no asm code, just pure C
+
+--- a/configure
++++ b/configure
+@@ -567,7 +567,13 @@ case $host_cpu in
+ x86_64)
+ ARCH="X86_64"
+ AS="yasm"
+- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ if [ $compiler = GNU ]; then
++ if cpp_check "" "" "__ILP32__" ; then
++ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
++ else
++ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ fi
++ fi
+ if [ "$SYS" = MACOSX ]; then
+ ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
+ if cc_check '' "-arch x86_64"; then
+@@ -580,7 +586,11 @@ case $host_cpu in
+ [ $compiler = GNU ] && cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX"
+ [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ else
+- ASFLAGS="$ASFLAGS -f elf -m amd64"
++ if cpp_check "" "" "__ILP32__" ; then
++ AS="${cross_prefix}as"
++ else
++ ASFLAGS="$ASFLAGS -f elf -m amd64"
++ fi
+ fi
+ ;;
+ powerpc|powerpc64)
diff --git a/media-libs/x264/x264-0.0.20120707.ebuild b/media-libs/x264/x264-0.0.20120707.ebuild
index 56a74c81e385..7b54b01778c0 100644
--- a/media-libs/x264/x264-0.0.20120707.ebuild
+++ b/media-libs/x264/x264-0.0.20120707.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20120707.ebuild,v 1.2 2012/09/01 10:21:10 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20120707.ebuild,v 1.3 2012/09/25 03:11:57 vapier Exp $
EAPI=4
@@ -57,6 +57,7 @@ src_prepare() {
fi
# for OSX
sed -i -e "s|-arch x86_64||g" configure || die
+ epatch "${FILESDIR}"/x264-x32.patch #420241
}
src_configure() {
@@ -72,7 +73,7 @@ src_configure() {
# let upstream pick the optimization level by default
use custom-cflags || filter-flags -O?
- if use x86 && use pic; then
+ if use x86 && use pic || [[ ${ABI} == "x32" ]] ; then
myconf+=" --disable-asm"
fi