From ca212b2090243b3446ddd9992bec1c9d9a940d6d Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Thu, 11 Nov 2021 13:50:13 +0100
Subject: [PATCH] eclass/fcaps: Support EAPI 5

---
 eclass/fcaps.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass
index a5f88e9284..444a530bb1 100644
--- a/eclass/fcaps.eclass
+++ b/eclass/fcaps.eclass
@@ -1,10 +1,12 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Flatcar: Support also EAPI 5.
+
 # @ECLASS: fcaps.eclass
 # @MAINTAINER:
 # base-system@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 5 6 7 8
 # @BLURB: function to set POSIX file-based capabilities
 # @DESCRIPTION:
 # This eclass provides a function to set file-based capabilities on binaries.
@@ -30,7 +32,7 @@
 # @CODE
 
 case ${EAPI} in
-	6|7|8) ;;
+	5|6|7|8) ;;
 	*) die "EAPI ${EAPI:-0} is unsupported" ;;
 esac
 
@@ -42,7 +44,7 @@ IUSE="+filecaps"
 # Since it is needed in pkg_postinst() it must be in IDEPEND
 case ${EAPI} in
 	7) BDEPEND="filecaps? ( sys-libs/libcap )" ;& # fallthrough
-	6) RDEPEND="filecaps? ( sys-libs/libcap )" ;;
+	5|6) RDEPEND="filecaps? ( sys-libs/libcap )" ;;
 	*) IDEPEND="filecaps? ( sys-libs/libcap )" ;;
 esac