summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-05 03:22:36 +0100
committerSam James <sam@gentoo.org>2022-09-05 03:22:36 +0100
commitd9a5223420c777c1edde14239f812d788d8848e7 (patch)
treec16ad124f20e19f542f97047bf2732a51bf5c3c7 /sys-libs/pam
parentsys-devel/gcc: add 13.0.0_pre20220904 (diff)
downloadgentoo-d9a5223420c777c1edde14239f812d788d8848e7.tar.gz
gentoo-d9a5223420c777c1edde14239f812d788d8848e7.tar.bz2
gentoo-d9a5223420c777c1edde14239f812d788d8848e7.zip
sys-libs/pam: workaround build failures on musl w/ sys-libs/libxcrypt[compat]
Closes: https://bugs.gentoo.org/867991 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/pam')
-rw-r--r--sys-libs/pam/pam-1.5.2-r2.ebuild15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys-libs/pam/pam-1.5.2-r2.ebuild b/sys-libs/pam/pam-1.5.2-r2.ebuild
index 428087494c40..5a8c46443f0d 100644
--- a/sys-libs/pam/pam-1.5.2-r2.ebuild
+++ b/sys-libs/pam/pam-1.5.2-r2.ebuild
@@ -9,7 +9,7 @@ MY_P="Linux-${PN^^}-${PV}"
# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
TMPFILES_OPTIONAL=1
-inherit autotools db-use fcaps toolchain-funcs usr-ldscript multilib-minimal
+inherit autotools db-use fcaps flag-o-matic toolchain-funcs usr-ldscript multilib-minimal
DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
HOMEPAGE="https://github.com/linux-pam/linux-pam"
@@ -59,6 +59,19 @@ multilib_src_configure() {
# Do not let user's BROWSER setting mess us up. #549684
unset BROWSER
+ # This whole weird has_version libxcrypt block can go once
+ # musl systems have libxcrypt[system] if we ever make
+ # that mandatory. See bug #867991.
+ if use elibc_musl && ! has_version sys-libs/libxcrypt[system] ; then
+ # Avoid picking up symbol-versioned compat symbol on musl systems
+ export ac_cv_search_crypt_gensalt_rn=no
+
+ # Need to avoid picking up the libxcrypt headers which define
+ # CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY.
+ cp "${ESYSROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ append-cppflags -I"${T}"
+ fi
+
local myconf=(
CC_FOR_BUILD="$(tc-getBUILD_CC)"
--with-db-uniquename=-$(db_findver sys-libs/db)