commit:     d06fd5424d9027cae92f58505404114bb2fc9216
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 20:49:58 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon May 30 20:52:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d06fd542

sys-boot/gnu-efi: add REQUIRED_USE for ABI_X86 flags

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild 
b/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild
index 76d4ef4d4221..ca53e5d6897f 100644
--- a/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild
@@ -18,6 +18,10 @@ LICENSE="GPL-2+ BSD BSD-2"
 SLOT="0"
 KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~riscv ~x86"
 IUSE="abi_x86_32 abi_x86_64 custom-cflags"
+REQUIRED_USE="
+       amd64? ( || ( abi_x86_32 abi_x86_64 ) )
+       x86? ( || ( abi_x86_32 abi_x86_64 ) )
+"
 
 # These objects get run early boot (i.e. not inside of Linux),
 # so doing these QA checks on them doesn't make sense.
@@ -63,18 +67,18 @@ src_compile() {
                unset CFLAGS CPPFLAGS LDFLAGS
        fi
 
-       if [[ ${CHOST} == x86_64* ]]; then
+       if use amd64 || use x86; then
                use abi_x86_32 && CHOST=i686 ABI=x86 efimake
-               use abi_x86_64 && efimake
+               use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake
        else
                efimake
        fi
 }
 
 src_install() {
-       if [[ ${CHOST} == x86_64* ]]; then
+       if use amd64 || use x86; then
                use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" 
install
-               use abi_x86_64 && efimake INSTALLROOT="${D}" install
+               use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake 
INSTALLROOT="${D}" install
        else
                efimake INSTALLROOT="${D}" install
        fi

Reply via email to