| 1 | # Source: <https://sources.debian.org/patches/docbook-utils/0.6.14-4/bug_214982.patch/>
|
| 2 |
|
| 3 | Description: patch to get the <date> from the sgml file
|
| 4 | For the moment, docbook2man doesn't use the tag date in <date> </date>
|
| 5 | to but `date "+%d %B %Y"`, and thus depend on the current locale.
|
| 6 |
|
| 7 | <refentry>
|
| 8 | <docinfo>
|
| 9 | <date>06 September 2003</>
|
| 10 | </docinfo>
|
| 11 | </refentry>
|
| 12 |
|
| 13 | A patch against /usr/share/perl5/sgmlspl-specs/docbook2man-spec.pl
|
| 14 | allows to use the date written in the source SGML file (which can be
|
| 15 | localized) instead of the current date.
|
| 16 |
|
| 17 | However, if no correct date tag is present in the SGML file, the date
|
| 18 | written in the manpage will depend on the current locale.
|
| 19 | Author: Simon Paillard <[email protected]>
|
| 20 | Forwarded: not-needed
|
| 21 | Bug-Debian: http://bugs.debian.org/214982
|
| 22 |
|
| 23 | Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
|
| 24 | ===================================================================
|
| 25 | |
| 26 | |
| 27 | @@ -278,8 +278,9 @@
|
| 28 | .\\" etc. to Steve Cheng <steve\@ggi-project.org>.
|
| 29 | _END_BANNER
|
| 30 |
|
| 31 | - my $manpage_date = `date "+%d %B %Y"`;
|
| 32 | -
|
| 33 | + my $date = `date "+%d %B %Y"`;
|
| 34 | + my $manpage_date = $manpage_date || $date ;
|
| 35 | +
|
| 36 | output '.TH "';
|
| 37 |
|
| 38 | # If the title is not mixed-case, convention says to
|
| 39 | @@ -292,7 +293,7 @@
|
| 40 | }
|
| 41 |
|
| 42 | output '" "', fold_string($manpage_sect),
|
| 43 | - '" "', fold_string(`date "+%d %B %Y"`),
|
| 44 | + '" "', fold_string($manpage_date),
|
| 45 | '" "', $manpage_misc,
|
| 46 | '" "', $manpage_manual,
|
| 47 | "\"\n";
|
| 48 | @@ -568,6 +569,15 @@
|
| 49 | sgml('</ATTRIBUTION>', sub { $_[0]->parent->ext->{'attribution'} = pop_output(); });
|
| 50 |
|
| 51 |
|
| 52 | +sgml('<DATE>', sub {
|
| 53 | + save_cdata();
|
| 54 | +});
|
| 55 | +sgml('</DATE>', sub {
|
| 56 | + $manpage_date = fold_string(pop_output());
|
| 57 | + $raw_cdata--;
|
| 58 | +});
|
| 59 | +
|
| 60 | +
|
| 61 | # IGNORE.
|
| 62 | sgml('<DOCINFO>', sub { push_output('nul'); });
|
| 63 | sgml('</DOCINFO>', sub { pop_output(); });
|