Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 616776
Collapse All | Expand All

(-)a/app-text/mandoc/files/mandoc.cron (+6 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# we need this to have the right MANPATH set
4
. /etc/profile
5
6
exec nice makewhatis
(-)a/app-text/mandoc/mandoc-1.14.5.ebuild (-14 / +24 lines)
Lines 12-32 SRC_URI="http://mdocml.bsd.lv/snapshots/${P}.tar.gz" Link Here
12
LICENSE="ISC"
12
LICENSE="ISC"
13
SLOT="0"
13
SLOT="0"
14
KEYWORDS="~amd64 ~x86"
14
KEYWORDS="~amd64 ~x86"
15
IUSE="static"
15
IUSE="+cron static"
16
16
17
LIB_DEPEND="sys-libs/zlib[static-libs(+)]"
17
LIB_DEPEND="sys-libs/zlib[static-libs(+)]"
18
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
18
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
19
		 !sys-apps/man-db !sys-apps/man"
19
DEPEND="${RDEPEND}
20
DEPEND="${RDEPEND}
20
	static? ( ${LIB_DEPEND} )"
21
	static? ( ${LIB_DEPEND} )"
21
22
22
src_prepare() {
23
src_prepare() {
23
	default
24
	default
24
25
25
	# The db-install change is to support parallel installs.
26
	sed -i -e '/ar rs/s:ar:$(AR):' Makefile || die
26
	sed -i \
27
		-e '/ar rs/s:ar:$(AR):' \
28
		-e '/^db-install:/s:$: base-install:' \
29
		Makefile || die
30
27
31
	cat <<-EOF > "configure.local"
28
	cat <<-EOF > "configure.local"
32
		PREFIX="${EPREFIX}/usr"
29
		PREFIX="${EPREFIX}/usr"
Lines 38-54 src_prepare() { Link Here
38
		EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc"
35
		EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc"
39
		MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man"
36
		MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man"
40
37
41
		BINM_MAN=mman
42
		BINM_SOELIM=msoelim
38
		BINM_SOELIM=msoelim
43
		BINM_APROPOS=mapropos
44
		BINM_WHATIS=mwhatis
45
		BINM_MAKEWHATIS=mmakewhatis
46
		MANM_MAN=mandoc_man
39
		MANM_MAN=mandoc_man
47
		MANM_MDOC=mandoc_mdoc
40
		MANM_MDOC=mandoc_mdoc
48
		MANM_ROFF=mandoc_roff
41
		MANM_ROFF=mandoc_roff
49
		MANM_EQN=mandoc_eqn
50
		MANM_TBL=mandoc_tbl
51
		MANM_MANCONF=mman.conf
52
42
53
		CFLAGS="${CFLAGS} ${CPPFLAGS}"
43
		CFLAGS="${CFLAGS} ${CPPFLAGS}"
54
		LDFLAGS="${LDFLAGS} $(usex static -static '')"
44
		LDFLAGS="${LDFLAGS} $(usex static -static '')"
Lines 58-60 src_prepare() { Link Here
58
		STATIC=
48
		STATIC=
59
	EOF
49
	EOF
60
}
50
}
51
52
src_install() {
53
	default
54
55
	if use cron; then
56
		exeinto /etc/cron.daily
57
		newexe "${FILESDIR}"/mandoc.cron mandoc
58
	fi
59
}
60
61
pkg_postinst() {
62
	elog "In order to enable mandoc's apropos and man -k functionality,"
63
	elog "the appropriate mandoc.db files need to be created. This can"
64
	elog "be achieved by running makewhatis as root (Note: sudo will not"
65
	elog "work, as it does not preserve the MANPATH environment variable"
66
	elog "by default)."
67
	elog
68
	elog "If the cron use-flag is enabled, a cron.daily entry that calls"
69
	elog "makewhatis will be installed."
70
}
(-)a/app-text/mandoc/metadata.xml (+3 lines)
Lines 4-7 Link Here
4
<maintainer type="project">
4
<maintainer type="project">
5
	<email>base-system@gentoo.org</email>
5
	<email>base-system@gentoo.org</email>
6
</maintainer>
6
</maintainer>
7
<use>
8
	<flag name="cron">Set up a cron script that updates mandoc.db files for apropos support.</flag>
9
</use>
7
</pkgmetadata>
10
</pkgmetadata>

Return to bug 616776