Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 1/2] vala.eclass: drop EAPI 6 support
Date: Sun, 01 Jan 2023 16:51:51
Message-Id: 20230101165133.1684618-1-soap@gentoo.org
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/vala.eclass | 18 +++++++-----------
4 1 file changed, 7 insertions(+), 11 deletions(-)
5
6 diff --git a/eclass/vala.eclass b/eclass/vala.eclass
7 index acdf958191e..22407197042 100644
8 --- a/eclass/vala.eclass
9 +++ b/eclass/vala.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2022 Gentoo Authors
12 +# Copyright 1999-2023 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: vala.eclass
16 @@ -6,7 +6,7 @@
17 # gnome@g.o
18 # @AUTHOR:
19 # Alexandre Rostovtsev <tetromino@g.o>
20 -# @SUPPORTED_EAPIS: 6 7 8
21 +# @SUPPORTED_EAPIS: 7 8
22 # @BLURB: Sets up the environment for using a specific version of vala.
23 # @DESCRIPTION:
24 # This eclass sets up commonly used environment variables for using a specific
25 @@ -15,7 +15,7 @@
26 # executables, pkgconfig files, etc., which Gentoo does not provide.
27
28 case ${EAPI} in
29 - 6|7) inherit eutils multilib ;;
30 + 7) inherit eutils multilib ;;
31 8) ;;
32 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
33 esac
34 @@ -99,13 +99,11 @@ vala_depend() {
35 # VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
36 vala_best_api_version() {
37 local u v
38 - local hv_opt="-b"
39 - [[ ${EAPI} == 6 ]] && hv_opt=""
40
41 u=$(_vala_use_depend)
42
43 for v in $(vala_api_versions); do
44 - has_version ${hv_opt} "dev-lang/vala:${v}${u}" && echo "${v}" && return
45 + has_version -b "dev-lang/vala:${v}${u}" && echo "${v}" && return
46 done
47 }
48
49 @@ -121,8 +119,6 @@ vala_best_api_version() {
50 # version is not available.
51 vala_setup() {
52 local p d valafoo version ignore_use
53 - local hv_opt="-b"
54 - [[ ${EAPI} == 6 ]] && hv_opt=""
55
56 while [[ $1 ]]; do
57 case $1 in
58 @@ -141,7 +137,7 @@ vala_setup() {
59 fi
60
61 if [[ ${version} ]]; then
62 - has_version ${hv_opt} "dev-lang/vala:${version}" || die "No installed vala:${version}"
63 + has_version -b "dev-lang/vala:${version}" || die "No installed vala:${version}"
64 else
65 version=$(vala_best_api_version)
66 [[ ${version} ]] || die "No installed vala in $(vala_depend)"
67 @@ -178,8 +174,8 @@ vala_setup() {
68
69 # @FUNCTION: vala_src_prepare
70 # @DESCRIPTION:
71 -# For backwards compatibility in EAPIs 6 and 7. Calls vala_setup.
72 -if [[ ${EAPI} == [67] ]]; then
73 +# For backwards compatibility in EAPI 7. Calls vala_setup.
74 +if [[ ${EAPI} == 7 ]]; then
75 vala_src_prepare() { vala_setup "$@"; }
76 fi
77
78 --
79 2.39.0

Replies