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 15/22] office-ext-r1.eclass: remove EAPI 5
Date: Tue, 14 Mar 2023 20:03:07
Message-Id: 20230314195826.35239-15-soap@gentoo.org
In Reply to: [gentoo-dev] [PATCH 01/22] apache-module.eclass: remove EAPI 5 by David Seifert
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/office-ext-r1.eclass | 22 +++++++++++++---------
4 1 file changed, 13 insertions(+), 9 deletions(-)
5
6 diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass
7 index 8cf472fe5bcc..abc0cabaa310 100644
8 --- a/eclass/office-ext-r1.eclass
9 +++ b/eclass/office-ext-r1.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2021 Gentoo Authors
12 +# Copyright 1999-2023 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: office-ext-r1.eclass
16 @@ -6,18 +6,18 @@
17 # The office team <office@g.o>
18 # @AUTHOR:
19 # Tomáš Chvátal <scarabeus@g.o>
20 -# @SUPPORTED_EAPIS: 5 7
21 +# @SUPPORTED_EAPIS: 7
22 # @BLURB: Eclass for installing libreoffice extensions
23 # @DESCRIPTION:
24 # Eclass for easing maintenance of libreoffice extensions.
25
26 -case "${EAPI:-0}" in
27 - 5) inherit eutils multilib ;;
28 - 7) inherit eutils ;;
29 - *) die "EAPI=${EAPI} is not supported" ;;
30 +case ${EAPI} in
31 + 7) ;;
32 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
33 esac
34
35 -EXPORT_FUNCTIONS src_unpack src_install
36 +if [[ -z ${_OFFICE_EXT_R1_ECLASS} ]]; then
37 +_OFFICE_EXT_R1_ECLASS=1
38
39 # @ECLASS_VARIABLE: OFFICE_REQ_USE
40 # @PRE_INHERIT
41 @@ -112,7 +112,7 @@ office-ext-r1_src_unpack() {
42 for i in ${OFFICE_EXTENSIONS[@]}; do
43 # Unpack the extensions where required and add case for oxt
44 # which should be most common case for the extensions.
45 - if [[ -f "${OFFICE_EXTENSIONS_LOCATION}/${i}" ]] ; then
46 + if [[ -f ${OFFICE_EXTENSIONS_LOCATION}/${i} ]] ; then
47 case ${i} in
48 *.oxt)
49 mkdir -p "${WORKDIR}/${i}/" || die
50 @@ -142,9 +142,13 @@ office-ext-r1_src_install() {
51 for j in ${OFFICE_EXTENSIONS[@]}; do
52 pushd "${WORKDIR}/${j}/" > /dev/null || die
53 insinto /usr/$(get_libdir)/${i}/share/extensions/${j/.oxt/}
54 - doins -r *
55 + doins -r .
56 popd > /dev/null || die
57 done
58 fi
59 done
60 }
61 +
62 +fi
63 +
64 +EXPORT_FUNCTIONS src_unpack src_install
65 --
66 2.40.0