media-libs/libvpx: add ppc64le patch for 1.8.0
authorGeorgy Yakovlev <gyakovlev@gentoo.org>
Wed, 7 Aug 2019 18:44:36 +0000 (11:44 -0700)
committerGeorgy Yakovlev <gyakovlev@gentoo.org>
Wed, 7 Aug 2019 18:49:03 +0000 (11:49 -0700)
Closes: https://bugs.gentoo.org/688138
Acked-by: Mike Gilbert <floppym@gentoo.org>
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
media-libs/libvpx/files/libvpx-1.8.0-ppc64le-disable-vsx.patch [new file with mode: 0644]
media-libs/libvpx/libvpx-1.8.0-r1.ebuild
media-libs/libvpx/libvpx-1.8.0.ebuild

diff --git a/media-libs/libvpx/files/libvpx-1.8.0-ppc64le-disable-vsx.patch b/media-libs/libvpx/files/libvpx-1.8.0-ppc64le-disable-vsx.patch
new file mode 100644 (file)
index 0000000..5c6a36c
--- /dev/null
@@ -0,0 +1,28 @@
+From 7bf48f92e884fc01c28a4652ea0883b28744519d Mon Sep 17 00:00:00 2001
+From: Johann <johannkoenig@google.com>
+Date: Mon, 10 Jun 2019 14:35:03 -0700
+Subject: [PATCH] ppc: disable vsx optimizations with hbd
+
+vsx optimizations do not support 32 bit tran_low_t values.
+
+BUG=webm:1563
+
+Change-Id: I9e6348078f6e4855acfd381133eb840a435b7f81
+---
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index e950353..4a874f1 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -1239,7 +1239,10 @@
+     ppc64le*)
+       link_with_cc=gcc
+       setup_gnu_toolchain
+-      check_gcc_machine_option "vsx"
++      # Only enable vsx optimizations when vp9_highbitdepth is not enabled.
++      # https://bugs.chromium.org/p/webm/issues/detail?id=1538
++      enabled vp9_highbitdepth || check_gcc_machine_option "vsx"
++      enabled vsx || RTCD_OPTIONS="${RTCD_OPTIONS}--disable-vsx "
+       if [ -n "${tune_cpu}" ]; then
+         case ${tune_cpu} in
+           power?)
index b75c00c5ca4fd3a7fa0c20212c1e34dd978b90db..c45449b70d2d40a97591758554cce125163b10a2 100644 (file)
@@ -42,6 +42,7 @@ DEPEND="abi_x86_32? ( dev-lang/yasm )
 
 PATCHES=(
        "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+       "${FILESDIR}/libvpx-1.8.0-ppc64le-disable-vsx.patch" #688138
 )
 
 src_configure() {
index 73214ce5133d74602f718cf0763978c02b1d39fa..cc1164e1ea8ec3a121e35b5d60b54217fca3f460 100644 (file)
@@ -46,6 +46,7 @@ DEPEND="abi_x86_32? ( dev-lang/yasm )
 
 PATCHES=(
        "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+       "${FILESDIR}/libvpx-1.8.0-ppc64le-disable-vsx.patch" #688138
 )
 
 src_configure() {