commit:     de371306554b093d175fa9e12163b2e377d17762
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 16:36:22 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 16:38:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de371306

media-libs/mesa: Check for CONFIG_KCMP on appropriate kernel versions

Closes: https://bugs.gentoo.org/775095
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/mesa/mesa-20.3.4.ebuild     | 10 +++++++++-
 media-libs/mesa/mesa-21.0.0_rc5.ebuild | 12 ++++++++++--
 media-libs/mesa/mesa-9999.ebuild       | 12 ++++++++++--
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/media-libs/mesa/mesa-20.3.4.ebuild 
b/media-libs/mesa/mesa-20.3.4.ebuild
index 25e12ae1cd2..3bcef8c1917 100644
--- a/media-libs/mesa/mesa-20.3.4.ebuild
+++ b/media-libs/mesa/mesa-20.3.4.ebuild
@@ -333,7 +333,15 @@ pkg_setup() {
        if use video_cards_i965 ||
           use video_cards_iris ||
           use video_cards_radeonsi; then
-               CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               if kernel_is -ge 5 11 3; then
+                       CONFIG_CHECK="~KCMP"
+               elif kernel_is -ge 5 11; then
+                       CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               elif kernel_is -ge 5 10 20; then
+                       CONFIG_CHECK="~KCMP"
+               else
+                       CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               fi
                linux-info_pkg_setup
        fi
 

diff --git a/media-libs/mesa/mesa-21.0.0_rc5.ebuild 
b/media-libs/mesa/mesa-21.0.0_rc5.ebuild
index 8aeb115afdd..9eb4c982078 100644
--- a/media-libs/mesa/mesa-21.0.0_rc5.ebuild
+++ b/media-libs/mesa/mesa-21.0.0_rc5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -337,7 +337,15 @@ pkg_setup() {
        if use video_cards_i965 ||
           use video_cards_iris ||
           use video_cards_radeonsi; then
-               CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               if kernel_is -ge 5 11 3; then
+                       CONFIG_CHECK="~KCMP"
+               elif kernel_is -ge 5 11; then
+                       CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               elif kernel_is -ge 5 10 20; then
+                       CONFIG_CHECK="~KCMP"
+               else
+                       CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               fi
                linux-info_pkg_setup
        fi
 

diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index c004f76fad6..9aa7c68c80f 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -337,7 +337,15 @@ pkg_setup() {
        if use video_cards_i965 ||
           use video_cards_iris ||
           use video_cards_radeonsi; then
-               CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               if kernel_is -ge 5 11 3; then
+                       CONFIG_CHECK="~KCMP"
+               elif kernel_is -ge 5 11; then
+                       CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               elif kernel_is -ge 5 10 20; then
+                       CONFIG_CHECK="~KCMP"
+               else
+                       CONFIG_CHECK="~CHECKPOINT_RESTORE"
+               fi
                linux-info_pkg_setup
        fi
 

Reply via email to