diff options
-rw-r--r-- | media-libs/x264/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/x264/files/x264-cflags.patch | 62 | ||||
-rw-r--r-- | media-libs/x264/x264-9999.ebuild | 10 |
3 files changed, 74 insertions, 4 deletions
diff --git a/media-libs/x264/ChangeLog b/media-libs/x264/ChangeLog index e13547d5e9be..79784a85281c 100644 --- a/media-libs/x264/ChangeLog +++ b/media-libs/x264/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/x264 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.93 2013/08/01 16:39:38 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.94 2013/08/01 16:59:00 aballier Exp $ + + 01 Aug 2013; Alexis Ballier <aballier@gentoo.org> x264-9999.ebuild, + +files/x264-cflags.patch: + Do not mess too much with CFLAGS. Should fix bug #413661 and bug #351219. 01 Aug 2013; Alexis Ballier <aballier@gentoo.org> x264-9999.ebuild: drop custom-cflags useflag, bug #473816 diff --git a/media-libs/x264/files/x264-cflags.patch b/media-libs/x264/files/x264-cflags.patch new file mode 100644 index 000000000000..3014b47eca8e --- /dev/null +++ b/media-libs/x264/files/x264-cflags.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/420241 for x32 stuff +initial x32 support -- no asm code, just pure C + +avoid messing too much with CFLAGS. +https://bugs.gentoo.org/show_bug.cgi?id=351219 +https://bugs.gentoo.org/show_bug.cgi?id=413661 + + +Index: x264-9999/configure +=================================================================== +--- x264-9999.orig/configure ++++ x264-9999/configure +@@ -553,11 +553,6 @@ case $host_cpu in + if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then + CFLAGS="$CFLAGS -march=i686" + fi +- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then +- CFLAGS="$CFLAGS -mfpmath=sse -msse" +- fi +- CFLAGS="-m32 $CFLAGS" +- LDFLAGS="-m32 $LDFLAGS" + else + # icc on linux has various degrees of mod16 stack support + if [ $SYS = LINUX ]; then +@@ -588,13 +583,8 @@ case $host_cpu in + x86_64) + ARCH="X86_64" + AS="yasm" +- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" + if [ "$SYS" = MACOSX ]; then + ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX" +- if cc_check '' "-arch x86_64"; then +- CFLAGS="$CFLAGS -arch x86_64" +- LDFLAGS="$LDFLAGS -arch x86_64" +- fi + elif [ "$SYS" = WINDOWS ]; then + ASFLAGS="$ASFLAGS -f win32 -m amd64" + # only the GNU toolchain is inconsistent in prefixing function names with _ +@@ -602,7 +592,11 @@ case $host_cpu in + [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase" + [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS" + else +- ASFLAGS="$ASFLAGS -f elf -m amd64" ++ if cpp_check "" "" "__ILP32__" ; then ++ ASFLAGS="$ASFLAGS -f elf -m x32" ++ else ++ ASFLAGS="$ASFLAGS -f elf -m amd64" ++ fi + fi + ;; + powerpc|powerpc64) +@@ -964,10 +958,6 @@ if [ "$pic" = "yes" ] ; then + [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text" + fi + +-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -fomit-frame-pointer" +-fi +- + if [ "$strip" = "yes" ]; then + CFLAGS="$CFLAGS -s" + LDFLAGS="$LDFLAGS -s" diff --git a/media-libs/x264/x264-9999.ebuild b/media-libs/x264/x264-9999.ebuild index 5ee9e172abc5..9cd08f523ccc 100644 --- a/media-libs/x264/x264-9999.ebuild +++ b/media-libs/x264/x264-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-9999.ebuild,v 1.12 2013/08/01 16:39:38 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-9999.ebuild,v 1.13 2013/08/01 16:59:00 aballier Exp $ EAPI=5 @@ -23,7 +23,7 @@ SONAME="135" SLOT="0/${SONAME}" LICENSE="GPL-2" -IUSE="10bit +interlaced pic static-libs +threads" +IUSE="10bit +interlaced pic static-libs sse +threads" ASM_DEP=">=dev-lang/yasm-1.2.0" DEPEND="amd64? ( ${ASM_DEP} ) @@ -35,7 +35,8 @@ DOCS="AUTHORS doc/*.txt" src_prepare() { # Initial support for x32 ABI, bug #420241 - epatch "${FILESDIR}"/x264-x32.patch + # Avoid messing too much with CFLAGS. + epatch "${FILESDIR}"/x264-cflags.patch } src_configure() { @@ -46,6 +47,9 @@ src_configure() { asm_conf=" --disable-asm" fi + # Upstream uses this, see the cflags patch + use sse && append-flags "-msse" "-mfpmath=sse" + ./configure \ --prefix="${EPREFIX}"/usr \ --libdir="${EPREFIX}"/usr/$(get_libdir) \ |