commit:     98bce0c3bdf492bc9fcb83cdee7e627f81bea663
Author:     George Gaydarov <git <AT> gg7 <DOT> io>
AuthorDate: Fri Nov 24 21:23:20 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Dec 21 03:00:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98bce0c3

app-emulation/qemu: Make CONFIG_CHECK CPU-model dependent

Closes: https://github.com/gentoo/gentoo/pull/6285
Signed-off-by: George Gaydarov <git <AT> gg7.io>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 app-emulation/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(-)

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 944fecea967..dcf84b71ab6 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 1f09b78248a..97e3556cc40 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"

Reply via email to