commit: d0c412924396549a56cbbf19d4b27514abcafa84 Author: Marek Szuba <marecki <AT> gentoo <DOT> org> AuthorDate: Tue Dec 14 12:00:20 2021 +0000 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> CommitDate: Tue Dec 14 12:05:53 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0c41292
dev-libs/libptytty: fix compilation against musl musl does not define _PATH_{LASTLOGX,UTMPX,WTMPX} so use the upstream-provided CMake arguments to define them ourselves, using the same path convention as what musl headers put in _PATH_{LASTLOG,UTMP,WTMP}. Extra quotes are important, as said variables are currently injected verbatim into headers and hilarity ensues if they are not quoted. Closes: https://bugs.gentoo.org/828923 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> dev-libs/libptytty/libptytty-2.0.ebuild | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dev-libs/libptytty/libptytty-2.0.ebuild b/dev-libs/libptytty/libptytty-2.0.ebuild index 5494e30f17a7..69ee5277a255 100644 --- a/dev-libs/libptytty/libptytty-2.0.ebuild +++ b/dev-libs/libptytty/libptytty-2.0.ebuild @@ -12,9 +12,23 @@ SRC_URI="http://dist.schmorp.de/${PN}/${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="elibc_musl" PATCHES=( "${FILESDIR}"/${PN}-2.0-rundir.patch ) DOCS=( Changes README ) + +src_configure() { + # Bug #828923 + local mycmakeargs=() + if use elibc_musl; then + mycmakeargs+=( + -DPT_LASTLOGX_FILE="\"/dev/null/lastlogx\"" + -DPT_WTMPX_FILE="\"/dev/null/wtmpx\"" + ) + fi + + cmake_src_configure +}