1 |
commit: 0b7f9ad4c4d57b4348cf7a8a1f058f29ea21a42e |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 26 22:54:16 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 26 22:54:16 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b7f9ad4 |
7 |
|
8 |
sys-libs/readline: drop use of 'eval' for newer versions for patch generation |
9 |
|
10 |
Use similar approach as dev-libs/mpfr and sys-libs/readline |
11 |
for generating SRC_URI & patch list. |
12 |
|
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
...ne-8.2_rc3.ebuild => readline-8.1_p2-r1.ebuild} | 105 +++++++++------------ |
16 |
sys-libs/readline/readline-8.2_rc3.ebuild | 51 ++++++---- |
17 |
sys-libs/readline/readline-9999.ebuild | 51 ++++++---- |
18 |
3 files changed, 110 insertions(+), 97 deletions(-) |
19 |
|
20 |
diff --git a/sys-libs/readline/readline-8.2_rc3.ebuild b/sys-libs/readline/readline-8.1_p2-r1.ebuild |
21 |
similarity index 72% |
22 |
copy from sys-libs/readline/readline-8.2_rc3.ebuild |
23 |
copy to sys-libs/readline/readline-8.1_p2-r1.ebuild |
24 |
index 934a8b1ce368..2732f7d7ae6a 100644 |
25 |
--- a/sys-libs/readline/readline-8.2_rc3.ebuild |
26 |
+++ b/sys-libs/readline/readline-8.1_p2-r1.ebuild |
27 |
@@ -3,10 +3,6 @@ |
28 |
|
29 |
EAPI=7 |
30 |
|
31 |
-# There's no standard way of versioning the point releases upstream |
32 |
-# make anyway, so while this was added for RC versions, it's fine |
33 |
-# in general. |
34 |
-QA_PKGCONFIG_VERSION=$(ver_cut 1-2) |
35 |
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc |
36 |
inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript verify-sig |
37 |
|
38 |
@@ -16,53 +12,49 @@ PLEVEL="${PV##*_p}" |
39 |
MY_PV="${PV/_p*}" |
40 |
MY_PV="${MY_PV/_/-}" |
41 |
MY_P="${PN}-${MY_PV}" |
42 |
-is_release() { |
43 |
- case ${PV} in |
44 |
- 9999|*_alpha*|*_beta*|*_rc*) return 1 ;; |
45 |
- *) return 0 ;; |
46 |
- esac |
47 |
-} |
48 |
+MY_PATCHES=() |
49 |
+ |
50 |
[[ ${PV} != *_p* ]] && PLEVEL=0 |
51 |
-patches() { |
52 |
- [[ ${PLEVEL} -eq 0 ]] && return 1 |
53 |
- local opt=$1 |
54 |
- eval set -- {1..${PLEVEL}} |
55 |
- set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") |
56 |
- if [[ ${opt} == -s ]] ; then |
57 |
- echo "${@/#/${DISTDIR}/}" |
58 |
- else |
59 |
- local u |
60 |
- for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do |
61 |
- printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" |
62 |
- printf "${u}/${PN}-${MY_PV}-patches/%s.sig " "$@" |
63 |
- done |
64 |
- fi |
65 |
-} |
66 |
|
67 |
DESCRIPTION="Another cute console display library" |
68 |
-HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git" |
69 |
- |
70 |
-if [[ ${PV} == 9999 ]] ; then |
71 |
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git" |
72 |
- EGIT_BRANCH=devel |
73 |
- inherit git-r3 |
74 |
-elif is_release ; then |
75 |
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" |
76 |
- SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" |
77 |
-else |
78 |
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
79 |
- SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" |
80 |
-fi |
81 |
- |
82 |
-if ! is_release ; then |
83 |
- inherit autotools |
84 |
-fi |
85 |
+HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" |
86 |
+ |
87 |
+case ${PV} in |
88 |
+ *_alpha*|*_beta*|*_rc*) |
89 |
+ SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
90 |
+ SRC_URI+=" verify-sig? ( ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" |
91 |
+ ;; |
92 |
+ |
93 |
+ *) |
94 |
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" |
95 |
+ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" |
96 |
+ |
97 |
+ if [[ ${PLEVEL} -gt 0 ]] ; then |
98 |
+ # bash-5.1 -> bash51 |
99 |
+ my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2)) |
100 |
+ |
101 |
+ patch_url= |
102 |
+ my_patch_index= |
103 |
+ |
104 |
+ for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do |
105 |
+ for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do |
106 |
+ patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index}) |
107 |
+ SRC_URI+=" ${patch_url}" |
108 |
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )" |
109 |
+ done |
110 |
+ |
111 |
+ MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) ) |
112 |
+ done |
113 |
+ |
114 |
+ unset my_pn patch_url my_patch_index |
115 |
+ fi |
116 |
+ ;; |
117 |
+esac |
118 |
|
119 |
LICENSE="GPL-3" |
120 |
SLOT="0/8" # subslot matches SONAME major |
121 |
-if is_release ; then |
122 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
123 |
-fi |
124 |
+[[ ${PV} == *_rc* ]] || \ |
125 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
126 |
IUSE="static-libs +unicode utils" |
127 |
|
128 |
RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]" |
129 |
@@ -77,27 +69,22 @@ PATCHES=( |
130 |
"${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 |
131 |
"${FILESDIR}"/${PN}-7.0-headers.patch |
132 |
"${FILESDIR}"/${PN}-8.0-headers.patch |
133 |
- |
134 |
- # TODO: rebase |
135 |
- #"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch |
136 |
+ "${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch |
137 |
+ "${FILESDIR}"/${PN}-8.1-windows-signals.patch |
138 |
) |
139 |
|
140 |
+# Needed because we don't want the patches being unpacked |
141 |
+# (which emits annoying and useless error messages) |
142 |
src_unpack() { |
143 |
- if [[ ${PV} == 9999 ]] ; then |
144 |
- git-r3_src_unpack |
145 |
- else |
146 |
- # Needed because we don't want the patches being unpacked |
147 |
- # (which emits annoying and useless error messages) |
148 |
- verify-sig_src_unpack |
149 |
- unpack ${MY_P}.tar.gz |
150 |
- fi |
151 |
+ verify-sig_src_unpack |
152 |
+ |
153 |
+ unpack ${MY_P}.tar.gz |
154 |
} |
155 |
|
156 |
src_prepare() { |
157 |
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
158 |
- default |
159 |
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}" |
160 |
|
161 |
- is_release || eautoreconf |
162 |
+ default |
163 |
|
164 |
if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; then |
165 |
# If we're bootstrapping, make a guess. We don't have pkg-config |
166 |
|
167 |
diff --git a/sys-libs/readline/readline-8.2_rc3.ebuild b/sys-libs/readline/readline-8.2_rc3.ebuild |
168 |
index 934a8b1ce368..6ab39201ac56 100644 |
169 |
--- a/sys-libs/readline/readline-8.2_rc3.ebuild |
170 |
+++ b/sys-libs/readline/readline-8.2_rc3.ebuild |
171 |
@@ -16,28 +16,20 @@ PLEVEL="${PV##*_p}" |
172 |
MY_PV="${PV/_p*}" |
173 |
MY_PV="${MY_PV/_/-}" |
174 |
MY_P="${PN}-${MY_PV}" |
175 |
+MY_PATCHES=() |
176 |
+ |
177 |
is_release() { |
178 |
case ${PV} in |
179 |
- 9999|*_alpha*|*_beta*|*_rc*) return 1 ;; |
180 |
- *) return 0 ;; |
181 |
+ 9999|*_alpha*|*_beta*|*_rc*) |
182 |
+ return 1 |
183 |
+ ;; |
184 |
+ *) |
185 |
+ return 0 |
186 |
+ ;; |
187 |
esac |
188 |
} |
189 |
+ |
190 |
[[ ${PV} != *_p* ]] && PLEVEL=0 |
191 |
-patches() { |
192 |
- [[ ${PLEVEL} -eq 0 ]] && return 1 |
193 |
- local opt=$1 |
194 |
- eval set -- {1..${PLEVEL}} |
195 |
- set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") |
196 |
- if [[ ${opt} == -s ]] ; then |
197 |
- echo "${@/#/${DISTDIR}/}" |
198 |
- else |
199 |
- local u |
200 |
- for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do |
201 |
- printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" |
202 |
- printf "${u}/${PN}-${MY_PV}-patches/%s.sig " "$@" |
203 |
- done |
204 |
- fi |
205 |
-} |
206 |
|
207 |
DESCRIPTION="Another cute console display library" |
208 |
HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git" |
209 |
@@ -47,8 +39,28 @@ if [[ ${PV} == 9999 ]] ; then |
210 |
EGIT_BRANCH=devel |
211 |
inherit git-r3 |
212 |
elif is_release ; then |
213 |
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" |
214 |
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" |
215 |
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" |
216 |
+ |
217 |
+ if [[ ${PLEVEL} -gt 0 ]] ; then |
218 |
+ # bash-5.1 -> bash51 |
219 |
+ my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2)) |
220 |
+ |
221 |
+ patch_url= |
222 |
+ my_patch_index= |
223 |
+ |
224 |
+ for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do |
225 |
+ for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do |
226 |
+ patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index}) |
227 |
+ SRC_URI+=" ${patch_url}" |
228 |
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )" |
229 |
+ done |
230 |
+ |
231 |
+ MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) ) |
232 |
+ done |
233 |
+ |
234 |
+ unset my_pn patch_url my_patch_index |
235 |
+ fi |
236 |
else |
237 |
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
238 |
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" |
239 |
@@ -94,7 +106,8 @@ src_unpack() { |
240 |
} |
241 |
|
242 |
src_prepare() { |
243 |
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
244 |
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}" |
245 |
+ |
246 |
default |
247 |
|
248 |
is_release || eautoreconf |
249 |
|
250 |
diff --git a/sys-libs/readline/readline-9999.ebuild b/sys-libs/readline/readline-9999.ebuild |
251 |
index 934a8b1ce368..6ab39201ac56 100644 |
252 |
--- a/sys-libs/readline/readline-9999.ebuild |
253 |
+++ b/sys-libs/readline/readline-9999.ebuild |
254 |
@@ -16,28 +16,20 @@ PLEVEL="${PV##*_p}" |
255 |
MY_PV="${PV/_p*}" |
256 |
MY_PV="${MY_PV/_/-}" |
257 |
MY_P="${PN}-${MY_PV}" |
258 |
+MY_PATCHES=() |
259 |
+ |
260 |
is_release() { |
261 |
case ${PV} in |
262 |
- 9999|*_alpha*|*_beta*|*_rc*) return 1 ;; |
263 |
- *) return 0 ;; |
264 |
+ 9999|*_alpha*|*_beta*|*_rc*) |
265 |
+ return 1 |
266 |
+ ;; |
267 |
+ *) |
268 |
+ return 0 |
269 |
+ ;; |
270 |
esac |
271 |
} |
272 |
+ |
273 |
[[ ${PV} != *_p* ]] && PLEVEL=0 |
274 |
-patches() { |
275 |
- [[ ${PLEVEL} -eq 0 ]] && return 1 |
276 |
- local opt=$1 |
277 |
- eval set -- {1..${PLEVEL}} |
278 |
- set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") |
279 |
- if [[ ${opt} == -s ]] ; then |
280 |
- echo "${@/#/${DISTDIR}/}" |
281 |
- else |
282 |
- local u |
283 |
- for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do |
284 |
- printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" |
285 |
- printf "${u}/${PN}-${MY_PV}-patches/%s.sig " "$@" |
286 |
- done |
287 |
- fi |
288 |
-} |
289 |
|
290 |
DESCRIPTION="Another cute console display library" |
291 |
HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git" |
292 |
@@ -47,8 +39,28 @@ if [[ ${PV} == 9999 ]] ; then |
293 |
EGIT_BRANCH=devel |
294 |
inherit git-r3 |
295 |
elif is_release ; then |
296 |
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" |
297 |
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" |
298 |
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" |
299 |
+ |
300 |
+ if [[ ${PLEVEL} -gt 0 ]] ; then |
301 |
+ # bash-5.1 -> bash51 |
302 |
+ my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2)) |
303 |
+ |
304 |
+ patch_url= |
305 |
+ my_patch_index= |
306 |
+ |
307 |
+ for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do |
308 |
+ for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do |
309 |
+ patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index}) |
310 |
+ SRC_URI+=" ${patch_url}" |
311 |
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )" |
312 |
+ done |
313 |
+ |
314 |
+ MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) ) |
315 |
+ done |
316 |
+ |
317 |
+ unset my_pn patch_url my_patch_index |
318 |
+ fi |
319 |
else |
320 |
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
321 |
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" |
322 |
@@ -94,7 +106,8 @@ src_unpack() { |
323 |
} |
324 |
|
325 |
src_prepare() { |
326 |
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
327 |
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}" |
328 |
+ |
329 |
default |
330 |
|
331 |
is_release || eautoreconf |