diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-08-23 09:16:52 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-08-23 09:16:52 +0000 |
commit | 341b512f97fd3faff691996d1ec99a3676909570 (patch) | |
tree | 1326de5e21ac6e81de20737ff4f07c8024b6532b /sys-apps | |
parent | old (diff) | |
download | gentoo-2-341b512f97fd3faff691996d1ec99a3676909570.tar.gz gentoo-2-341b512f97fd3faff691996d1ec99a3676909570.tar.bz2 gentoo-2-341b512f97fd3faff691996d1ec99a3676909570.zip |
Add fix from upstream for issues with non-english uncompressed man pages #327347 by Florian.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/man-db/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/man-db/files/man-db-2.5.7-uncompressed-non-en.patch | 120 | ||||
-rw-r--r-- | sys-apps/man-db/man-db-2.5.7-r1.ebuild | 50 |
3 files changed, 178 insertions, 1 deletions
diff --git a/sys-apps/man-db/ChangeLog b/sys-apps/man-db/ChangeLog index 534b18f9287c..4db4721b62de 100644 --- a/sys-apps/man-db/ChangeLog +++ b/sys-apps/man-db/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/man-db # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/man-db/ChangeLog,v 1.12 2010/03/29 05:48:25 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/man-db/ChangeLog,v 1.13 2010/08/23 09:16:52 vapier Exp $ + +*man-db-2.5.7-r1 (23 Aug 2010) + + 23 Aug 2010; Mike Frysinger <vapier@gentoo.org> +man-db-2.5.7-r1.ebuild, + +files/man-db-2.5.7-uncompressed-non-en.patch: + Add fix from upstream for issues with non-english uncompressed man pages + #327347 by Florian. 29 Mar 2010; Mike Frysinger <vapier@gentoo.org> man-db-2.5.7.ebuild, +files/man-db-2.5.7-non-gnu-nroff.patch: diff --git a/sys-apps/man-db/files/man-db-2.5.7-uncompressed-non-en.patch b/sys-apps/man-db/files/man-db-2.5.7-uncompressed-non-en.patch new file mode 100644 index 000000000000..b781dbc038e1 --- /dev/null +++ b/sys-apps/man-db/files/man-db-2.5.7-uncompressed-non-en.patch @@ -0,0 +1,120 @@ +https://bugs.gentoo.org/327347 + +fix from upstream for display of uncompressed non-English manpages + +--- man-db-2.5.7/lib/pipeline.c ++++ man-db-2.5.7/lib/pipeline.c +@@ -329,6 +329,25 @@ + return cmd; + } + ++static void passthrough (void *data ATTRIBUTE_UNUSED) ++{ ++ for (;;) { ++ char buffer[4096]; ++ int r = read (STDIN_FILENO, buffer, 4096); ++ if (r <= 0) ++ break; ++ if (fwrite (buffer, 1, (size_t) r, stdout) < (size_t) r) ++ break; ++ } ++ ++ return; ++} ++ ++command *command_new_passthrough (void) ++{ ++ return command_new_function ("cat", &passthrough, NULL, NULL); ++} ++ + command *command_dup (command *cmd) + { + command *newcmd = XMALLOC (command); +@@ -831,20 +850,6 @@ + return p; + } + +-static void passthrough (void *data ATTRIBUTE_UNUSED) +-{ +- for (;;) { +- char buffer[4096]; +- int r = read (STDIN_FILENO, buffer, 4096); +- if (r <= 0) +- break; +- if (fwrite (buffer, 1, (size_t) r, stdout) < (size_t) r) +- break; +- } +- +- return; +-} +- + void pipeline_connect (pipeline *source, pipeline *sink, ...) + { + va_list argv; +@@ -876,11 +881,8 @@ + * because it has nowhere to send output. Until this is + * fixed, this kludge is necessary. + */ +- if (arg->ncommands == 0) { +- command *cmd = command_new_function +- ("cat", &passthrough, NULL, NULL); +- pipeline_command (arg, cmd); +- } ++ if (arg->ncommands == 0) ++ pipeline_command (arg, command_new_passthrough ()); + } + va_end (argv); + } +--- man-db-2.5.7/lib/pipeline.h ++++ man-db-2.5.7/lib/pipeline.h +@@ -172,6 +172,9 @@ + */ + command *command_new_sequence (const char *name, ...) ATTRIBUTE_SENTINEL; + ++/* Return a new command that just passes data from its input to its output. */ ++command *command_new_passthrough (void); ++ + /* Return a duplicate of a command. */ + command *command_dup (command *cmd); + +--- man-db-2.5.7/NEWS ++++ man-db-2.5.7/NEWS +@@ -1,3 +1,15 @@ ++man-db 2.5.8 ++============ ++ ++Major changes since man-db 2.5.7: ++ ++ Fixes: ++ ------ ++ ++ o Fix assertion failure on 'man -l' with an uncompressed page and ++ any of --no-hyphenation, --no-justification, or a non-English ++ page. ++ + man-db 2.5.7 (16 February 2010) + =============================== + +--- man-db-2.5.7/src/man.c ++++ man-db-2.5.7/src/man.c +@@ -2390,9 +2390,16 @@ + #endif /* TROFF_IS_GROFF */ + + if (seq->u.sequence.ncommands) { +- assert (decomp->ncommands == 1); +- command_sequence_command (seq, decomp->commands[0]); +- decomp->commands[0] = seq; ++ assert (decomp->ncommands <= 1); ++ if (decomp->ncommands) { ++ command_sequence_command ++ (seq, decomp->commands[0]); ++ decomp->commands[0] = seq; ++ } else { ++ command_sequence_command ++ (seq, command_new_passthrough ()); ++ pipeline_command (decomp, seq); ++ } + } else + command_free (seq); + } + diff --git a/sys-apps/man-db/man-db-2.5.7-r1.ebuild b/sys-apps/man-db/man-db-2.5.7-r1.ebuild new file mode 100644 index 000000000000..5aa7c6e02f77 --- /dev/null +++ b/sys-apps/man-db/man-db-2.5.7-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/man-db/man-db-2.5.7-r1.ebuild,v 1.1 2010/08/23 09:16:52 vapier Exp $ + +EAPI="2" + +inherit eutils + +DESCRIPTION="a man replacement that utilizes berkdb instead of flat files" +HOMEPAGE="http://www.nongnu.org/man-db/" +SRC_URI="http://download.savannah.nongnu.org/releases/man-db/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="berkdb +gdbm nls" + +RDEPEND="berkdb? ( sys-libs/db ) + gdbm? ( sys-libs/gdbm ) + !berkdb? ( !gdbm? ( sys-libs/gdbm ) ) + || ( sys-apps/groff >=app-doc/heirloom-doctools-080407-r2 ) + !sys-apps/man" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" +PROVIDE="virtual/man" + +pkg_setup() { + enewgroup man 15 + enewuser man 13 -1 /usr/share/man man +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-non-gnu-nroff.patch #309635 + epatch "${FILESDIR}"/${P}-uncompressed-non-en.patch #327347 +} + +src_configure() { + local db="gdbm" + use berkdb && ! use gdbm && db="db" + econf \ + --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" \ + $(use_enable nls) \ + --with-db=${db} \ + || die +} + +src_install() { + emake install DESTDIR="${D}" || die + dodoc README ChangeLog NEWS docs/{HACKING,TODO} +} |