summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2021-12-14 12:00:20 +0000
committerMarek Szuba <marecki@gentoo.org>2021-12-14 12:05:53 +0000
commitd0c412924396549a56cbbf19d4b27514abcafa84 (patch)
tree4dc1bd2ac5f6f9234b50855eadd37b7b150a10b2 /dev-libs/libptytty
parentdev-lang/ghc: fix build with autoconf 2.71 (diff)
downloadgentoo-d0c412924396549a56cbbf19d4b27514abcafa84.tar.gz
gentoo-d0c412924396549a56cbbf19d4b27514abcafa84.tar.bz2
gentoo-d0c412924396549a56cbbf19d4b27514abcafa84.zip
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@gentoo.org>
Diffstat (limited to 'dev-libs/libptytty')
-rw-r--r--dev-libs/libptytty/libptytty-2.0.ebuild14
1 files changed, 14 insertions, 0 deletions
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
+}