Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/man-db/files: man-db-2.5.6-fix-no-groff.patch
Date: Fri, 02 Oct 2009 21:50:31
Message-Id: E1Mtq1F-0006r1-CA@stork.gentoo.org
1 flameeyes 09/10/02 21:50:29
2
3 Added: man-db-2.5.6-fix-no-groff.patch
4 Log:
5 Version bump, with a patch to work with heirloom-doctools… for the most part. Note that man pages will not look as good as with sys-apps/man at least.
6 (Portage version: 2.2_rc42/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sys-apps/man-db/files/man-db-2.5.6-fix-no-groff.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man-db/files/man-db-2.5.6-fix-no-groff.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man-db/files/man-db-2.5.6-fix-no-groff.patch?rev=1.1&content-type=text/plain
13
14 Index: man-db-2.5.6-fix-no-groff.patch
15 ===================================================================
16 Index: man-db-2.5.6/src/man.c
17 ===================================================================
18 --- man-db-2.5.6.orig/src/man.c
19 +++ man-db-2.5.6/src/man.c
20 @@ -257,15 +257,19 @@ error_t argp_err_exit_status = FAIL;
21
22 static const char args_doc[] = N_("[SECTION] PAGE...");
23
24 +# ifdef TROFF_IS_GROFF
25 +# define MAYBE_HIDDEN 0
26 +# else
27 +# define MAYBE_HIDDEN OPTION_HIDDEN
28 +# endif
29 +
30 /* Please keep these options in the same order as in parse_opt below. */
31 static struct argp_option options[] = {
32 { "config-file", 'C', N_("FILE"), 0, N_("use this user configuration file") },
33 { "debug", 'd', 0, 0, N_("emit debugging messages") },
34 { "default", 'D', 0, 0, N_("reset all options to their default values") },
35 -#ifdef TROFF_IS_GROFF
36 - { "warnings", OPT_WARNINGS, N_("WARNINGS"), OPTION_ARG_OPTIONAL,
37 + { "warnings", OPT_WARNINGS, N_("WARNINGS"), MAYBE_HIDDEN | OPTION_ARG_OPTIONAL,
38 N_("enable warnings from groff") },
39 -#endif /* TROFF_IS_GROFF */
40
41 { 0, 0, 0, 0, N_("Main modes of operation:"), 10 },
42 { "whatis", 'f', 0, 0, N_("equivalent to whatis") },
43 @@ -312,11 +316,6 @@ static struct argp_option options[] = {
44 { "troff", 't', 0, 0, N_("use %s to format pages"), 32 },
45 { "troff-device", 'T', N_("DEVICE"), OPTION_ARG_OPTIONAL,
46 N_("use %s with selected device") },
47 -# ifdef TROFF_IS_GROFF
48 -# define MAYBE_HIDDEN 0
49 -# else
50 -# define MAYBE_HIDDEN OPTION_HIDDEN
51 -# endif
52 { "html", 'H', N_("BROWSER"), MAYBE_HIDDEN | OPTION_ARG_OPTIONAL,
53 N_("use %s or BROWSER to display HTML output"), 33 },
54 { "gxditview", 'X', N_("RESOLUTION"),
55 @@ -362,8 +361,8 @@ static error_t parse_opt (int key, char
56 colon_sep_section_list = manp = NULL;
57 return 0;
58
59 -#ifdef TROFF_IS_GROFF
60 case OPT_WARNINGS:
61 +#ifdef TROFF_IS_GROFF
62 {
63 char *s = xstrdup
64 (arg ? arg : default_roff_warnings);
65 @@ -380,8 +379,8 @@ static error_t parse_opt (int key, char
66
67 free (s);
68 }
69 - return 0;
70 #endif /* TROFF_IS_GROFF */
71 + return 0;
72
73 case 'f':
74 external = WHATIS;
75 @@ -1596,18 +1595,23 @@ static pipeline *make_roff_command (cons
76 NULL);
77 command_arg (cmd, tmpdev);
78 free (tmpdev);
79 - } else if (gxditview) {
80 + }
81 +#ifdef TROFF_IS_GROFF
82 + else if (gxditview) {
83 char *tmpdev = appendstr (NULL, "-TX",
84 gxditview,
85 NULL);
86 command_arg (cmd, tmpdev);
87 free (tmpdev);
88 }
89 +#endif /* TROFF_IS_GROFF */
90 }
91
92 if (wants_post) {
93 +#ifdef TROFF_IS_GROFF
94 if (gxditview)
95 command_arg (cmd, "-X");
96 +#endif /* TROFF_IS_GROFF */
97
98 if (roff_device && STREQ (roff_device, "ps"))
99 /* Tell grops to guess the page
100 Index: man-db-2.5.6/configure.ac
101 ===================================================================
102 --- man-db-2.5.6.orig/configure.ac
103 +++ man-db-2.5.6/configure.ac
104 @@ -213,6 +213,7 @@ else
105 AC_CHECK_PROGS(troff, troff gtroff)
106 TROFF=troff
107 fi
108 +AC_SUBST([TROFF])
109 if test -n "$troff"
110 then
111 AC_DEFINE(HAS_TROFF, 1, [Define if you have troff.])
112 Index: man-db-2.5.6/manual/Makefile.am
113 ===================================================================
114 --- man-db-2.5.6.orig/manual/Makefile.am
115 +++ man-db-2.5.6/manual/Makefile.am
116 @@ -59,13 +59,13 @@ $(MANUAL).pp: $(ME_FILES) version
117 $(SOELIM) -I$(srcdir) man_db.me | tbl > $@
118
119 .pp.dvi:
120 - groff -me -Tdvi $< > $@
121 + $(TROFF) -me -Tdvi $< > $@
122
123 .pp.ps:
124 - groff -me -Tps $< > $@
125 + $(TROFF) -me -Tps $< > $@
126
127 .pp.tdvi:
128 - troff -me -Tdvi $< | grodvi -d > $@
129 + $(TROFF) -me -Tdvi $< | grodvi -d > $@
130
131 .tdvi.tps:
132 dvips -f -t a4 $< > $@
133 @@ -74,7 +74,7 @@ $(MANUAL).pp: $(ME_FILES) version
134 nroff -me $< > $@
135
136 .pp.html:
137 - groff -me -Thtml -P-I$* $< > $@
138 + $(TROFF) -me -Thtml -P-I$* $< > $@
139
140 # Automake defines these targets already, so we need to use -local.
141 dvi-local: $(MANUAL).dvi