diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-03-29 05:48:25 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-29 05:48:25 +0000 |
commit | 7ccd07f74c9f3b6e6b8374195aebc161acb07448 (patch) | |
tree | 05881d180868189ed8ee582ea9523ddafdf36c11 /sys-apps | |
parent | Fixes from upstream for pkcs build problems #310929 by Alan Hourihane and for... (diff) | |
download | gentoo-2-7ccd07f74c9f3b6e6b8374195aebc161acb07448.tar.gz gentoo-2-7ccd07f74c9f3b6e6b8374195aebc161acb07448.tar.bz2 gentoo-2-7ccd07f74c9f3b6e6b8374195aebc161acb07448.zip |
Add fix from upstream for building with non-GNU nroff #309635 by Pun.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/man-db/ChangeLog | 6 | ||||
-rw-r--r-- | sys-apps/man-db/files/man-db-2.5.7-non-gnu-nroff.patch | 97 | ||||
-rw-r--r-- | sys-apps/man-db/man-db-2.5.7.ebuild | 6 |
3 files changed, 107 insertions, 2 deletions
diff --git a/sys-apps/man-db/ChangeLog b/sys-apps/man-db/ChangeLog index 6cde51a01bdc..534b18f9287c 100644 --- a/sys-apps/man-db/ChangeLog +++ b/sys-apps/man-db/ChangeLog @@ -1,6 +1,10 @@ # 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.11 2010/03/07 05:01:43 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/man-db/ChangeLog,v 1.12 2010/03/29 05:48:25 vapier Exp $ + + 29 Mar 2010; Mike Frysinger <vapier@gentoo.org> man-db-2.5.7.ebuild, + +files/man-db-2.5.7-non-gnu-nroff.patch: + Add fix from upstream for building with non-GNU nroff #309635 by Pun. *man-db-2.5.7 (07 Mar 2010) diff --git a/sys-apps/man-db/files/man-db-2.5.7-non-gnu-nroff.patch b/sys-apps/man-db/files/man-db-2.5.7-non-gnu-nroff.patch new file mode 100644 index 000000000000..4e93c44363f4 --- /dev/null +++ b/sys-apps/man-db/files/man-db-2.5.7-non-gnu-nroff.patch @@ -0,0 +1,97 @@ +fix from upstream for building w/out GNU nroff + +http://bugs.gentoo.org/309635 + +Wed Mar 24 11:04:46 GMT 2010 Colin Watson <cjwatson@debian.org> + + Fix build regression when GNU_NROFF is undefined (Savannah bug + #29318). + + * src/man.c (add_col): New function, split out from + make_display_command. + (make_roff_command): Reinstate tbl/col logic here, as by the time + we get to make_display_command we've forgotten whether tbl was + used. + (make_display_command): Remove tbl/col logic, useless here. Use + add_col. + +=== modified file 'src/man.c' +--- src/man.c 2010-03-21 22:05:16 +0000 ++++ src/man.c 2010-03-24 11:07:23 +0000 +@@ -43,6 +43,7 @@ + #include <string.h> + #include <stdlib.h> + #include <stdio.h> ++#include <stdarg.h> + #include <assert.h> + #include <errno.h> + #include <termios.h> +@@ -1406,6 +1407,26 @@ + return get_locale_charset (); + } + ++static void add_col (pipeline *p, const char *locale_charset, ...) ++{ ++ command *cmd; ++ va_list argv; ++ char *col_locale; ++ ++ cmd = command_new (COL); ++ va_start (argv, locale_charset); ++ command_argv (cmd, argv); ++ va_end (argv); ++ ++ col_locale = find_charset_locale (locale_charset); ++ if (col_locale) { ++ command_setenv (cmd, "LC_CTYPE", col_locale); ++ free (col_locale); ++ } ++ ++ pipeline_command (p, cmd); ++} ++ + /* Return pipeline to format file to stdout. */ + static pipeline *make_roff_command (const char *dir, const char *file, + pipeline *decomp, const char *dbfilters, +@@ -1699,6 +1720,11 @@ + !isatty (STDOUT_FILENO)) + /* we'll run col later, but prepare for it */ + setenv ("GROFF_NO_SGR", "1", 1); ++#ifndef GNU_NROFF ++ /* tbl needs col */ ++ else if (using_tbl && !troff && *COL) ++ add_col (p, locale_charset, NULL); ++#endif /* GNU_NROFF */ + } + } else { + /* use external formatter script, it takes arguments +@@ -1851,27 +1877,9 @@ + */ + const char *man_keep_formatting = + getenv ("MAN_KEEP_FORMATTING"); +- command *colcmd = NULL; + if ((!man_keep_formatting || !*man_keep_formatting) && + !isatty (STDOUT_FILENO)) +- colcmd = command_new_args ( +- COL, "-b", "-p", "-x", NULL); +-#ifndef GNU_NROFF +- /* tbl needs col */ +- else if (using_tbl && !troff && *COL) +- colcmd = command_new (COL); +-#endif /* GNU_NROFF */ +- +- if (colcmd) { +- char *col_locale = +- find_charset_locale (locale_charset); +- if (col_locale) { +- command_setenv (colcmd, "LC_CTYPE", +- col_locale); +- free (col_locale); +- } +- pipeline_command (p, colcmd); +- } ++ add_col (p, locale_charset, "-b", "-p", "-x", NULL); + } + + if (ascii) { + diff --git a/sys-apps/man-db/man-db-2.5.7.ebuild b/sys-apps/man-db/man-db-2.5.7.ebuild index f493aadff147..dcd1f6f9b57c 100644 --- a/sys-apps/man-db/man-db-2.5.7.ebuild +++ b/sys-apps/man-db/man-db-2.5.7.ebuild @@ -1,6 +1,6 @@ # 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.ebuild,v 1.1 2010/03/07 05:01:43 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/man-db/man-db-2.5.7.ebuild,v 1.2 2010/03/29 05:48:25 vapier Exp $ EAPI="2" @@ -29,6 +29,10 @@ pkg_setup() { enewuser man 13 -1 /usr/share/man man } +src_prepare() { + epatch "${FILESDIR}"/${P}-non-gnu-nroff.patch #309635 +} + src_configure() { local db="gdbm" use berkdb && ! use gdbm && db="db" |