Gentoo Archives: gentoo-portage-dev

From: David Seifert <soap@g.o>
To: gentoo-portage-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-portage-dev] [PATCH] Make EAPI 8 `--disable-static` logic libtool-specific
Date: Sat, 19 Nov 2022 03:12:26
Message-Id: 20221119031208.2761011-2-soap@gentoo.org
In Reply to: [gentoo-portage-dev] Fixing EAPI 8 --enable-static once and for all by David Seifert
1 * The intention has always been to only target `configure` scripts that use
2 libtool, not just any script with a `--disable-static*` option.
3
4 * libtool has been using the same `configure` format for at least
5 the past 15 years (going back to libtool 1.5.22):
6
7 1. shared and static libraries enabled (the main use case):
8 --enable-shared[=PKGS] build shared libraries [default=yes]
9 --enable-static[=PKGS] build static libraries [default=yes]
10
11 2. shared libraries enabled and static libraries disabled:
12 --enable-static[=PKGS] build static libraries [default=no]
13 --enable-shared[=PKGS] build shared libraries [default=yes]
14
15 3. shared libraries disabled and static libraries enabled:
16 --enable-shared[=PKGS] build shared libraries [default=no]
17 --enable-static[=PKGS] build static libraries [default=yes]
18
19 Bug: https://bugs.gentoo.org/814380
20 ---
21 bin/phase-helpers.sh | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
23
24 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
25 index 2217e5a0b..6f691f6ff 100644
26 --- a/bin/phase-helpers.sh
27 +++ b/bin/phase-helpers.sh
28 @@ -655,8 +655,8 @@ econf() {
29 fi
30
31 if ___eapi_econf_passes_--disable-static; then
32 - if [[ ${conf_help} == *--disable-static* || \
33 - ${conf_help} == *--enable-static* ]]; then
34 + if [[ ${conf_help} == *--enable-shared\[=PKGS\]* &&
35 + ${conf_help} == *--enable-static\[=PKGS\]* ]]; then
36 conf_args+=( --disable-static )
37 fi
38 fi
39 --
40 2.38.1