From bcec6d270db805b7a0dce828090e52b6df106f3e Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Mon, 19 Mar 2018 23:09:28 +0100 Subject: sys-apps/man: prefix support Package-Manager: Portage-2.3.24, Repoman-2.3.6 --- sys-apps/man/man-1.6g-r1.ebuild | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/sys-apps/man/man-1.6g-r1.ebuild b/sys-apps/man/man-1.6g-r1.ebuild index 7d91bb1345a0..1a296cf7f7f5 100644 --- a/sys-apps/man/man-1.6g-r1.ebuild +++ b/sys-apps/man/man-1.6g-r1.ebuild @@ -3,7 +3,7 @@ EAPI="4" -inherit eutils toolchain-funcs user +inherit eutils prefix toolchain-funcs user DESCRIPTION="Standard commands to read man pages" HOMEPAGE="http://primates.ximian.com/~flucifredi/man/" @@ -64,13 +64,24 @@ src_configure() { fi export COMPRESS if use lzma ; then - COMPRESS=/usr/bin/xz + COMPRESS="${EPREFIX}"/usr/bin/xz else - COMPRESS=/bin/bzip2 + COMPRESS="${EPREFIX}"/bin/bzip2 fi + + if [[ -n ${EPREFIX} ]]; then + hprefixify configure || die + sed -i \ + -e "s/man_user=root/man_user=$(id -u)/" \ + -e "s/man_group=man/man_group=$(id -g)/" \ + configure || die "Failed to disable suid/sgid options for man" + sed -i -e 's:/usr/bin:@bindir@:' man2html/Makefile.in || die + fi + echoit \ ./configure \ - -confdir=/etc \ + -bindir="${EPREFIX}"/usr/bin \ + -confdir="${EPREFIX}"/etc \ +sgid +fhs \ +lang ${mylang} \ || die "configure failed" @@ -89,8 +100,8 @@ src_install() { newexe "${FILESDIR}"/makewhatis.cron makewhatis keepdir /var/cache/man - diropts -m0775 -g man - local mansects=$(grep ^MANSECT "${D}"/etc/man.conf | cut -f2-) + [[ -z ${EPREFIX} ]] && diropts -m0775 -g man + local mansects=$(grep ^MANSECT "${ED}"/etc/man.conf | cut -f2-) for x in ${mansects//:/ } ; do keepdir /var/cache/man/cat${x} done -- cgit v1.2.3-65-gdbad