Gentoo Archives: gentoo-commits

From: Guilherme Amadio <amadio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/man/
Date: Thu, 22 Mar 2018 14:24:41
Message-Id: 1521728608.bcec6d270db805b7a0dce828090e52b6df106f3e.amadio@gentoo
1 commit: bcec6d270db805b7a0dce828090e52b6df106f3e
2 Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 19 22:09:28 2018 +0000
4 Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 22 14:23:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcec6d27
7
8 sys-apps/man: prefix support
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 sys-apps/man/man-1.6g-r1.ebuild | 23 +++++++++++++++++------
13 1 file changed, 17 insertions(+), 6 deletions(-)
14
15 diff --git a/sys-apps/man/man-1.6g-r1.ebuild b/sys-apps/man/man-1.6g-r1.ebuild
16 index 7d91bb1345a..1a296cf7f7f 100644
17 --- a/sys-apps/man/man-1.6g-r1.ebuild
18 +++ b/sys-apps/man/man-1.6g-r1.ebuild
19 @@ -3,7 +3,7 @@
20
21 EAPI="4"
22
23 -inherit eutils toolchain-funcs user
24 +inherit eutils prefix toolchain-funcs user
25
26 DESCRIPTION="Standard commands to read man pages"
27 HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
28 @@ -64,13 +64,24 @@ src_configure() {
29 fi
30 export COMPRESS
31 if use lzma ; then
32 - COMPRESS=/usr/bin/xz
33 + COMPRESS="${EPREFIX}"/usr/bin/xz
34 else
35 - COMPRESS=/bin/bzip2
36 + COMPRESS="${EPREFIX}"/bin/bzip2
37 fi
38 +
39 + if [[ -n ${EPREFIX} ]]; then
40 + hprefixify configure || die
41 + sed -i \
42 + -e "s/man_user=root/man_user=$(id -u)/" \
43 + -e "s/man_group=man/man_group=$(id -g)/" \
44 + configure || die "Failed to disable suid/sgid options for man"
45 + sed -i -e 's:/usr/bin:@bindir@:' man2html/Makefile.in || die
46 + fi
47 +
48 echoit \
49 ./configure \
50 - -confdir=/etc \
51 + -bindir="${EPREFIX}"/usr/bin \
52 + -confdir="${EPREFIX}"/etc \
53 +sgid +fhs \
54 +lang ${mylang} \
55 || die "configure failed"
56 @@ -89,8 +100,8 @@ src_install() {
57 newexe "${FILESDIR}"/makewhatis.cron makewhatis
58
59 keepdir /var/cache/man
60 - diropts -m0775 -g man
61 - local mansects=$(grep ^MANSECT "${D}"/etc/man.conf | cut -f2-)
62 + [[ -z ${EPREFIX} ]] && diropts -m0775 -g man
63 + local mansects=$(grep ^MANSECT "${ED}"/etc/man.conf | cut -f2-)
64 for x in ${mansects//:/ } ; do
65 keepdir /var/cache/man/cat${x}
66 done