1 |
commit: d97ae5090a07627f4dc52d52b585e5c391fcc64e |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 30 03:15:28 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 30 03:15:42 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d97ae509 |
7 |
|
8 |
sys-apps/man-db: add USE=manpager to enable color output #184604 |
9 |
|
10 |
sys-apps/man-db/man-db-2.7.2-r1.ebuild | 95 ++++++++++++++++++++++++++++++++++ |
11 |
sys-apps/man-db/metadata.xml | 3 ++ |
12 |
2 files changed, 98 insertions(+) |
13 |
|
14 |
diff --git a/sys-apps/man-db/man-db-2.7.2-r1.ebuild b/sys-apps/man-db/man-db-2.7.2-r1.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..bf66d38 |
17 |
--- /dev/null |
18 |
+++ b/sys-apps/man-db/man-db-2.7.2-r1.ebuild |
19 |
@@ -0,0 +1,95 @@ |
20 |
+# Copyright 1999-2015 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Id$ |
23 |
+ |
24 |
+EAPI="4" |
25 |
+ |
26 |
+inherit eutils user versionator |
27 |
+ |
28 |
+DESCRIPTION="a man replacement that utilizes berkdb instead of flat files" |
29 |
+HOMEPAGE="http://www.nongnu.org/man-db/" |
30 |
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" |
31 |
+ |
32 |
+LICENSE="GPL-3" |
33 |
+SLOT="0" |
34 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux" |
35 |
+IUSE="berkdb +gdbm +manpager nls selinux static-libs zlib" |
36 |
+ |
37 |
+CDEPEND=">=dev-libs/libpipeline-1.4.0 |
38 |
+ berkdb? ( sys-libs/db ) |
39 |
+ gdbm? ( sys-libs/gdbm ) |
40 |
+ !berkdb? ( !gdbm? ( sys-libs/gdbm ) ) |
41 |
+ sys-apps/groff |
42 |
+ zlib? ( sys-libs/zlib ) |
43 |
+ !sys-apps/man" |
44 |
+DEPEND="${CDEPEND} |
45 |
+ app-arch/xz-utils |
46 |
+ virtual/pkgconfig |
47 |
+ nls? ( |
48 |
+ >=app-text/po4a-0.45 |
49 |
+ sys-devel/gettext |
50 |
+ )" |
51 |
+RDEPEND="${CDEPEND} |
52 |
+ selinux? ( sec-policy/selinux-mandb ) |
53 |
+" |
54 |
+PDEPEND="manpager? ( app-text/manpager )" |
55 |
+ |
56 |
+pkg_setup() { |
57 |
+ # Create user now as Makefile in src_install does setuid/chown |
58 |
+ enewgroup man 15 |
59 |
+ enewuser man 13 -1 /usr/share/man man |
60 |
+ |
61 |
+ if (use gdbm && use berkdb) || (use !gdbm && use !berkdb) ; then #496150 |
62 |
+ ewarn "Defaulting to USE=gdbm due to ambiguous berkdb/gdbm USE flag settings" |
63 |
+ fi |
64 |
+} |
65 |
+ |
66 |
+src_configure() { |
67 |
+ export ac_cv_lib_z_gzopen=$(usex zlib) |
68 |
+ econf \ |
69 |
+ --docdir='$(datarootdir)'/doc/${PF} \ |
70 |
+ --with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d \ |
71 |
+ --enable-setuid \ |
72 |
+ --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \ |
73 |
+ $(use_enable nls) \ |
74 |
+ $(use_enable static-libs static) \ |
75 |
+ --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm)) |
76 |
+ |
77 |
+ # Disable color output from groff so that the manpager can add it. #184604 |
78 |
+ sed -i \ |
79 |
+ -e '/^#DEFINE.*\<[nt]roff\>/{s:^#::;s:$: -c:}' \ |
80 |
+ src/man_db.conf || die |
81 |
+} |
82 |
+ |
83 |
+src_install() { |
84 |
+ default |
85 |
+ dodoc docs/{HACKING,TODO} |
86 |
+ prune_libtool_files |
87 |
+ |
88 |
+ exeinto /etc/cron.daily |
89 |
+ newexe "${FILESDIR}"/man-db.cron man-db #289884 |
90 |
+ |
91 |
+ keepdir /var/cache/man |
92 |
+ fowners man:0 /var/cache/man |
93 |
+ fperms 2755 /var/cache/man |
94 |
+} |
95 |
+ |
96 |
+pkg_preinst() { |
97 |
+ if [[ -f ${EROOT}var/cache/man/whatis ]] ; then |
98 |
+ einfo "Cleaning ${EROOT}var/cache/man from sys-apps/man" |
99 |
+ find "${EROOT}"var/cache/man -type f '!' '(' -name index.bt -o -name index.db ')' -delete |
100 |
+ fi |
101 |
+ if [[ ! -g ${EROOT}var/cache/man ]] ; then |
102 |
+ einfo "Resetting permissions on ${EROOT}var/cache/man" #447944 |
103 |
+ mkdir -p "${EROOT}var/cache/man" |
104 |
+ chown -R man:0 "${EROOT}"var/cache/man |
105 |
+ find "${EROOT}"var/cache/man -type d '!' -perm /g=s -exec chmod 2755 {} + |
106 |
+ fi |
107 |
+} |
108 |
+ |
109 |
+pkg_postinst() { |
110 |
+ if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 7 ]] ; then |
111 |
+ einfo "Rebuilding man-db from scratch with new database format!" |
112 |
+ mandb --quiet --create |
113 |
+ fi |
114 |
+} |
115 |
|
116 |
diff --git a/sys-apps/man-db/metadata.xml b/sys-apps/man-db/metadata.xml |
117 |
index 96a2d58..7f3c55c 100644 |
118 |
--- a/sys-apps/man-db/metadata.xml |
119 |
+++ b/sys-apps/man-db/metadata.xml |
120 |
@@ -2,4 +2,7 @@ |
121 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
122 |
<pkgmetadata> |
123 |
<herd>base-system</herd> |
124 |
+<use> |
125 |
+ <flag name='manpager'>Enable manpager wrapper for colorizing output</flag> |
126 |
+</use> |
127 |
</pkgmetadata> |