Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mandoc/
Date: Wed, 29 Sep 2021 13:05:30
Message-Id: 1632920719.fef29dc3806e6e1950a7884f82794451f1182e95.polynomial-c@gentoo
1 commit: fef29dc3806e6e1950a7884f82794451f1182e95
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 29 13:05:08 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 29 13:05:19 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fef29dc3
7
8 app-text/mandoc: Bump to version 1.14.6
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 app-text/mandoc/Manifest | 1 +
13 app-text/mandoc/mandoc-1.14.6.ebuild | 124 +++++++++++++++++++++++++++++++++++
14 2 files changed, 125 insertions(+)
15
16 diff --git a/app-text/mandoc/Manifest b/app-text/mandoc/Manifest
17 index f44b4b353ca..a8738ed240b 100644
18 --- a/app-text/mandoc/Manifest
19 +++ b/app-text/mandoc/Manifest
20 @@ -1 +1,2 @@
21 DIST mandoc-1.14.5.tar.gz 651846 BLAKE2B 27aaf97e7226e989b33861d2a255304bb64a7cd43ca026568f4b044035241c3315a0d73673b023d9ca5b80575b8c584889832bbd86b80aaa49bb785b37559367 SHA512 848f290847f3095757f25647e6d73eb7044018b145bf6f9dc8b5db164b1421911efdc5b3b9022ec3a2c5af9687a84d5acedee810f2bd2f7caaa9242dadb2cc52
22 +DIST mandoc-1.14.6.tar.gz 697150 BLAKE2B e9f6087e9df977901815b1231f68e381502c7392b0ac65a060ce0ef270da3b76540a17931a076b700865a02f9ca1a8ca044a54dbf6318756931c29e6b1deb228 SHA512 54286070812a47b629f68757046d3c9a1bdd2b5d1c3b84a5c8e4cb92f1331afa745443f7238175835d8cfbe5b8dd442e00c75c3a5b5b8f8efd8d2ec8f636dad4
23
24 diff --git a/app-text/mandoc/mandoc-1.14.6.ebuild b/app-text/mandoc/mandoc-1.14.6.ebuild
25 new file mode 100644
26 index 00000000000..c533b6e8298
27 --- /dev/null
28 +++ b/app-text/mandoc/mandoc-1.14.6.ebuild
29 @@ -0,0 +1,124 @@
30 +# Copyright 1999-2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit toolchain-funcs
36 +
37 +DESCRIPTION="Suite of tools compiling mdoc and man"
38 +HOMEPAGE="https://mdocml.bsd.lv/"
39 +SRC_URI="https://mdocml.bsd.lv/snapshots/${P}.tar.gz"
40 +
41 +LICENSE="ISC"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
44 +IUSE="cgi system-man"
45 +
46 +RDEPEND="sys-libs/zlib
47 + system-man? ( !sys-apps/man-db )
48 +"
49 +DEPEND="${RDEPEND}
50 + cgi? ( sys-libs/zlib[static-libs] )
51 +"
52 +BDEPEND="
53 + cgi? ( app-text/highlight )
54 +"
55 +
56 +PATCHES=(
57 + "${FILESDIR}"/${PN}-1.14.5-r1-www-install.patch
58 +)
59 +
60 +pkg_pretend() {
61 + if use system-man ; then
62 + # only support uncompressed and gzip
63 + [[ -n ${PORTAGE_COMPRESS+unset} ]] && \
64 + [[ "${PORTAGE_COMPRESS}" == "gzip" || "${PORTAGE_COMPRESS}" == "" ]] || \
65 + ewarn "only PORTAGE_COMPRESS=gzip or '' is supported, man pages will not be indexed"
66 + fi
67 +}
68 +
69 +src_prepare() {
70 + default
71 +
72 + # The db-install change is to support parallel installs.
73 + sed -i \
74 + -e '/ar rs/s:ar:$(AR):' \
75 + -e '/^db-install:/s:$: base-install:' \
76 + Makefile || die
77 +
78 + # make-4.3 doesn't like the CC line (bug #706024)
79 + # and "echo -n" is not portable
80 + sed \
81 + -e "s@^\(CC=\).*\$@\1\"$(tc-getCC)\"@" \
82 + -e 's@echo -n@printf@g' \
83 + -i configure || die
84 +
85 + cat <<-EOF > "configure.local"
86 + PREFIX="${EPREFIX}/usr"
87 + BINDIR="${EPREFIX}/usr/bin"
88 + SBINDIR="${EPREFIX}/usr/sbin"
89 + LIBDIR="${EPREFIX}/usr/$(get_libdir)"
90 + MANDIR="${EPREFIX}/usr/share/man"
91 + INCLUDEDIR="${EPREFIX}/usr/include/mandoc"
92 + EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc"
93 + MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man"
94 +
95 + CFLAGS="${CFLAGS} ${CPPFLAGS}"
96 + LDFLAGS="${LDFLAGS}"
97 + AR="$(tc-getAR)"
98 + CC="$(tc-getCC)"
99 + # The STATIC variable is only used by man.cgi.
100 + STATIC=
101 +
102 + # conflicts with sys-apps/groff
103 + BINM_SOELIM=msoelim
104 + MANM_ROFF=mandoc_roff
105 + # conflicts with sys-apps/man-pages
106 + MANM_MAN=mandoc_man
107 +
108 + # fix utf-8 locale on musl
109 + $(usex elibc_musl UTF8_LOCALE=C.UTF-8 '')
110 + EOF
111 + use system-man || cat <<-EOF >> "configure.local"
112 + BINM_MAN=mman
113 + BINM_APROPOS=mapropos
114 + BINM_WHATIS=mwhatis
115 + BINM_MAKEWHATIS=mmakewhatis
116 + MANM_MDOC=mandoc_mdoc
117 + MANM_EQN=mandoc_eqn
118 + MANM_TBL=mandoc_tbl
119 + MANM_MANCONF=mman.conf
120 + EOF
121 + if use cgi; then
122 + cp cgi.h{.example,} || die
123 + fi
124 + if [[ -n "${MANDOC_CGI_H}" ]]; then
125 + cp "${MANDOC_CGI_H}" cgi.h || die
126 + fi
127 +
128 + # ./configure does not propagate all configure.local
129 + # settings to Makefile.local settings.
130 + tc-export AR
131 +}
132 +
133 +src_compile() {
134 + default
135 + use cgi && emake man.cgi
136 +}
137 +
138 +src_install() {
139 + emake DESTDIR="${D}" install
140 + use cgi && emake DESTDIR="${D}" cgi-install www-install
141 +
142 + if use system-man ; then
143 + exeinto /etc/cron.daily
144 + newexe "${FILESDIR}"/mandoc.cron-r0 mandoc
145 + fi
146 +}
147 +
148 +pkg_postinst() {
149 + if use system-man ; then
150 + elog "Generating mandoc database"
151 + makewhatis || die
152 + fi
153 +}