[xml/sgml-commit] r1932 - in /packages/docbook-utils/trunk/debian/patches: bug_212088.patch bug_214982.patch bug_394511.patch bug_528334.patch series

malat at users.alioth.debian.org malat at users.alioth.debian.org
Wed May 9 17:07:11 UTC 2012


Author: malat
Date: Wed May  9 17:07:10 2012
New Revision: 1932

URL: http://svn.debian.org/wsvn/debian-xml-sgml/?sc=1&rev=1932
Log:
Add some patches

Added:
    packages/docbook-utils/trunk/debian/patches/bug_212088.patch
    packages/docbook-utils/trunk/debian/patches/bug_214982.patch
    packages/docbook-utils/trunk/debian/patches/bug_394511.patch
    packages/docbook-utils/trunk/debian/patches/bug_528334.patch
Modified:
    packages/docbook-utils/trunk/debian/patches/series

Added: packages/docbook-utils/trunk/debian/patches/bug_212088.patch
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/docbook-utils/trunk/debian/patches/bug_212088.patch?rev=1932&op=file
==============================================================================
--- packages/docbook-utils/trunk/debian/patches/bug_212088.patch (added)
+++ packages/docbook-utils/trunk/debian/patches/bug_212088.patch Wed May  9 17:07:10 2012
@@ -1,0 +1,40 @@
+Definition: docbook frontend runs sgmlnorm on xml input,
+ WARNING: I know very little about the docbook toolchain! Please 
+          double-check and triple-check my suggestion. Works For Me (tm)
+          
+          
+ Running 
+ 
+ db2html foo.xml
+ 
+ causes unnecessary long waits (up to 30 seconds or so) if the 
+ input document is an XML document.
+ 
+ I traced down the problem to the file 
+ /usr/share/sgml/docbook/utils-0.6.13/frontend/docbook (which is
+ called from /usr/bin/jw). Apparently it runs 'sgmlnorm' even
+ over XML documents (which should be expected to be well-formed, no?).
+ This is because $SGML_NORM is set to either 'sgml' or 'xml' in 
+ /usr/bin/jw in any case (and exported), so that the check in docbook
+ will always lead to sgmlnorm being used.
+ 
+ To me it seems unnecessary to run sgmlnorm over XML input, but I 
+ may well be wrong :)
+ 
+ If there is something to it, please have a look at the attached
+ patch, which works fine for me and fixes those long waits for me.
+Author: Tim-Philipp Müller <tim-mailinglists at zen.co.uk>
+
+Index: docbook-utils-0.6.14/frontends/docbook
+===================================================================
+--- docbook-utils-0.6.14.orig/frontends/docbook	2012-05-09 18:28:11.256843161 +0200
++++ docbook-utils-0.6.14/frontends/docbook	2012-05-09 18:52:22.348790777 +0200
+@@ -6,7 +6,7 @@
+ # Give the location of the centralized catalog
+ # First try the one with a version matching the version that is indicated in the document
+   centralized-catalog)
+-	if [ -n "$SGML_NORM" ]; then
++	if [ -n "$SGML_NORM" ] && [ "$SGML_XML" == "sgml" ]; then
+ 	  SGML_NORM_OPTS='-d'
+ 	else
+ 	  SGML_NORM=cat

Added: packages/docbook-utils/trunk/debian/patches/bug_214982.patch
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/docbook-utils/trunk/debian/patches/bug_214982.patch?rev=1932&op=file
==============================================================================
--- packages/docbook-utils/trunk/debian/patches/bug_214982.patch (added)
+++ packages/docbook-utils/trunk/debian/patches/bug_214982.patch Wed May  9 17:07:10 2012
@@ -1,0 +1,59 @@
+Description: patch to get the <date> from the sgml file
+ For the moment, docbook2man doesn't use the tag date in <date> </date>
+ to but `date "+%d %B %Y"`, and thus depend on the current locale.
+ 
+ <refentry>
+   <docinfo>
+     <date>06 September 2003</>
+   </docinfo>
+ </refentry>
+ 
+ A patch against /usr/share/perl5/sgmlspl-specs/docbook2man-spec.pl
+ allows to use the date written in the source SGML file (which can be
+ localized) instead of the current date.
+ 
+ However, if no correct date tag is present in the SGML file, the date
+ written in the manpage will depend on the current locale.
+Author: Simon Paillard <simon.paillard at resel.enst-bretagne.fr>
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+===================================================================
+--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl	2012-05-09 18:27:28.000000000 +0200
++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl	2012-05-09 18:55:53.276783163 +0200
+@@ -278,8 +278,9 @@
+ .\\" etc. to Steve Cheng <steve\@ggi-project.org>.
+ _END_BANNER
+ 
+-	my $manpage_date = `date "+%d %B %Y"`;
+-		
++	my $date = `date "+%d %B %Y"`;
++	my $manpage_date = $manpage_date || $date ;
++
+ 	output '.TH "';
+ 	
+ 	# If the title is not mixed-case, convention says to
+@@ -292,7 +293,7 @@
+ 	}
+ 	
+ 	output  '" "', fold_string($manpage_sect), 
+-		'" "', fold_string(`date "+%d %B %Y"`), 
++		'" "', fold_string($manpage_date), 
+ 		'" "', $manpage_misc, 
+ 		'" "', $manpage_manual, 
+ 		"\"\n";
+@@ -568,6 +569,15 @@
+ sgml('</ATTRIBUTION>', sub { $_[0]->parent->ext->{'attribution'} = pop_output(); });
+ 
+ 
++sgml('<DATE>', sub {
++	save_cdata();
++});
++sgml('</DATE>', sub { 
++	$manpage_date = fold_string(pop_output());
++	$raw_cdata--;
++});
++
++
+ # IGNORE.
+ sgml('<DOCINFO>', sub { push_output('nul'); });
+ sgml('</DOCINFO>', sub { pop_output(); });

