1 |
commit: 8ad4f0aa7753ff10ad3761c9b69f14c392fe1635 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 28 00:55:06 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 28 00:55:15 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ad4f0aa |
7 |
|
8 |
sys-libs/ncurses: modernise style a bit more |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild | 95 +++++++++++++----------- |
13 |
sys-libs/ncurses/ncurses-6.3_p20220423.ebuild | 94 ++++++++++++----------- |
14 |
2 files changed, 100 insertions(+), 89 deletions(-) |
15 |
|
16 |
diff --git a/sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild b/sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild |
17 |
index 1d04632af4e3..1c25c4ffc2c5 100644 |
18 |
--- a/sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild |
19 |
+++ b/sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild |
20 |
@@ -80,8 +80,7 @@ IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace" |
21 |
RESTRICT="!test? ( test )" |
22 |
|
23 |
DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" |
24 |
-# berkdb? ( sys-libs/db )" |
25 |
-# Block the older ncurses that installed all files w/SLOT=5. #557472 |
26 |
+# Block the older ncurses that installed all files w/SLOT=5, bug #557472 |
27 |
RDEPEND="${DEPEND} |
28 |
!<=sys-libs/ncurses-5.9-r4:5 |
29 |
!<sys-libs/slang-2.3.2_pre23 |
30 |
@@ -93,10 +92,10 @@ S="${WORKDIR}/${MY_P}" |
31 |
|
32 |
PATCHES=( |
33 |
"${FILESDIR}/${PN}-5.7-nongnu.patch" |
34 |
- "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871 |
35 |
+ "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" # bug #192083, bug #383871 |
36 |
"${FILESDIR}/${PN}-6.0-pkg-config.patch" |
37 |
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360 |
38 |
- "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" #601426 |
39 |
+ "${FILESDIR}/${PN}-6.0-ticlib.patch" # bug #557360 |
40 |
+ "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" # bug #601426 |
41 |
) |
42 |
|
43 |
src_prepare() { |
44 |
@@ -113,9 +112,13 @@ src_prepare() { |
45 |
} |
46 |
|
47 |
src_configure() { |
48 |
- unset TERMINFO #115036 |
49 |
+ # bug #115036 |
50 |
+ unset TERMINFO |
51 |
+ |
52 |
tc-export_build_env BUILD_{CC,CPP} |
53 |
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642 |
54 |
+ |
55 |
+ # bug #214642 |
56 |
+ BUILD_CPPFLAGS+=" -D_GNU_SOURCE" |
57 |
|
58 |
# Build the various variants of ncurses -- narrow, wide, and threaded. #510440 |
59 |
# Order matters here -- we want unicode/thread versions to come last so that the |
60 |
@@ -132,7 +135,7 @@ src_configure() { |
61 |
# When installing ncurses, we have to use a compatible version of tic. |
62 |
# This comes up when cross-compiling, doing multilib builds, upgrading, |
63 |
# or installing for the first time. Build a local copy of tic whenever |
64 |
- # the host version isn't available. #249363 #557598 |
65 |
+ # the host version isn't available. bug #249363, bug #557598 |
66 |
if ! has_version -b "~sys-libs/${P}:0" ; then |
67 |
local lbuildflags="-static" |
68 |
|
69 |
@@ -179,9 +182,6 @@ do_configure() { |
70 |
# src_install() ... |
71 |
--with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" |
72 |
|
73 |
- # Disabled until #245417 is sorted out. |
74 |
- #$(use_with berkdb hashed-db) |
75 |
- |
76 |
# Enable installation of .pc files. |
77 |
--enable-pc-files |
78 |
# This path is used to control where the .pc files are installed. |
79 |
@@ -189,6 +189,9 @@ do_configure() { |
80 |
|
81 |
# Now the rest of the various standard flags. |
82 |
--with-shared |
83 |
+ # (Originally disabled until bug #245417 is sorted out, but now |
84 |
+ # just keeping it off for good, given nobody needed it until now |
85 |
+ # (2022) and we're trying to phase out bdb.) |
86 |
--without-hashed-db |
87 |
$(use_with ada) |
88 |
$(use_with cxx) |
89 |
@@ -233,6 +236,7 @@ do_configure() { |
90 |
else |
91 |
conf+=( --without-{pthread,reentrant} ) |
92 |
fi |
93 |
+ |
94 |
# Make sure each variant goes in a unique location. |
95 |
if [[ ${target} == "ncurses" ]] ; then |
96 |
# "ncurses" variant goes into "${EPREFIX}"/usr/include |
97 |
@@ -249,7 +253,7 @@ do_configure() { |
98 |
fi |
99 |
|
100 |
# Force bash until upstream rebuilds the configure script with a newer |
101 |
- # version of autotools. #545532 |
102 |
+ # version of autotools. bug #545532 |
103 |
#CONFIG_SHELL=${EPREFIX}/bin/bash \ |
104 |
ECONF_SOURCE="${S}" \ |
105 |
econf "${conf[@]}" "$@" |
106 |
@@ -293,6 +297,7 @@ do_compile() { |
107 |
# in parallel. This is not really a perf hit since the source |
108 |
# generation is quite small. |
109 |
emake -j1 sources |
110 |
+ |
111 |
# For some reason, sources depends on pc-files which depends on |
112 |
# compiled libraries which depends on sources which ... |
113 |
# Manually delete the pc-files file so the install step will |
114 |
@@ -313,14 +318,15 @@ multilib_src_install() { |
115 |
"${NCURSES_TARGETS[@]}" \ |
116 |
$(usex tinfo 'tinfow tinfo' '') |
117 |
fi |
118 |
- # don't delete '*.dll.a', needed for linking #631468 |
119 |
+ |
120 |
+ # Don't delete '*.dll.a', needed for linking, bug #631468 |
121 |
if ! use static-libs; then |
122 |
find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die |
123 |
fi |
124 |
|
125 |
# Build fails to create this ... |
126 |
# -FIXME- |
127 |
- # Ugly hackaround for riscv having two parts libdir (#689240) |
128 |
+ # Ugly hackaround for riscv having two parts libdir (bug #689240) |
129 |
# Replace this hack with an official solution once we have one... |
130 |
# -FIXME- |
131 |
dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \ |
132 |
@@ -330,46 +336,45 @@ multilib_src_install() { |
133 |
# system. Technically, this could be also achieved |
134 |
# via --disable-overwrite but it also moves headers implicitly, |
135 |
# and we do not want to do this yet. |
136 |
- # https://bugs.gentoo.org/836696 |
137 |
+ # bug #836696 |
138 |
rm "${ED}"/usr/$(get_libdir)/libcurses* || die |
139 |
} |
140 |
|
141 |
multilib_src_install_all() { |
142 |
-# if ! use berkdb ; then |
143 |
- # We need the basic terminfo files in /etc for embedded/recovery. #37026 |
144 |
- einfo "Installing basic terminfo files in /etc..." |
145 |
- local terms=( |
146 |
- # Dumb/simple values that show up when using the in-kernel VT. |
147 |
- ansi console dumb linux |
148 |
- vt{52,100,102,200,220} |
149 |
- # [u]rxvt users used to be pretty common. Probably should drop this |
150 |
- # since upstream is dead and people are moving away from it. |
151 |
- rxvt{,-unicode}{,-256color} |
152 |
- # xterm users are common, as is terminals re-using/spoofing it. |
153 |
- xterm xterm-{,256}color |
154 |
- # screen is common (and reused by tmux). |
155 |
- screen{,-256color} |
156 |
- screen.xterm-256color |
157 |
- ) |
158 |
- local x |
159 |
- for x in "${terms[@]}"; do |
160 |
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) |
161 |
- local basedir=$(basename "$(dirname "${termfile}")") |
162 |
- |
163 |
- if [[ -n ${termfile} ]] ; then |
164 |
- dodir "/etc/terminfo/${basedir}" |
165 |
- mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die |
166 |
- dosym "../../../../etc/terminfo/${basedir}/${x}" \ |
167 |
- "/usr/share/terminfo/${basedir}/${x}" |
168 |
- fi |
169 |
- done |
170 |
-# fi |
171 |
+ # We need the basic terminfo files in /etc for embedded/recovery, bug #37026 |
172 |
+ einfo "Installing basic terminfo files in /etc..." |
173 |
+ local terms=( |
174 |
+ # Dumb/simple values that show up when using the in-kernel VT. |
175 |
+ ansi console dumb linux |
176 |
+ vt{52,100,102,200,220} |
177 |
+ # [u]rxvt users used to be pretty common. Probably should drop this |
178 |
+ # since upstream is dead and people are moving away from it. |
179 |
+ rxvt{,-unicode}{,-256color} |
180 |
+ # xterm users are common, as is terminals re-using/spoofing it. |
181 |
+ xterm xterm-{,256}color |
182 |
+ # screen is common (and reused by tmux). |
183 |
+ screen{,-256color} |
184 |
+ screen.xterm-256color |
185 |
+ ) |
186 |
+ local x |
187 |
+ for x in "${terms[@]}"; do |
188 |
+ local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) |
189 |
+ local basedir=$(basename "$(dirname "${termfile}")") |
190 |
+ |
191 |
+ if [[ -n ${termfile} ]] ; then |
192 |
+ dodir "/etc/terminfo/${basedir}" |
193 |
+ mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die |
194 |
+ dosym "../../../../etc/terminfo/${basedir}/${x}" \ |
195 |
+ "/usr/share/terminfo/${basedir}/${x}" |
196 |
+ fi |
197 |
+ done |
198 |
|
199 |
echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses |
200 |
|
201 |
use minimal && rm -r "${ED}"/usr/share/terminfo* |
202 |
# Because ncurses5-config --terminfo returns the directory we keep it |
203 |
- keepdir /usr/share/terminfo #245374 |
204 |
+ # bug #245374 |
205 |
+ keepdir /usr/share/terminfo |
206 |
|
207 |
cd "${S}" || die |
208 |
dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc |
209 |
|
210 |
diff --git a/sys-libs/ncurses/ncurses-6.3_p20220423.ebuild b/sys-libs/ncurses/ncurses-6.3_p20220423.ebuild |
211 |
index bcfee98f91ee..69087694ef94 100644 |
212 |
--- a/sys-libs/ncurses/ncurses-6.3_p20220423.ebuild |
213 |
+++ b/sys-libs/ncurses/ncurses-6.3_p20220423.ebuild |
214 |
@@ -80,8 +80,7 @@ IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace" |
215 |
RESTRICT="!test? ( test )" |
216 |
|
217 |
DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" |
218 |
-# berkdb? ( sys-libs/db )" |
219 |
-# Block the older ncurses that installed all files w/SLOT=5. #557472 |
220 |
+# Block the older ncurses that installed all files w/SLOT=5, bug #557472 |
221 |
RDEPEND="${DEPEND} |
222 |
!<=sys-libs/ncurses-5.9-r4:5 |
223 |
!<sys-libs/slang-2.3.2_pre23 |
224 |
@@ -93,10 +92,10 @@ S="${WORKDIR}/${MY_P}" |
225 |
|
226 |
PATCHES=( |
227 |
"${FILESDIR}/${PN}-5.7-nongnu.patch" |
228 |
- "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871 |
229 |
+ "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" # bug #192083, bug #383871 |
230 |
"${FILESDIR}/${PN}-6.0-pkg-config.patch" |
231 |
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360 |
232 |
- "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" #601426 |
233 |
+ "${FILESDIR}/${PN}-6.0-ticlib.patch" # bug #557360 |
234 |
+ "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" # bug #601426 |
235 |
) |
236 |
|
237 |
src_prepare() { |
238 |
@@ -113,9 +112,13 @@ src_prepare() { |
239 |
} |
240 |
|
241 |
src_configure() { |
242 |
- unset TERMINFO #115036 |
243 |
+ # bug #115036 |
244 |
+ unset TERMINFO |
245 |
+ |
246 |
tc-export_build_env BUILD_{CC,CPP} |
247 |
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642 |
248 |
+ |
249 |
+ # bug #214642 |
250 |
+ BUILD_CPPFLAGS+=" -D_GNU_SOURCE" |
251 |
|
252 |
# Build the various variants of ncurses -- narrow, wide, and threaded. #510440 |
253 |
# Order matters here -- we want unicode/thread versions to come last so that the |
254 |
@@ -132,7 +135,7 @@ src_configure() { |
255 |
# When installing ncurses, we have to use a compatible version of tic. |
256 |
# This comes up when cross-compiling, doing multilib builds, upgrading, |
257 |
# or installing for the first time. Build a local copy of tic whenever |
258 |
- # the host version isn't available. #249363 #557598 |
259 |
+ # the host version isn't available. bug #249363, bug #557598 |
260 |
if ! has_version -b "~sys-libs/${P}:0" ; then |
261 |
local lbuildflags="-static" |
262 |
|
263 |
@@ -179,9 +182,6 @@ do_configure() { |
264 |
# src_install() ... |
265 |
--with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" |
266 |
|
267 |
- # Disabled until #245417 is sorted out. |
268 |
- #$(use_with berkdb hashed-db) |
269 |
- |
270 |
# Enable installation of .pc files. |
271 |
--enable-pc-files |
272 |
# This path is used to control where the .pc files are installed. |
273 |
@@ -189,6 +189,9 @@ do_configure() { |
274 |
|
275 |
# Now the rest of the various standard flags. |
276 |
--with-shared |
277 |
+ # (Originally disabled until bug #245417 is sorted out, but now |
278 |
+ # just keeping it off for good, given nobody needed it until now |
279 |
+ # (2022) and we're trying to phase out bdb.) |
280 |
--without-hashed-db |
281 |
$(use_with ada) |
282 |
$(use_with cxx) |
283 |
@@ -233,6 +236,7 @@ do_configure() { |
284 |
else |
285 |
conf+=( --without-{pthread,reentrant} ) |
286 |
fi |
287 |
+ |
288 |
# Make sure each variant goes in a unique location. |
289 |
if [[ ${target} == "ncurses" ]] ; then |
290 |
# "ncurses" variant goes into "${EPREFIX}"/usr/include |
291 |
@@ -249,7 +253,7 @@ do_configure() { |
292 |
fi |
293 |
|
294 |
# Force bash until upstream rebuilds the configure script with a newer |
295 |
- # version of autotools. #545532 |
296 |
+ # version of autotools. bug #545532 |
297 |
#CONFIG_SHELL=${EPREFIX}/bin/bash \ |
298 |
ECONF_SOURCE="${S}" \ |
299 |
econf "${conf[@]}" "$@" |
300 |
@@ -293,6 +297,7 @@ do_compile() { |
301 |
# in parallel. This is not really a perf hit since the source |
302 |
# generation is quite small. |
303 |
emake -j1 sources |
304 |
+ |
305 |
# For some reason, sources depends on pc-files which depends on |
306 |
# compiled libraries which depends on sources which ... |
307 |
# Manually delete the pc-files file so the install step will |
308 |
@@ -313,18 +318,20 @@ multilib_src_install() { |
309 |
"${NCURSES_TARGETS[@]}" \ |
310 |
$(usex tinfo 'tinfow tinfo' '') |
311 |
fi |
312 |
+ |
313 |
if ! tc-is-static-only ; then |
314 |
# Provide a link for -lcurses. |
315 |
ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die |
316 |
fi |
317 |
- # don't delete '*.dll.a', needed for linking #631468 |
318 |
+ |
319 |
+ # Don't delete '*.dll.a', needed for linking, bug #631468 |
320 |
if ! use static-libs; then |
321 |
find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die |
322 |
fi |
323 |
|
324 |
# Build fails to create this ... |
325 |
# -FIXME- |
326 |
- # Ugly hackaround for riscv having two parts libdir (#689240) |
327 |
+ # Ugly hackaround for riscv having two parts libdir (bug #689240) |
328 |
# Replace this hack with an official solution once we have one... |
329 |
# -FIXME- |
330 |
dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \ |
331 |
@@ -332,41 +339,40 @@ multilib_src_install() { |
332 |
} |
333 |
|
334 |
multilib_src_install_all() { |
335 |
-# if ! use berkdb ; then |
336 |
- # We need the basic terminfo files in /etc for embedded/recovery. #37026 |
337 |
- einfo "Installing basic terminfo files in /etc..." |
338 |
- local terms=( |
339 |
- # Dumb/simple values that show up when using the in-kernel VT. |
340 |
- ansi console dumb linux |
341 |
- vt{52,100,102,200,220} |
342 |
- # [u]rxvt users used to be pretty common. Probably should drop this |
343 |
- # since upstream is dead and people are moving away from it. |
344 |
- rxvt{,-unicode}{,-256color} |
345 |
- # xterm users are common, as is terminals re-using/spoofing it. |
346 |
- xterm xterm-{,256}color |
347 |
- # screen is common (and reused by tmux). |
348 |
- screen{,-256color} |
349 |
- screen.xterm-256color |
350 |
- ) |
351 |
- local x |
352 |
- for x in "${terms[@]}"; do |
353 |
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) |
354 |
- local basedir=$(basename "$(dirname "${termfile}")") |
355 |
- |
356 |
- if [[ -n ${termfile} ]] ; then |
357 |
- dodir "/etc/terminfo/${basedir}" |
358 |
- mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die |
359 |
- dosym "../../../../etc/terminfo/${basedir}/${x}" \ |
360 |
- "/usr/share/terminfo/${basedir}/${x}" |
361 |
- fi |
362 |
- done |
363 |
-# fi |
364 |
+ # We need the basic terminfo files in /etc for embedded/recovery, bug #37026 |
365 |
+ einfo "Installing basic terminfo files in /etc..." |
366 |
+ local terms=( |
367 |
+ # Dumb/simple values that show up when using the in-kernel VT. |
368 |
+ ansi console dumb linux |
369 |
+ vt{52,100,102,200,220} |
370 |
+ # [u]rxvt users used to be pretty common. Probably should drop this |
371 |
+ # since upstream is dead and people are moving away from it. |
372 |
+ rxvt{,-unicode}{,-256color} |
373 |
+ # xterm users are common, as is terminals re-using/spoofing it. |
374 |
+ xterm xterm-{,256}color |
375 |
+ # screen is common (and reused by tmux). |
376 |
+ screen{,-256color} |
377 |
+ screen.xterm-256color |
378 |
+ ) |
379 |
+ local x |
380 |
+ for x in "${terms[@]}"; do |
381 |
+ local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) |
382 |
+ local basedir=$(basename "$(dirname "${termfile}")") |
383 |
+ |
384 |
+ if [[ -n ${termfile} ]] ; then |
385 |
+ dodir "/etc/terminfo/${basedir}" |
386 |
+ mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die |
387 |
+ dosym "../../../../etc/terminfo/${basedir}/${x}" \ |
388 |
+ "/usr/share/terminfo/${basedir}/${x}" |
389 |
+ fi |
390 |
+ done |
391 |
|
392 |
echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses |
393 |
|
394 |
use minimal && rm -r "${ED}"/usr/share/terminfo* |
395 |
# Because ncurses5-config --terminfo returns the directory we keep it |
396 |
- keepdir /usr/share/terminfo #245374 |
397 |
+ # bug #245374 |
398 |
+ keepdir /usr/share/terminfo |
399 |
|
400 |
cd "${S}" || die |
401 |
dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc |