Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/, /
Date: Wed, 30 Nov 2022 22:29:09
Message-Id: 1669847338.669b3d757cd287e193c04f910b5ebc8b74ad35b7.sam@gentoo
1 commit: 669b3d757cd287e193c04f910b5ebc8b74ad35b7
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 30 11:24:49 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 30 22:28:58 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=669b3d75
7
8 Make EAPI 8 `--disable-static` logic libtool-specific
9
10 * The intention has always been to only target `configure` scripts that use
11 libtool, not just any script with a `--disable-static*` option.
12
13 * libtool has been using the same `configure` format for at least
14 the past 15 years (going back to libtool 1.5.22):
15
16 1. shared and static libraries enabled (the main use case):
17 --enable-shared[=PKGS] build shared libraries [default=yes]
18 --enable-static[=PKGS] build static libraries [default=yes]
19
20 2. shared libraries enabled and static libraries disabled:
21 --enable-static[=PKGS] build static libraries [default=no]
22 --enable-shared[=PKGS] build shared libraries [default=yes]
23
24 3. shared libraries disabled and static libraries enabled:
25 --enable-shared[=PKGS] build shared libraries [default=no]
26 --enable-static[=PKGS] build static libraries [default=yes]
27
28 Bug: https://bugs.gentoo.org/814380
29 Signed-off-by: David Seifert <soap <AT> gentoo.org>
30 Closes: https://github.com/gentoo/portage/pull/936
31 Signed-off-by: Sam James <sam <AT> gentoo.org>
32
33 NEWS | 4 ++++
34 bin/phase-helpers.sh | 4 ++--
35 2 files changed, 6 insertions(+), 2 deletions(-)
36
37 diff --git a/NEWS b/NEWS
38 index 57d9c92ee..923b95a43 100644
39 --- a/NEWS
40 +++ b/NEWS
41 @@ -49,6 +49,10 @@ Bug fixes:
42 * env-update: Also generate PATH definition in systemd user environment file
43 /etc/environment.d/10-gentoo-env.conf
44
45 +* --disable-static is only passed for libtool-enabled configure scripts in EAPI 8.
46 + This avoids annoying warnings when a configure script has a flag such as
47 + --disable-static_link that would then trigger a QA warning (bug #814380).
48 +
49 portage-3.0.39 (2022-11-20)
50 --------------
51
52
53 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
54 index 2217e5a0b..a0fe599fd 100644
55 --- a/bin/phase-helpers.sh
56 +++ b/bin/phase-helpers.sh
57 @@ -655,8 +655,8 @@ econf() {
58 fi
59
60 if ___eapi_econf_passes_--disable-static; then
61 - if [[ ${conf_help} == *--disable-static* || \
62 - ${conf_help} == *--enable-static* ]]; then
63 + if [[ ${conf_help} == *--enable-shared[^A-Za-z0-9+_.-]* &&
64 + ${conf_help} == *--enable-static[^A-Za-z0-9+_.-]* ]]; then
65 conf_args+=( --disable-static )
66 fi
67 fi