From 98bce0c3bdf492bc9fcb83cdee7e627f81bea663 Mon Sep 17 00:00:00 2001 From: George Gaydarov Date: Fri, 24 Nov 2017 21:23:20 +0000 Subject: [PATCH] app-emulation/qemu: Make CONFIG_CHECK CPU-model dependent Closes: https://github.com/gentoo/gentoo/pull/6285 Signed-off-by: George Gaydarov Signed-off-by: Matthias Maier --- .../qemu/{qemu-2.10.1.ebuild => qemu-2.10.1-r1.ebuild} | 6 +++++- app-emulation/qemu/qemu-9999.ebuild | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) rename app-emulation/qemu/{qemu-2.10.1.ebuild => qemu-2.10.1-r1.ebuild} (99%) diff --git a/app-emulation/qemu/qemu-2.10.1.ebuild b/app-emulation/qemu/qemu-2.10.1-r1.ebuild similarity index 99% rename from app-emulation/qemu/qemu-2.10.1.ebuild rename to app-emulation/qemu/qemu-2.10.1-r1.ebuild index 944fecea9676..dcf84b71ab60 100644 --- a/app-emulation/qemu/qemu-2.10.1.ebuild +++ b/app-emulation/qemu/qemu-2.10.1-r1.ebuild @@ -286,7 +286,11 @@ pkg_pretend() { ERROR_VHOST_NET+=" support" if use amd64 || use x86 || use amd64-linux || use x86-linux; then - CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL" + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi fi use python && CONFIG_CHECK+=" ~DEBUG_FS" diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild index 1f09b78248a4..97e3556cc400 100644 --- a/app-emulation/qemu/qemu-9999.ebuild +++ b/app-emulation/qemu/qemu-9999.ebuild @@ -283,7 +283,11 @@ pkg_pretend() { ERROR_VHOST_NET+=" support" if use amd64 || use x86 || use amd64-linux || use x86-linux; then - CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL" + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi fi use python && CONFIG_CHECK+=" ~DEBUG_FS" -- 2.26.2