Gentoo Archives: gentoo-dev

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-dev@l.g.o
Cc: Conrad Kostecki <conikost@g.o>, candrews@g.o, Arthur Zamarin <arthurzam@g.o>
Subject: [gentoo-dev] [PATCH 1/4] kodi-addon.eclass: drop support for EAPI<7
Date: Sun, 04 Sep 2022 19:36:31
Message-Id: 20220904193515.210321-2-arthurzam@gentoo.org
In Reply to: [gentoo-dev] Various changes to eclasses by Arthur Zamarin
1 - No consumers for EAPI<7 remain in ::gentoo tree
2 - For those EAPIs, it tries to inherit cmake-utils eclass, which
3 doesn't exist, so it would just fail!
4 - Simplify the eclass logic
5 - Fix UnquotedVariable for EPREFIX
6
7 Signed-off-by: Arthur Zamarin <arthurzam@g.o>
8 ---
9 eclass/kodi-addon.eclass | 26 ++++++++++----------------
10 1 file changed, 10 insertions(+), 16 deletions(-)
11
12 diff --git a/eclass/kodi-addon.eclass b/eclass/kodi-addon.eclass
13 index 8cbbad9224..6e7fa26f3c 100644
14 --- a/eclass/kodi-addon.eclass
15 +++ b/eclass/kodi-addon.eclass
16 @@ -1,25 +1,22 @@
17 -# Copyright 1999-2021 Gentoo Authors
18 +# Copyright 1999-2022 Gentoo Authors
19 # Distributed under the terms of the GNU General Public License v2
20
21 # @ECLASS: kodi-addon.eclass
22 # @MAINTAINER:
23 # candrews@g.o
24 -# @SUPPORTED_EAPIS: 4 5 6 7
25 -# @PROVIDES: cmake cmake-utils
26 +# @SUPPORTED_EAPIS: 7
27 +# @PROVIDES: cmake
28 # @BLURB: Helper for correct building and (importantly) installing Kodi addon packages.
29 # @DESCRIPTION:
30 # Provides a src_configure function for correct CMake configuration
31
32 -case "${EAPI:-0}" in
33 - 4|5|6)
34 - inherit cmake-utils multilib
35 - ;;
36 - 7)
37 - inherit cmake
38 - ;;
39 - *) die "EAPI=${EAPI} is not supported" ;;
40 +case ${EAPI} in
41 + 7) ;;
42 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
43 esac
44
45 +inherit cmake
46 +
47 EXPORT_FUNCTIONS src_configure
48
49 # @FUNCTION: kodi-addon_src_configure
50 @@ -28,11 +25,8 @@ EXPORT_FUNCTIONS src_configure
51 kodi-addon_src_configure() {
52
53 mycmakeargs+=(
54 - -DCMAKE_INSTALL_LIBDIR=${EPREFIX%/}/usr/$(get_libdir)/kodi
55 + -DCMAKE_INSTALL_LIBDIR="${EPREFIX}/usr/$(get_libdir)/kodi"
56 )
57
58 - case ${EAPI} in
59 - 4|5|6) cmake-utils_src_configure ;;
60 - 7) cmake_src_configure ;;
61 - esac
62 + cmake_src_configure
63 }
64 --
65 2.37.3