Added: packages/docbook-utils/trunk/debian/patches/bug_394511.patch
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/docbook-utils/trunk/debian/patches/bug_394511.patch?rev=1932&op=file
==============================================================================
--- packages/docbook-utils/trunk/debian/patches/bug_394511.patch (added)
+++ packages/docbook-utils/trunk/debian/patches/bug_394511.patch Wed May  9 17:07:10 2012
@@ -1,0 +1,32 @@
+Description: docbook2man should translate the NAME section according to the REFENTRY's lang attribute
+ Currently, docbook2man translates the NAME section according to the lang
+ attribute provided to the REFNAMEDIV tag.
+ When a lang attribute is specified in the REFENTRY tag and no lang
+ attribute is specified with the REFNAMEDIV, the lang attribute of the
+ REFENTRY should be used.
+Author: Nicolas François <nicolas.francois at centraliens.net>
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+===================================================================
+--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl	2012-05-09 18:55:53.276783163 +0200
++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl	2012-05-09 18:58:04.792778418 +0200
+@@ -359,11 +359,14 @@
+ # NAME section
+ man_sgml('<REFNAMEDIV>', sub {
+ 	my %words = qw( fr NOM es NOMBRE de NAME );
+-	if (defined($_[0]->attribute('LANG')->value)) {
+-	my $id = $_[0]->attribute('LANG')->value;
+-	my $ad = $words{$id};
+-	output("\n.SH $ad\n");}
+-	else {output("\n.SH NAME\n");}
++	# Use the REFNAMEDIV's lang attribute, and default to the
++	# REFENTRY's lang attribute.
++	my $lang = $_[0]->attribute('LANG')->value;
++	$lang = $manpage_lang unless defined $lang;
++	if (defined($lang) and defined $words{lc($lang)}) {
++		my $ad = $words{lc($lang)};
++		output("\n.SH $ad\n");}
++	else {	output("\n.SH NAME\n");}
+ });
+ 
+ sgml('<REFNAME>', \&save_cdata);

Added: packages/docbook-utils/trunk/debian/patches/bug_528334.patch
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/docbook-utils/trunk/debian/patches/bug_528334.patch?rev=1932&op=file
==============================================================================
--- packages/docbook-utils/trunk/debian/patches/bug_528334.patch (added)
+++ packages/docbook-utils/trunk/debian/patches/bug_528334.patch Wed May  9 17:07:10 2012
@@ -1,0 +1,28 @@
+Description: incorrectly strips whitespace (patch included)
+ In the previous upload, docbook2man was patched to escape the special
+ characters . and ' at the beginning of a line (see #399947).
+ Unfortunately that patch was incorrect -- as well as escaping the special
+ characters, it also removes all whitespace from the beginning of
+ affected lines.  As a result, if you are in a block where whitespace
+ matters (such as <screen>...</screen>) then the output is now incorrect.
+ 
+ This is very easy to fix -- just match the whitespace and preserve it,
+ instead of tossing it away.  The full patch (just two lines) is included
+ below.
+Author:  Ben Burton <bab at debian.org>
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+===================================================================
+--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl	2012-05-09 18:59:42.584774885 +0200
++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl	2012-05-09 19:00:34.788773002 +0200
+@@ -1212,8 +1212,8 @@
+ 	$_[0] =~ s/\\/\\\\/g;
+ 
+ 	# Escape dots and single quotes in column 1
+-	$_[0] =~ s/^[ \t]*\./\\\&\./;
+-	$_[0] =~ s/^[ \t]*\'/\\\&\'/;
++	$_[0] =~ s/^([ \t]*)\./$1\\\&\./;
++	$_[0] =~ s/^([ \t]*)\'/$1\\\&\'/;
+ 
+ 	# In non-'pre'-type elements:
+ 	if(!$nocollapse_whitespace) {

Modified: packages/docbook-utils/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/docbook-utils/trunk/debian/patches/series?rev=1932&op=diff
==============================================================================
--- packages/docbook-utils/trunk/debian/patches/series (original)
+++ packages/docbook-utils/trunk/debian/patches/series Wed May  9 17:07:10 2012
@@ -1,2 +1,6 @@
 autotools_dev.patch
 spellingtypo.patch
+bug_212088.patch
+bug_214982.patch
+bug_394511.patch
+bug_528334.patch




More information about the debian-xml-sgml-commit mailing list