1 |
This adds support for EAPI=7. |
2 |
|
3 |
Also overhauled the ebuild and dropped aspell-0.50 from *DEPEND, as it's |
4 |
not anymore in tree. Also slightly adjusted messages and taking ownership. |
5 |
|
6 |
Since there is a open bug ticket about setting a default value for |
7 |
ASPELL_VERSION, I am changing the logic a little bit. ASPELL_VERSION |
8 |
will be by default version 6, while version 5 or no version can be set |
9 |
by an empty variable instead. It's needed for automatic SRC_URI, since |
10 |
there are packages starting with 'aspell', 'aspell5' or 'aspell6', |
11 |
despite being all for aspell-0.60. |
12 |
|
13 |
This is a preparation for an major version bump off all |
14 |
app-dicts/aspell-* language dicts ebuilds. Most of them are anyway |
15 |
outdated, so we could bump them directly to EAPI=7 after merging this |
16 |
one here. |
17 |
|
18 |
Closes: https://bugs.gentoo.org/637710 |
19 |
Closes: https://bugs.gentoo.org/770259 |
20 |
Signed-off-by: Conrad Kostecki <conikost@g.o> |
21 |
--- |
22 |
eclass/aspell-dict-r1.eclass | 74 ++++++++++++++++++------------------ |
23 |
1 file changed, 37 insertions(+), 37 deletions(-) |
24 |
|
25 |
diff --git a/eclass/aspell-dict-r1.eclass b/eclass/aspell-dict-r1.eclass |
26 |
index b07af61fdf1..14bbfcb98d2 100644 |
27 |
--- a/eclass/aspell-dict-r1.eclass |
28 |
+++ b/eclass/aspell-dict-r1.eclass |
29 |
@@ -1,42 +1,48 @@ |
30 |
-# Copyright 1999-2020 Gentoo Authors |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
# Distributed under the terms of the GNU General Public License v2 |
33 |
|
34 |
# @ECLASS: aspell-dict-r1.eclass |
35 |
# @MAINTAINER: |
36 |
-# maintainer-needed@g.o |
37 |
+# Conrad Kostecki <conikost@g.o> |
38 |
# @AUTHOR: |
39 |
-# Original author: Seemant Kulleen |
40 |
-# -r1 author: David Seifert |
41 |
-# @SUPPORTED_EAPIS: 6 |
42 |
-# @BLURB: An eclass to streamline the construction of ebuilds for new aspell dicts |
43 |
+# Seemant Kulleen <seemant@g.o> |
44 |
+# David Seifert <soap@g.o> |
45 |
+# Conrad Kostecki <conikost@g.o> |
46 |
+# @SUPPORTED_EAPIS: 6 7 |
47 |
+# @BLURB: An eclass to streamline the construction of ebuilds for new aspell dictionaries. |
48 |
# @DESCRIPTION: |
49 |
-# The aspell-dict-r1 eclass is designed to streamline the construction of |
50 |
-# ebuilds for the new aspell dictionaries (from gnu.org) which support |
51 |
-# aspell-0.50. Support for aspell-0.60 has been added by Sergey Ulanov. |
52 |
+# The aspell-dict-r1 eclass is designed to streamline the construction of ebuilds |
53 |
+# for the new aspell dictionaries (from gnu.org) which support aspell-0.50. |
54 |
+# Support for aspell-0.60 has been added by Sergey Ulanov. |
55 |
|
56 |
# @ECLASS-VARIABLE: ASPELL_LANG |
57 |
# @REQUIRED |
58 |
# @DESCRIPTION: |
59 |
-# Pure cleartext string that is included into DESCRIPTION. This is the name |
60 |
-# of the language, for instance "Hungarian". Needs to be defined before |
61 |
-# inheriting the eclass. |
62 |
+# Pure cleartext string that is included into DESCRIPTION. |
63 |
+# This is the name of the language, for instance "Hungarian". |
64 |
+# Needs to be defined before inheriting the eclass. |
65 |
+ |
66 |
+# @ECLASS-VARIABLE: ASPELL_SPELLANG |
67 |
+# @DESCRIPTION: |
68 |
+# Short (readonly) form of the language code, generated from ${PN}. |
69 |
+# For instance, 'aspell-hu' yields to the value 'hu'. |
70 |
+readonly ASPELL_SPELLANG="${PN/aspell-/}" |
71 |
|
72 |
# @ECLASS-VARIABLE: ASPELL_VERSION |
73 |
# @DESCRIPTION: |
74 |
-# What major version of aspell is this dictionary for? Valid values are 5, 6 or undefined. |
75 |
-# This value is used to construct SRC_URI and *DEPEND strings. If defined to 6, |
76 |
-# >=app-text/aspell-0.60 will be added to DEPEND and RDEPEND, otherwise, |
77 |
-# >=app-text/aspell-0.50 is added to DEPEND and RDEPEND. If the value is to be overridden, |
78 |
-# it needs to be overridden before inheriting the eclass. |
79 |
+# What major version of aspell is this dictionary for? Valid values are 5, 6 or empty. |
80 |
+# This value is used to construct SRC_URI strings. |
81 |
+# If the value needs to be overridden, it needs to be overridden before inheriting the eclass. |
82 |
+: ${ASPELL_VERSION:-6} |
83 |
|
84 |
case ${EAPI:-0} in |
85 |
- [0-5]) |
86 |
- die "aspell-dict-r1.eclass is banned in EAPI ${EAPI:-0}" |
87 |
+ 0|1|2|3|4|5) |
88 |
+ die "Unsupported EAPI=${EAPI} (obsolete) for ${ECLASS}" |
89 |
;; |
90 |
- 6) |
91 |
+ 6|7) |
92 |
;; |
93 |
*) |
94 |
- die "Unknown EAPI ${EAPI:-0}" |
95 |
+ die "Unknown EAPI=${EAPI} for ${ECLASS}" |
96 |
;; |
97 |
esac |
98 |
|
99 |
@@ -44,29 +50,22 @@ EXPORT_FUNCTIONS src_configure src_install |
100 |
|
101 |
if [[ ! ${_ASPELL_DICT_R1} ]]; then |
102 |
|
103 |
-# aspell packages have an idiosyncratic versioning scheme, that is |
104 |
-# the last separating version separator is replaced by a '-'. |
105 |
-_ASPELL_P=aspell${ASPELL_VERSION}-${PN/aspell-/}-${PV%.*}-${PV##*.} |
106 |
+[[ ! -z "${ASPELL_VERSION}" && "${ASPELL_VERSION}" != [56] ]] && die "Unsupported ASPELL_VERSION=${ASPELL_VERSION} for ${ECLASS}" |
107 |
|
108 |
-# @ECLASS-VARIABLE: ASPELL_SPELLANG |
109 |
-# @DESCRIPTION: |
110 |
-# Short (readonly) form of the language code, generated from ${PN} |
111 |
-# For instance, 'aspell-hu' yields the value 'hu'. |
112 |
-readonly ASPELL_SPELLANG=${PN/aspell-/} |
113 |
-S="${WORKDIR}/${_ASPELL_P}" |
114 |
+# Most of those aspell packages have an idiosyncratic versioning scheme, |
115 |
+# where the last separating version separator is replaced by a '-'. |
116 |
+_ASPELL_P="aspell${ASPELL_VERSION}-${PN/aspell-/}-${PV%.*}-${PV##*.}" |
117 |
|
118 |
-DESCRIPTION="${ASPELL_LANG} language dictionary for aspell" |
119 |
+DESCRIPTION="Aspell (${ASPELL_LANG}) language dictionary" |
120 |
HOMEPAGE="http://aspell.net" |
121 |
SRC_URI="mirror://gnu/aspell/dict/${ASPELL_SPELLANG}/${_ASPELL_P}.tar.bz2" |
122 |
+S="${WORKDIR}/${_ASPELL_P}" |
123 |
+ |
124 |
unset _ASPELL_P |
125 |
|
126 |
-IUSE="" |
127 |
SLOT="0" |
128 |
|
129 |
-_ASPELL_MAJOR_VERSION=${ASPELL_VERSION:-5} |
130 |
-[[ ${_ASPELL_MAJOR_VERSION} != [56] ]] && die "${ASPELL_VERSION} is not a valid version" |
131 |
- |
132 |
-RDEPEND=">=app-text/aspell-0.${_ASPELL_MAJOR_VERSION}0" |
133 |
+RDEPEND="app-text/aspell" |
134 |
DEPEND="${RDEPEND}" |
135 |
unset _ASPELL_MAJOR_VERSION |
136 |
|
137 |
@@ -74,7 +73,7 @@ unset _ASPELL_MAJOR_VERSION |
138 |
# @DESCRIPTION: |
139 |
# The aspell-dict-r1 src_configure function which is exported. |
140 |
aspell-dict-r1_src_configure() { |
141 |
- # non-autoconf based script, cannot be used with econf |
142 |
+ # Since it's a non-autoconf based script, 'econf' cannot be used. |
143 |
./configure || die |
144 |
} |
145 |
|
146 |
@@ -88,3 +87,4 @@ aspell-dict-r1_src_install() { |
147 |
|
148 |
_ASPELL_DICT_R1=1 |
149 |
fi |
150 |
+ |
151 |
-- |
152 |
2.30.1 |