Gentoo Archives: gentoo-dev

From: konsolebox <konsolebox@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] tinfo flag
Date: Tue, 06 Dec 2016 18:02:07
Message-Id: CAJnmqwaPuR_j0SF5jPE3B8meM=_K+twdLrvo3EvvaeTF9fm1pw@mail.gmail.com
In Reply to: Re: [gentoo-dev] tinfo flag by Ian Stakenvicius
1 On Wed, Dec 7, 2016 at 1:12 AM, Ian Stakenvicius <axs@g.o> wrote:
2 > On 05/12/16 06:13 AM, konsolebox wrote:
3 >> Hi,
4 >>
5 >> Please consider promoting the use of tinfo flag in packages that
6 >> depend on sys-libs/ncurses so that they would synchronize properly
7 >> with sys-libs/ncurses[tinfo].
8 >>
9 >> It could be as simple as:
10 >>
11 >> IUSE="tinfo"
12 >>
13 >> RDEPEND="sys-libs/ncurses[tinfo=]"
14 >>
15 >> pkg_setup() {
16 >> use tinfo && export LDFLAGS="-ltinfo ${LDFLAGS}" LIBS="-ltinfo ${LIBS}"
17 >> }
18 >>
19 >> The last line can be changed/enhanced, depending on the package.
20 >>
21 >> It helps keep binaries consistent even if sys-libs/ncurses[-tinfo]
22 >> gets recompiled to sys-libs/ncurses[tinfo], because they are forced to
23 >> be recompiled. This is better than hard-coded dynamic workarounds.
24 >>
25 >
26 > Should this message perhaps have been directed to a particular set of
27 > developers or package maintainers rather than everyone on this list?
28
29 Sorry, I just thought it's better to send it to the list first. I
30 already created a bug report for it (#601764). It was rejected right
31 away for a reason not related to the main point. I also made a reply
32 in #457530.
33
34 > I'm not sure what our stance is on propagating USE flags to rdeps when
35 > the package itself doesn't care (except due to the --libs output
36 > changing from pkg-config). I feel that adding tinfo to IUSE the way
37 > it's suggested here might be the only technical solution right now,
38 > but at the same time it seems like something that might be better
39 > suited to something that should be addressed through other mechanisms
40 > in a future-EAPI...
41
42 Yes I thought a better solution can be provided in a future EAPI, like
43 perhaps a force-rebuild-everything-that-depends-on-the-package-if-flag-usage-changes,
44 but I'd rather not wait for it. A new mechanism like that might also
45 force rebuilding of packages that don't rely on the features of
46 libtinfo. An explicit declaration that a package wants tinfo like
47 sys-libs/ncurses[tinfo=] is better.
48
49 > Note in particular though that the pkg_setup example ISN'T imo a good
50 > idea -- rather, pkg-config should be used, as it will return the
51 > appropriate --libs output whether ncurses is built with USE=tinfo
52 > enabled or not.
53
54 Yes, I also said in my reply that pkg-config can be used for more accuracy.
55
56 --
57 konsolebox