Gentoo Archives: gentoo-dev

From: Florian Schmaus <flow@g.o>
To: gentoo-dev@l.g.o
Cc: Florian Schmaus <flow@g.o>
Subject: [gentoo-dev] [PATCH] xdg.eclass: add EAPI 8 support
Date: Thu, 15 Jul 2021 11:20:11
Message-Id: 20210715111956.297120-1-flow@gentoo.org
1 Signed-off-by: Florian Schmaus <flow@g.o>
2 ---
3 eclass/xdg.eclass | 17 +++++++++++++----
4 1 file changed, 13 insertions(+), 4 deletions(-)
5
6 diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
7 index 219be712e84d..a1545e113ff8 100644
8 --- a/eclass/xdg.eclass
9 +++ b/eclass/xdg.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2019 Gentoo Authors
12 +# Copyright 1999-2021 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: xdg.eclass
16 @@ -6,7 +6,7 @@
17 # freedesktop-bugs@g.o
18 # @AUTHOR:
19 # Original author: Gilles Dartiguelongue <eva@g.o>
20 -# @SUPPORTED_EAPIS: 4 5 6 7
21 +# @SUPPORTED_EAPIS: 4 5 6 7 8
22 # @BLURB: Provides phases for XDG compliant packages.
23 # @DESCRIPTION:
24 # Utility eclass to update the desktop, icon and shared mime info as laid
25 @@ -15,7 +15,7 @@
26 inherit xdg-utils
27
28 case "${EAPI:-0}" in
29 - 4|5|6|7)
30 + 4|5|6|7|8)
31 EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm
32 ;;
33 *) die "EAPI=${EAPI} is not supported" ;;
34 @@ -23,10 +23,19 @@ esac
35
36 # Avoid dependency loop as both depend on glib-2
37 if [[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] ; then
38 -DEPEND="
39 +_XDG_DEPEND="
40 dev-util/desktop-file-utils
41 x11-misc/shared-mime-info
42 "
43 +
44 +case "${EAPI:-0}" in
45 + 4|5|6|7)
46 + DEPEND="${_XDG_DEPEND}"
47 + ;;
48 + *)
49 + IDEPEND="${_XDG_DEPEND}"
50 + ;;
51 +esac
52 fi
53
54 # @FUNCTION: xdg_src_prepare
55 --
56 2.31.1

Replies