diff options
author | Matoro Mahri <matoro@users.noreply.github.com> | 2023-03-08 12:25:11 -0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-03-22 05:29:39 +0000 |
commit | 082a815783a9b08df6ed4273310057df71b7bc52 (patch) | |
tree | 0aa183610a308babd47f5c135be64521a59e0d4d /media-libs | |
parent | flag-o-matic.eclass: rename _test-compile-PROG, expose externally (diff) | |
download | gentoo-082a815783a9b08df6ed4273310057df71b7bc52.tar.gz gentoo-082a815783a9b08df6ed4273310057df71b7bc52.tar.bz2 gentoo-082a815783a9b08df6ed4273310057df71b7bc52.zip |
media-libs/x264: add check for MSA instructions on mips
Implements the configure check from
https://github.com/mirror/x264/commit/ce0757d9d2778e349a7c2f6445b6aa75d8765c30,
which bails out if MSA instructions are not available per CFLAGS.
Bug: https://bugs.gentoo.org/897976
Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com>
Closes: https://github.com/gentoo/gentoo/pull/29996
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/x264/x264-0.0.20220222.ebuild | 12 | ||||
-rw-r--r-- | media-libs/x264/x264-9999.ebuild | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/media-libs/x264/x264-0.0.20220222.ebuild b/media-libs/x264/x264-0.0.20220222.ebuild index c8bcf46dda7b..954a0d3550ea 100644 --- a/media-libs/x264/x264-0.0.20220222.ebuild +++ b/media-libs/x264/x264-0.0.20220222.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit multilib-minimal toolchain-funcs +inherit multilib-minimal toolchain-funcs flag-o-matic DESCRIPTION="A free library for encoding X264/AVC streams" HOMEPAGE="https://www.videolan.org/developers/x264.html" @@ -41,7 +41,13 @@ multilib_src_configure() { local asm_conf="" - if [[ ${ABI} == x86* ]] && { use pic || use !cpu_flags_x86_sse ; } || [[ ${ABI} == "x32" ]] || [[ ${CHOST} == armv5* ]] || [[ ${ABI} == ppc* ]] && { use !cpu_flags_ppc_altivec ; }; then + if \ + [[ ${ABI} == x86* ]] && { use pic || use !cpu_flags_x86_sse ; } \ + || [[ ${ABI} == "x32" ]] \ + || [[ ${CHOST} == armv5* ]] \ + || [[ ${ABI} == ppc* ]] && { use !cpu_flags_ppc_altivec ; } \ + || use mips && { ! test-compile 'c' 'int main(void){__asm__("addvi.b $w0, $w1, 1");return 0;}' ; } + then asm_conf=" --disable-asm" fi diff --git a/media-libs/x264/x264-9999.ebuild b/media-libs/x264/x264-9999.ebuild index aac24f183989..cef3a4d4053a 100644 --- a/media-libs/x264/x264-9999.ebuild +++ b/media-libs/x264/x264-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit multilib-minimal toolchain-funcs +inherit multilib-minimal toolchain-funcs flag-o-matic DESCRIPTION="A free library for encoding X264/AVC streams" HOMEPAGE="https://www.videolan.org/developers/x264.html" @@ -41,7 +41,13 @@ multilib_src_configure() { local asm_conf="" - if [[ ${ABI} == x86* ]] && { use pic || use !cpu_flags_x86_sse ; } || [[ ${ABI} == "x32" ]] || [[ ${CHOST} == armv5* ]] || [[ ${ABI} == ppc* ]] && { use !cpu_flags_ppc_altivec ; }; then + if \ + [[ ${ABI} == x86* ]] && { use pic || use !cpu_flags_x86_sse ; } \ + || [[ ${ABI} == "x32" ]] \ + || [[ ${CHOST} == armv5* ]] \ + || [[ ${ABI} == ppc* ]] && { use !cpu_flags_ppc_altivec ; } \ + || use mips && { ! test-compile 'c' 'int main(void){__asm__("addvi.b $w0, $w1, 1");return 0;}' ; } + then asm_conf=" --disable-asm" fi |