1 |
commit: 4fed9a6d9b0ae81fff6b7a7390fea76e8e59d826 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 7 01:51:11 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 7 02:07:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fed9a6d |
7 |
|
8 |
sys-apps/man-db: add 2.10.0 |
9 |
|
10 |
Now defaults to gdbm, but can use berkdb to switch back to that |
11 |
instead if desired. |
12 |
|
13 |
This doesn't change the default for anybody as USE="+gdbm" has |
14 |
been in profiles for a long time and we dropped USE="+berkdb" in profiles |
15 |
a while ago. Plus, when in doubt, the ebuild used to go for USE=gdbm when |
16 |
both were set. So, this is just a cleanup of the existing logic. |
17 |
|
18 |
Closes: https://bugs.gentoo.org/830565 |
19 |
Closes: https://bugs.gentoo.org/697796 |
20 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
21 |
|
22 |
sys-apps/man-db/Manifest | 1 + |
23 |
.../files/man-db-2.10.0-fix-build-clang.patch | 44 ++++++++++++++ |
24 |
.../files/man-db-2.9.3-darwin-libdb-intl.patch | 2 + |
25 |
.../{man-db-9999.ebuild => man-db-2.10.0.ebuild} | 69 ++++++++++------------ |
26 |
sys-apps/man-db/man-db-9999.ebuild | 67 ++++++++++----------- |
27 |
5 files changed, 109 insertions(+), 74 deletions(-) |
28 |
|
29 |
diff --git a/sys-apps/man-db/Manifest b/sys-apps/man-db/Manifest |
30 |
index 1125c257db2f..f1ed8e06a426 100644 |
31 |
--- a/sys-apps/man-db/Manifest |
32 |
+++ b/sys-apps/man-db/Manifest |
33 |
@@ -1 +1,2 @@ |
34 |
+DIST man-db-2.10.0.tar.xz 1888196 BLAKE2B 02aed8a8d490b4e481c42790b8783768bf4adcab1430f2e06d2a1b22a4c769dd3978800e609d221da1dcc25032e096ad9ba8580e2ff8a72e8b19dbda573562b4 SHA512 de9c9f3dd9e6a578eb99aca0d04ce5c98cf6733e83e3be5299b6cafc4aad202896429a263a34111529eccdf07c353438afdade278818fc5d884471df7a4816c9 |
35 |
DIST man-db-2.9.4.tar.xz 1909020 BLAKE2B 43427e851f0e661ca1cee55211dd7636f4ffde067c75de7715f525029b22c205728f8e86ac49abff60e47a4a4c9e1fbd78e2c87e70bd37778b88594a3897275f SHA512 169f091dd0a1d0dbd1583366f8257afb8f57e030d0f7d4213c14ce0b1fc5debf8b9cf2731de503830cb2826b3a22b3cff7da993d44ec18557935bd293529133c |
36 |
|
37 |
diff --git a/sys-apps/man-db/files/man-db-2.10.0-fix-build-clang.patch b/sys-apps/man-db/files/man-db-2.10.0-fix-build-clang.patch |
38 |
new file mode 100644 |
39 |
index 000000000000..2896301008ad |
40 |
--- /dev/null |
41 |
+++ b/sys-apps/man-db/files/man-db-2.10.0-fix-build-clang.patch |
42 |
@@ -0,0 +1,44 @@ |
43 |
+https://gitlab.com/cjwatson/man-db/-/commit/f4f94402834f20b9da730aeca5daa465be38efdf |
44 |
+https://gitlab.com/cjwatson/man-db/-/issues/2 |
45 |
+ |
46 |
+From f4f94402834f20b9da730aeca5daa465be38efdf Mon Sep 17 00:00:00 2001 |
47 |
+From: Colin Watson <cjwatson@××××××.org> |
48 |
+Date: Sun, 6 Feb 2022 12:37:01 +0000 |
49 |
+Subject: [PATCH] Revert "Reduce indentation depth using C99" |
50 |
+ |
51 |
+This reverts commit c4d20840f3487588c4a0da4397b1acb6dc83a1e5. Even in |
52 |
+C99, a declaration isn't valid immediately after a label; this didn't |
53 |
+become valid until C2x, although gcc allows it as an extension. |
54 |
+ |
55 |
+Fixes https://gitlab.com/cjwatson/man-db/-/issues/2. |
56 |
+ |
57 |
+* src/man.c (parse_opt): Restore enclosing block for OPT_WARNINGS. |
58 |
+--- a/src/man.c |
59 |
++++ b/src/man.c |
60 |
+@@ -383,15 +383,18 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) |
61 |
+ |
62 |
+ case OPT_WARNINGS: |
63 |
+ #ifdef NROFF_WARNINGS |
64 |
+- char *s = xstrdup (arg ? arg : default_roff_warnings); |
65 |
+- const char *warning; |
66 |
++ { |
67 |
++ char *s = xstrdup |
68 |
++ (arg ? arg : default_roff_warnings); |
69 |
++ const char *warning; |
70 |
+ |
71 |
+- for (warning = strtok (s, ","); warning; |
72 |
+- warning = strtok (NULL, ",")) |
73 |
+- gl_list_add_last (roff_warnings, |
74 |
+- xstrdup (warning)); |
75 |
++ for (warning = strtok (s, ","); warning; |
76 |
++ warning = strtok (NULL, ",")) |
77 |
++ gl_list_add_last (roff_warnings, |
78 |
++ xstrdup (warning)); |
79 |
+ |
80 |
+- free (s); |
81 |
++ free (s); |
82 |
++ } |
83 |
+ #endif /* NROFF_WARNINGS */ |
84 |
+ return 0; |
85 |
+ |
86 |
+GitLab |
87 |
|
88 |
diff --git a/sys-apps/man-db/files/man-db-2.9.3-darwin-libdb-intl.patch b/sys-apps/man-db/files/man-db-2.9.3-darwin-libdb-intl.patch |
89 |
index a7df3c62fd06..71cbb1c20df6 100644 |
90 |
--- a/sys-apps/man-db/files/man-db-2.9.3-darwin-libdb-intl.patch |
91 |
+++ b/sys-apps/man-db/files/man-db-2.9.3-darwin-libdb-intl.patch |
92 |
@@ -1,3 +1,5 @@ |
93 |
+https://gitlab.com/cjwatson/man-db/-/merge_requests/3 |
94 |
+ |
95 |
libdb: link against libintl |
96 |
|
97 |
necessary since gettext is used for translations |
98 |
|
99 |
diff --git a/sys-apps/man-db/man-db-9999.ebuild b/sys-apps/man-db/man-db-2.10.0.ebuild |
100 |
similarity index 78% |
101 |
copy from sys-apps/man-db/man-db-9999.ebuild |
102 |
copy to sys-apps/man-db/man-db-2.10.0.ebuild |
103 |
index e673f4391432..6948c20167a5 100644 |
104 |
--- a/sys-apps/man-db/man-db-9999.ebuild |
105 |
+++ b/sys-apps/man-db/man-db-2.10.0.ebuild |
106 |
@@ -1,4 +1,4 @@ |
107 |
-# Copyright 1999-2021 Gentoo Authors |
108 |
+# Copyright 1999-2022 Gentoo Authors |
109 |
# Distributed under the terms of the GNU General Public License v2 |
110 |
|
111 |
EAPI=7 |
112 |
@@ -6,64 +6,54 @@ EAPI=7 |
113 |
inherit systemd prefix tmpfiles |
114 |
|
115 |
DESCRIPTION="A man replacement that utilizes berkdb instead of flat files" |
116 |
-HOMEPAGE="http://www.nongnu.org/man-db/" |
117 |
-if [[ "${PV}" = 9999* ]] ; then |
118 |
+HOMEPAGE="https://gitlab.com/cjwatson/man-db https://www.nongnu.org/man-db/" |
119 |
+if [[ ${PV} == *9999 ]] ; then |
120 |
inherit autotools git-r3 |
121 |
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/man-db.git" |
122 |
+ EGIT_REPO_URI="https://gitlab.com/cjwatson/man-db.git" |
123 |
else |
124 |
+ # TODO: Change tarballs to gitlab too...? |
125 |
SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" |
126 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
127 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
128 |
fi |
129 |
|
130 |
LICENSE="GPL-3" |
131 |
SLOT="0" |
132 |
-IUSE="berkdb +gdbm +manpager nls +seccomp selinux static-libs zlib" |
133 |
+IUSE="berkdb +manpager nls +seccomp selinux static-libs zlib" |
134 |
|
135 |
-CDEPEND=" |
136 |
- !sys-apps/man |
137 |
+CDEPEND="!sys-apps/man |
138 |
>=dev-libs/libpipeline-1.5.0 |
139 |
sys-apps/groff |
140 |
- gdbm? ( sys-libs/gdbm:= ) |
141 |
- !gdbm? ( berkdb? ( sys-libs/db:= ) ) |
142 |
- !berkdb? ( !gdbm? ( sys-libs/gdbm:= ) ) |
143 |
+ !berkdb? ( sys-libs/gdbm:= ) |
144 |
+ berkdb? ( sys-libs/db:= ) |
145 |
seccomp? ( sys-libs/libseccomp ) |
146 |
- zlib? ( sys-libs/zlib ) |
147 |
-" |
148 |
+ zlib? ( sys-libs/zlib )" |
149 |
DEPEND="${CDEPEND}" |
150 |
-BDEPEND=" |
151 |
- app-arch/xz-utils |
152 |
+BDEPEND="app-arch/xz-utils |
153 |
virtual/pkgconfig |
154 |
nls? ( |
155 |
>=app-text/po4a-0.45 |
156 |
sys-devel/gettext |
157 |
virtual/libiconv |
158 |
virtual/libintl |
159 |
- ) |
160 |
-" |
161 |
-RDEPEND=" |
162 |
- ${CDEPEND} |
163 |
+ )" |
164 |
+RDEPEND="${CDEPEND} |
165 |
acct-group/man |
166 |
acct-user/man |
167 |
- selinux? ( sec-policy/selinux-mandb ) |
168 |
-" |
169 |
+ selinux? ( sec-policy/selinux-mandb )" |
170 |
PDEPEND="manpager? ( app-text/manpager )" |
171 |
|
172 |
PATCHES=( |
173 |
"${FILESDIR}"/man-db-2.9.3-sandbox-env-tests.patch |
174 |
"${FILESDIR}"/man-db-2.9.3-darwin-libdb-intl.patch |
175 |
-) |
176 |
|
177 |
-pkg_setup() { |
178 |
- if (use gdbm && use berkdb) || (use !gdbm && use !berkdb) ; then #496150 |
179 |
- ewarn "Defaulting to USE=gdbm due to ambiguous berkdb/gdbm USE flag settings" |
180 |
- fi |
181 |
-} |
182 |
+ "${FILESDIR}"/${P}-fix-build-clang.patch |
183 |
+) |
184 |
|
185 |
src_unpack() { |
186 |
- if [[ "${PV}" == *9999 ]] ; then |
187 |
+ if [[ ${PV} == *9999 ]] ; then |
188 |
git-r3_src_unpack |
189 |
|
190 |
- # We need to mess with gnulib :-/ |
191 |
+ # We need to mess with gnulib |
192 |
EGIT_REPO_URI="https://git.savannah.gnu.org/r/gnulib.git" \ |
193 |
EGIT_CHECKOUT_DIR="${WORKDIR}/gnulib" \ |
194 |
git-r3_src_unpack |
195 |
@@ -74,6 +64,7 @@ src_unpack() { |
196 |
|
197 |
src_prepare() { |
198 |
default |
199 |
+ |
200 |
if [[ "${PV}" == *9999 ]] ; then |
201 |
local bootstrap_opts=( |
202 |
--gnulib-srcdir=../gnulib |
203 |
@@ -101,7 +92,7 @@ src_prepare() { |
204 |
} |
205 |
|
206 |
src_configure() { |
207 |
- # set sections we want to search by default |
208 |
+ # Set sections we want to search by default |
209 |
local sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o" |
210 |
sections+=" 1x 2x 3x 4x 5x 6x 7x 8x" |
211 |
case ${CHOST} in |
212 |
@@ -121,25 +112,29 @@ src_configure() { |
213 |
local myeconfargs=( |
214 |
--with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d |
215 |
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
216 |
- --disable-setuid #662438 |
217 |
+ --disable-setuid # bug #662438 |
218 |
--enable-cache-owner=man |
219 |
--with-sections="${sections}" |
220 |
+ |
221 |
$(use_enable nls) |
222 |
$(use_enable static-libs static) |
223 |
$(use_with seccomp libseccomp) |
224 |
- --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm)) |
225 |
+ |
226 |
+ --with-db=$(usex berkdb db gdbm) |
227 |
) |
228 |
+ |
229 |
case ${CHOST} in |
230 |
*-solaris*|*-darwin*) |
231 |
myeconfargs+=( |
232 |
- $(use_with nls libiconv-prefix ${EPREFIX}/usr) |
233 |
- $(use_with nls libintl-prefix ${EPREFIX}/usr) |
234 |
+ $(use_with nls libiconv-prefix "${EPREFIX}"/usr) |
235 |
+ $(use_with nls libintl-prefix "${EPREFIX}"/usr) |
236 |
) |
237 |
;; |
238 |
esac |
239 |
+ |
240 |
econf "${myeconfargs[@]}" |
241 |
|
242 |
- # Disable color output from groff so that the manpager can add it. #184604 |
243 |
+ # Disable color output from groff so that the manpager can add it. bug #184604 |
244 |
sed -i \ |
245 |
-e '/^#DEFINE.*\<[nt]roff\>/{s:^#::;s:$: -c:}' \ |
246 |
src/man_db.conf || die |
247 |
@@ -151,11 +146,11 @@ src_configure() { |
248 |
|
249 |
src_install() { |
250 |
default |
251 |
- dodoc docs/{HACKING,TODO} |
252 |
+ dodoc docs/{HACKING.md,TODO} |
253 |
find "${ED}" -type f -name "*.la" -delete || die |
254 |
|
255 |
exeinto /etc/cron.daily |
256 |
- newexe "${FILESDIR}"/man-db.cron-r1 man-db #289884 |
257 |
+ newexe "${FILESDIR}"/man-db.cron-r1 man-db # bug #289884 |
258 |
|
259 |
insinto /etc/sandbox.d |
260 |
doins 15man-db |
261 |
|
262 |
diff --git a/sys-apps/man-db/man-db-9999.ebuild b/sys-apps/man-db/man-db-9999.ebuild |
263 |
index e673f4391432..c0406d043a09 100644 |
264 |
--- a/sys-apps/man-db/man-db-9999.ebuild |
265 |
+++ b/sys-apps/man-db/man-db-9999.ebuild |
266 |
@@ -1,4 +1,4 @@ |
267 |
-# Copyright 1999-2021 Gentoo Authors |
268 |
+# Copyright 1999-2022 Gentoo Authors |
269 |
# Distributed under the terms of the GNU General Public License v2 |
270 |
|
271 |
EAPI=7 |
272 |
@@ -6,46 +6,40 @@ EAPI=7 |
273 |
inherit systemd prefix tmpfiles |
274 |
|
275 |
DESCRIPTION="A man replacement that utilizes berkdb instead of flat files" |
276 |
-HOMEPAGE="http://www.nongnu.org/man-db/" |
277 |
-if [[ "${PV}" = 9999* ]] ; then |
278 |
+HOMEPAGE="https://gitlab.com/cjwatson/man-db https://www.nongnu.org/man-db/" |
279 |
+if [[ ${PV} == *9999 ]] ; then |
280 |
inherit autotools git-r3 |
281 |
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/man-db.git" |
282 |
+ EGIT_REPO_URI="https://gitlab.com/cjwatson/man-db.git" |
283 |
else |
284 |
+ # TODO: Change tarballs to gitlab too...? |
285 |
SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" |
286 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
287 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
288 |
fi |
289 |
|
290 |
LICENSE="GPL-3" |
291 |
SLOT="0" |
292 |
-IUSE="berkdb +gdbm +manpager nls +seccomp selinux static-libs zlib" |
293 |
+IUSE="berkdb +manpager nls +seccomp selinux static-libs zlib" |
294 |
|
295 |
-CDEPEND=" |
296 |
- !sys-apps/man |
297 |
+CDEPEND="!sys-apps/man |
298 |
>=dev-libs/libpipeline-1.5.0 |
299 |
sys-apps/groff |
300 |
- gdbm? ( sys-libs/gdbm:= ) |
301 |
- !gdbm? ( berkdb? ( sys-libs/db:= ) ) |
302 |
- !berkdb? ( !gdbm? ( sys-libs/gdbm:= ) ) |
303 |
+ !berkdb? ( sys-libs/gdbm:= ) |
304 |
+ berkdb? ( sys-libs/db:= ) |
305 |
seccomp? ( sys-libs/libseccomp ) |
306 |
- zlib? ( sys-libs/zlib ) |
307 |
-" |
308 |
+ zlib? ( sys-libs/zlib )" |
309 |
DEPEND="${CDEPEND}" |
310 |
-BDEPEND=" |
311 |
- app-arch/xz-utils |
312 |
+BDEPEND="app-arch/xz-utils |
313 |
virtual/pkgconfig |
314 |
nls? ( |
315 |
>=app-text/po4a-0.45 |
316 |
sys-devel/gettext |
317 |
virtual/libiconv |
318 |
virtual/libintl |
319 |
- ) |
320 |
-" |
321 |
-RDEPEND=" |
322 |
- ${CDEPEND} |
323 |
+ )" |
324 |
+RDEPEND="${CDEPEND} |
325 |
acct-group/man |
326 |
acct-user/man |
327 |
- selinux? ( sec-policy/selinux-mandb ) |
328 |
-" |
329 |
+ selinux? ( sec-policy/selinux-mandb )" |
330 |
PDEPEND="manpager? ( app-text/manpager )" |
331 |
|
332 |
PATCHES=( |
333 |
@@ -53,17 +47,11 @@ PATCHES=( |
334 |
"${FILESDIR}"/man-db-2.9.3-darwin-libdb-intl.patch |
335 |
) |
336 |
|
337 |
-pkg_setup() { |
338 |
- if (use gdbm && use berkdb) || (use !gdbm && use !berkdb) ; then #496150 |
339 |
- ewarn "Defaulting to USE=gdbm due to ambiguous berkdb/gdbm USE flag settings" |
340 |
- fi |
341 |
-} |
342 |
- |
343 |
src_unpack() { |
344 |
- if [[ "${PV}" == *9999 ]] ; then |
345 |
+ if [[ ${PV} == *9999 ]] ; then |
346 |
git-r3_src_unpack |
347 |
|
348 |
- # We need to mess with gnulib :-/ |
349 |
+ # We need to mess with gnulib |
350 |
EGIT_REPO_URI="https://git.savannah.gnu.org/r/gnulib.git" \ |
351 |
EGIT_CHECKOUT_DIR="${WORKDIR}/gnulib" \ |
352 |
git-r3_src_unpack |
353 |
@@ -74,6 +62,7 @@ src_unpack() { |
354 |
|
355 |
src_prepare() { |
356 |
default |
357 |
+ |
358 |
if [[ "${PV}" == *9999 ]] ; then |
359 |
local bootstrap_opts=( |
360 |
--gnulib-srcdir=../gnulib |
361 |
@@ -101,7 +90,7 @@ src_prepare() { |
362 |
} |
363 |
|
364 |
src_configure() { |
365 |
- # set sections we want to search by default |
366 |
+ # Set sections we want to search by default |
367 |
local sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o" |
368 |
sections+=" 1x 2x 3x 4x 5x 6x 7x 8x" |
369 |
case ${CHOST} in |
370 |
@@ -121,25 +110,29 @@ src_configure() { |
371 |
local myeconfargs=( |
372 |
--with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d |
373 |
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
374 |
- --disable-setuid #662438 |
375 |
+ --disable-setuid # bug #662438 |
376 |
--enable-cache-owner=man |
377 |
--with-sections="${sections}" |
378 |
+ |
379 |
$(use_enable nls) |
380 |
$(use_enable static-libs static) |
381 |
$(use_with seccomp libseccomp) |
382 |
- --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm)) |
383 |
+ |
384 |
+ --with-db=$(usex berkdb db gdbm) |
385 |
) |
386 |
+ |
387 |
case ${CHOST} in |
388 |
*-solaris*|*-darwin*) |
389 |
myeconfargs+=( |
390 |
- $(use_with nls libiconv-prefix ${EPREFIX}/usr) |
391 |
- $(use_with nls libintl-prefix ${EPREFIX}/usr) |
392 |
+ $(use_with nls libiconv-prefix "${EPREFIX}"/usr) |
393 |
+ $(use_with nls libintl-prefix "${EPREFIX}"/usr) |
394 |
) |
395 |
;; |
396 |
esac |
397 |
+ |
398 |
econf "${myeconfargs[@]}" |
399 |
|
400 |
- # Disable color output from groff so that the manpager can add it. #184604 |
401 |
+ # Disable color output from groff so that the manpager can add it. bug #184604 |
402 |
sed -i \ |
403 |
-e '/^#DEFINE.*\<[nt]roff\>/{s:^#::;s:$: -c:}' \ |
404 |
src/man_db.conf || die |
405 |
@@ -151,11 +144,11 @@ src_configure() { |
406 |
|
407 |
src_install() { |
408 |
default |
409 |
- dodoc docs/{HACKING,TODO} |
410 |
+ dodoc docs/{HACKING.md,TODO} |
411 |
find "${ED}" -type f -name "*.la" -delete || die |
412 |
|
413 |
exeinto /etc/cron.daily |
414 |
- newexe "${FILESDIR}"/man-db.cron-r1 man-db #289884 |
415 |
+ newexe "${FILESDIR}"/man-db.cron-r1 man-db # bug #289884 |
416 |
|
417 |
insinto /etc/sandbox.d |
418 |
doins 15man-db |