Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/musl/
Date: Sat, 10 Sep 2022 11:28:35
Message-Id: 1662809282.fbdcef42c8f58fdd5175f2130afd56b8e42ef226.sam@gentoo
1 commit: fbdcef42c8f58fdd5175f2130afd56b8e42ef226
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 8 03:21:04 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 10 11:28:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbdcef42
7
8 sys-libs/musl: add USE=crypt for libxcrypt support
9
10 Add USE=crypt to allow enabling/disabling crypt.h installation
11 (to allow sys-libs/libxcrypt[system] usage). Many things are starting
12 to want functions from libxcrypt itself (additional functions and
13 algorithms).
14
15 musl isn't removing crypt.h (and the relevant functions from its libc),
16 unlike glibc, but we need to allow disabling the installation of crypt.h
17 to allow libxcrypt[system] usage (which provides crypt.h & libcrypt.so
18 instead, with more functionality).
19
20 This brings musl in line with the changes we made for glibc a while
21 ago. The situation with glibc is a bit different because the migration
22 is mandatory there, while we're just strongly recommending it for musl
23 because sys-libs/libxcrypt[-system] causes headaches (see linked
24 PAM bug for an example, but I've also hit a similar issue with Python
25 yesterday).
26
27 Bug: https://bugs.gentoo.org/867991
28 Bug: https://bugs.gentoo.org/699422
29 Signed-off-by: Sam James <sam <AT> gentoo.org>
30
31 sys-libs/musl/{musl-9999.ebuild => musl-1.2.3-r1.ebuild} | 10 +++++++++-
32 sys-libs/musl/musl-9999.ebuild | 10 +++++++++-
33 2 files changed, 18 insertions(+), 2 deletions(-)
34
35 diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-1.2.3-r1.ebuild
36 similarity index 95%
37 copy from sys-libs/musl/musl-9999.ebuild
38 copy to sys-libs/musl/musl-1.2.3-r1.ebuild
39 index 07ab1388cef8..fedb9137f4cb 100644
40 --- a/sys-libs/musl/musl-9999.ebuild
41 +++ b/sys-libs/musl/musl-1.2.3-r1.ebuild
42 @@ -35,13 +35,16 @@ fi
43
44 DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
45 HOMEPAGE="https://musl.libc.org"
46 +
47 LICENSE="MIT LGPL-2 GPL-2"
48 SLOT="0"
49 -IUSE="headers-only"
50 +IUSE="crypt headers-only"
51
52 QA_SONAME="/usr/lib/libc.so"
53 QA_DT_NEEDED="/usr/lib/libc.so"
54
55 +RDEPEND="crypt? ( sys-libs/libxcrypt[system] )"
56 +
57 is_crosscompile() {
58 [[ ${CHOST} != ${CTARGET} ]]
59 }
60 @@ -131,6 +134,11 @@ src_install() {
61 local ldso=$(basename "${ED}"${sysroot}/lib/ld-musl-*)
62 dosym ${EPREFIX}${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
63
64 + if ! use crypt ; then
65 + # Allow sys-libs/libxcrypt[system] to provide it instead
66 + rm "${ED}"/usr/include/crypt.h || die
67 + fi
68 +
69 if [[ ${CATEGORY} != cross-* ]] ; then
70 # Fish out of config:
71 # ARCH = ...
72
73 diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
74 index 07ab1388cef8..fedb9137f4cb 100644
75 --- a/sys-libs/musl/musl-9999.ebuild
76 +++ b/sys-libs/musl/musl-9999.ebuild
77 @@ -35,13 +35,16 @@ fi
78
79 DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
80 HOMEPAGE="https://musl.libc.org"
81 +
82 LICENSE="MIT LGPL-2 GPL-2"
83 SLOT="0"
84 -IUSE="headers-only"
85 +IUSE="crypt headers-only"
86
87 QA_SONAME="/usr/lib/libc.so"
88 QA_DT_NEEDED="/usr/lib/libc.so"
89
90 +RDEPEND="crypt? ( sys-libs/libxcrypt[system] )"
91 +
92 is_crosscompile() {
93 [[ ${CHOST} != ${CTARGET} ]]
94 }
95 @@ -131,6 +134,11 @@ src_install() {
96 local ldso=$(basename "${ED}"${sysroot}/lib/ld-musl-*)
97 dosym ${EPREFIX}${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
98
99 + if ! use crypt ; then
100 + # Allow sys-libs/libxcrypt[system] to provide it instead
101 + rm "${ED}"/usr/include/crypt.h || die
102 + fi
103 +
104 if [[ ${CATEGORY} != cross-* ]] ; then
105 # Fish out of config:
106 # ARCH = ...