From 13c65659bbc9bc59314e972b69578014711663c3 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Sat, 14 Aug 2021 12:51:09 -0400 Subject: net-ftp/vsftpd: fix build on musl Closes: https://bugs.gentoo.org/713952 Signed-off-by: Mike Gilbert --- net-ftp/vsftpd/vsftpd-3.0.5.ebuild | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'net-ftp') diff --git a/net-ftp/vsftpd/vsftpd-3.0.5.ebuild b/net-ftp/vsftpd/vsftpd-3.0.5.ebuild index b452dee49a00..b63d380bf321 100644 --- a/net-ftp/vsftpd/vsftpd-3.0.5.ebuild +++ b/net-ftp/vsftpd/vsftpd-3.0.5.ebuild @@ -12,7 +12,7 @@ SRC_URI="https://security.appspot.com/downloads/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="pam ssl tcpd" +IUSE="elibc_musl pam ssl tcpd" DEPEND=" >=sys-libs/libcap-2 @@ -36,11 +36,11 @@ src_prepare() { } define() { - sed -i -e "/#undef $1/c#define $1" "${S}"/builddefs.h || die + sed -i -e "/#undef $2/c#define $2${3:+ }$3" "$1" || die } undef() { - sed -i -e "/#define $1/c#undef $1" "${S}"/builddefs.h || die + sed -i -e "/#define $2/c#undef $2" "$1" || die } src_configure() { @@ -49,19 +49,25 @@ src_configure() { if use pam; then libs+=( -lpam ) else - undef VSF_BUILD_PAM + undef builddefs.h VSF_BUILD_PAM libs+=( -lcrypt ) fi if use ssl; then - define VSF_BUILD_SSL + define builddefs.h VSF_BUILD_SSL libs+=( -lcrypto -lssl ) fi if use tcpd; then - define VSF_BUILD_TCPWRAPPERS + define builddefs.h VSF_BUILD_TCPWRAPPERS libs+=( -lwrap ) fi + + if use elibc_musl; then + # musl does not support utmp/wtmp + # https://bugs.gentoo.org/713952 + undef sysdeputil.c VSF_SYSDEP_HAVE_UTMPX + fi } src_compile() { -- cgit v1.2.3-65-gdbad