commit:     6433ca52701e39e6576702ad37321689ca31eb19
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 15:41:00 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 15:41:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6433ca52

media-libs/libjpeg-turbo-2.0.6: fix compilation on Prefix

when the host provides nasm, but we installed yasm, the latter won't be
used, so force the usage of yasm when that package is the only installed
asm implementation

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 media-libs/libjpeg-turbo/libjpeg-turbo-2.0.6.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.6.ebuild 
b/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.6.ebuild
index 47751e0823a..ef462071586 100644
--- a/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.6.ebuild
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.6.ebuild
@@ -85,6 +85,11 @@ multilib_src_configure() {
 
        [[ ${ABI} == "x32" ]] && mycmakeargs+=( -DREQUIRE_SIMD=OFF ) #420239
 
+       # mostly for Prefix, ensure that we use our yasm if installed and
+       # not pick up host-provided nasm
+       has_version dev-lang/yasm && ! has_version dev-lang/nasm && \
+               mycmakeargs+=( -DCMAKE_ASM_NASM_COMPILER=$(type -P yasm) )
+
        if use ppc ; then
                # Workaround recommended by upstream:
                # https://bugs.gentoo.org/715406#c9

Reply via email to