Gentoo Archives: gentoo-portage-dev

From: David Seifert <soap@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Fixing EAPI 8 --enable-static once and for all
Date: Sat, 19 Nov 2022 03:12:23
Message-Id: 20221119031208.2761011-1-soap@gentoo.org
1 Attached a patch to finally fix https://bugs.gentoo.org/814380.
2
3 When I opened the bug, it was clear that I intended to only disable
4 static libtool archive building. Unfortunately, I hadn't done the
5 necessary due diligence, and it turns out how we detect the
6 "--enable-static" flag is overly broad and leads to a sizable number of
7 false positives in EAPI 8.
8
9 I have 937 EAPI 8 packages on my machine, and in 0 cases does my patch
10 now produce static libraries where none were produced before, while it
11 successfully reduces the annoying QA warnings on packages that don't use
12 libtool or use the flag for different purposes:
13
14 1. packages that have an "off-target"/false-positive flag triggering
15 the current logic:
16
17 dev-libs/nspr-4.35
18 --enable-static-rtl Use the MSVC static runtime library
19 sys-fs/lvm2-2.03.16
20 --enable-static_link use this to link the tools to their libraries
21
22 2. packages with a real --{dis,en}able-static flag, but with semantics
23 that don't actually disable building of static-libs:
24
25 dev-util/strace-5.19
26 --enable-static link strace statically
27 sys-process/htop-3.2.1
28 --enable-static build a static htop binary [default=no]
29 media-video/mkvtoolnix-71.1.0
30 --enable-static make a static build of the applications (no)
31 --enable-static-qt link to static versions of the Qt library (no)
32
33 dev-util/strace has a $(use_enable static) option, and the other two are
34 default disabled. Hence in all of these cases, the patch does not change
35 the build output.
36
37 3. packages with a --{dis,en}able-static flag that controls building of
38 static libraries, but with a slightly different --help output that
39 doesn't trigger the updated glob anymore:
40
41 dev-libs/icu-72.1
42 --enable-static build static libraries default=no
43 dev-libs/nettle-3.8.1
44 --disable-static Do not build any static library
45 net-print/cups-2.4.2
46 --enable-static install static libraries
47
48 All of these packages pass a $(use_enable static-libs static) option,
49 hence none of them would be affected by the missing --disable-static.
50
51 With this extensive analysis, I believe this patch to be safe.

Replies