public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-text/docbook2X/files: docbook2X-0.8.8-preprocessor_declaration_syntax.patch docbook2X-0.8.8-error_on_missing_refentry.patch docbook2X-0.8.8-filename_whitespace_handling.patch
@ 2008-05-22 17:13 Peter Volkov (pva)
  0 siblings, 0 replies; only message in thread
From: Peter Volkov (pva) @ 2008-05-22 17:13 UTC (permalink / raw
  To: gentoo-commits

pva         08/05/22 17:13:17

  Added:               
                        docbook2X-0.8.8-preprocessor_declaration_syntax.patch
                        docbook2X-0.8.8-error_on_missing_refentry.patch
                        docbook2X-0.8.8-filename_whitespace_handling.patch
  Log:
  Some patches from debian (read patches for description). Updated deps: 1. they required at build time too, 2. fixed bug #223071, thank Mike Weissman for report and hint to fix.
  (Portage version: 2.1.4.4)

Revision  Changes    Path
1.1                  app-text/docbook2X/files/docbook2X-0.8.8-preprocessor_declaration_syntax.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/docbook2X/files/docbook2X-0.8.8-preprocessor_declaration_syntax.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/docbook2X/files/docbook2X-0.8.8-preprocessor_declaration_syntax.patch?rev=1.1&content-type=text/plain

Index: docbook2X-0.8.8-preprocessor_declaration_syntax.patch
===================================================================
#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_fix_442782_preprocessor_declaration_syntax.dpatch by Colin Watson <cjwatson@debian.org>.
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Conventionally, preprocessor declarations should start with
## DP:       '\"
## DP:   rather than
## DP:       .\"
## DP:   Current man-db only supports the first (and recommended) syntax. So
## DP:   Colin Watson provided this patch to fix docbook2x.
## DP:
## DP: <URL:http://bugs.debian.org/442782>
## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>

@DPATCH@
diff -urNad trunk~/perl/db2x_manxml.pl trunk/perl/db2x_manxml.pl
--- trunk~/perl/db2x_manxml.pl	2006-04-22 17:21:32.000000000 +0200
+++ trunk/perl/db2x_manxml.pl	2007-11-24 01:27:37.000000000 +0100
@@ -342,6 +342,25 @@
     $self->{line_start} = 1;
 }
 
+#
+# Print a comment in the output, without causing a break.
+# Params: comment - the comment text.  
+#                   May use any characters; they need not be escaped.
+#
+sub comment_nobreak
+{
+    my ($self, $comment) = @_;
+    $self->write("\n") unless $self->{line_start};
+
+    foreach my $line (split(/\n/, $comment)) {
+        $self->write('\'\" ');
+        $self->write($line);
+        $self->write("\n");
+    }
+
+    $self->{line_start} = 1;
+}
+
 
 #
 # Use a roff "escape" i.e. commands embedded in text starting with \
@@ -510,16 +529,20 @@
 
     $self->{'adjust-stack'} = [ 'b' ];
 
-    $self->{rw}->comment($elem->attr('preprocessors'))
-        if($elem->attr('preprocessors') ne '');
-
+    my $preprocessors = $elem->attr('preprocessors');
     # I've dug through the Internet to see if there was any
     # standard way to specify encoding with man pages.
     # The following seems to be a reasonable proposal:
     # <URL:http://mail.nl.linux.org/linux-utf8/2001-04/msg00168.html>
     my $encoding = $self->{options}->{'encoding'};
     $encoding =~ s#//TRANSLIT$##i;
-    $self->{rw}->comment("-*- coding: $encoding -*-");
+    $encoding = "-*- coding: $encoding -*-";
+    if ($preprocessors eq '') {
+        $preprocessors = $encoding;
+    } else {
+        $preprocessors = "$preprocessors $encoding";
+    }
+    $self->{rw}->comment_nobreak($preprocessors);
     
     # Define escapes for switching to and from monospace fonts (groff only)
     $self->{rw}->request(qw{ .if \n(.g .ds T< \\\\FC});
diff -urNad trunk~/xslt/backend/db2x_manxml.xsl trunk/xslt/backend/db2x_manxml.xsl
--- trunk~/xslt/backend/db2x_manxml.xsl	2006-04-23 16:44:52.000000000 +0200
+++ trunk/xslt/backend/db2x_manxml.xsl	2007-11-24 01:27:37.000000000 +0100
@@ -528,7 +528,7 @@
       <exslt:document method="text" 
                       encoding="{$encoding}" 
                       href="{$path}">
-        <xsl:text>.\" -*- coding: </xsl:text>
+        <xsl:text>'\" -*- coding: </xsl:text>
         <xsl:value-of select="$encoding" />
         <xsl:text> -*-&#10;</xsl:text>
         <xsl:copy-of select="$content" />
@@ -538,7 +538,7 @@
       <saxon:output method="text" 
                     encoding="{$encoding}" 
                     href="{$path}">
-        <xsl:text>.\" -*- coding: </xsl:text>
+        <xsl:text>'\" -*- coding: </xsl:text>
         <xsl:value-of select="$encoding" />
         <xsl:text> -*-&#10;</xsl:text>
         <xsl:copy-of select="$content" />



1.1                  app-text/docbook2X/files/docbook2X-0.8.8-error_on_missing_refentry.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/docbook2X/files/docbook2X-0.8.8-error_on_missing_refentry.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/docbook2X/files/docbook2X-0.8.8-error_on_missing_refentry.patch?rev=1.1&content-type=text/plain

Index: docbook2X-0.8.8-error_on_missing_refentry.patch
===================================================================
#! /bin/sh /usr/share/dpatch/dpatch-run
## 05_fix_439214_error_on_missing_refentry.dpatch by Daniel Leidert <daniel.leidert@wgdd.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: If there is no refentry element, the manpage stylesheets silently
## DP:   "ignores" this. It has been requested to print at least a
## DP:   warning.
## DP:
## DP: <URL:http://bugs.debian.org/439214>
## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>

@DPATCH@
diff -urNad trunk~/xslt/man/docbook.xsl trunk/xslt/man/docbook.xsl
--- trunk~/xslt/man/docbook.xsl	2006-04-11 21:00:19.000000000 +0200
+++ trunk/xslt/man/docbook.xsl	2008-02-05 03:31:48.000000000 +0100
@@ -111,11 +111,15 @@
     <xsl:when test="child::refentry">
       <xsl:apply-templates />
     </xsl:when>
-
-    <xsl:otherwise>
+    <xsl:when test="descendant-or-self::refentry">
       <manpageset>
         <xsl:apply-templates select="descendant-or-self::refentry" />
       </manpageset>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message terminate="no">
+        <xsl:text>WARNING: Sorry, but I cannot find a refentry element in your source!</xsl:text>
+      </xsl:message>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>



1.1                  app-text/docbook2X/files/docbook2X-0.8.8-filename_whitespace_handling.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/docbook2X/files/docbook2X-0.8.8-filename_whitespace_handling.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/docbook2X/files/docbook2X-0.8.8-filename_whitespace_handling.patch?rev=1.1&content-type=text/plain

Index: docbook2X-0.8.8-filename_whitespace_handling.patch
===================================================================
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_fix_420153_filename_whitespace_handling.dpatch by
##     Daniel Leidert (dale) <daniel.leidert@wgdd.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Peter Eisentraut reported a regression in the whitespace handling of
## DP: refentrytitle content during filename creation:
## DP: http://bugs.debian.org/420153. The problem is, that upstream first
## DP: replaces all spaces (but not linebreaks btw) with underlines and then
## DP: it tries to normalize the result. This means, that a linebreak with
## DP: additional whitespaces results in manpage names like 'foo_ ____bar.9'.
## DP: So what we basically do in this patch is, that we first normalize the
## DP: refentrytitle and then replace any spaces left with underlines.

@DPATCH@
diff -urNad docbook2x-0.8.8~/xslt/man/manpage.xsl docbook2x-0.8.8/xslt/man/manpage.xsl
--- docbook2x-0.8.8~/xslt/man/manpage.xsl	2006-04-20 15:45:55.000000000 +0200
+++ docbook2x-0.8.8/xslt/man/manpage.xsl	2007-04-20 16:19:28.000000000 +0200
@@ -30,7 +30,7 @@
 
 <xsl:template name="manpage-filename">
   <xsl:param name="filename" />
-  <xsl:value-of select="normalize-space(translate($filename, &quot; /&quot;, &quot;__&quot;))" />
+  <xsl:value-of select="translate(normalize-space($filename), ' /', '__')" />
 </xsl:template>
 
 
diff -urNad docbook2x-0.8.8~/xslt/man/refentry.xsl docbook2x-0.8.8/xslt/man/refentry.xsl
--- docbook2x-0.8.8~/xslt/man/refentry.xsl	2006-04-21 04:39:55.000000000 +0200
+++ docbook2x-0.8.8/xslt/man/refentry.xsl	2007-04-20 16:21:53.000000000 +0200
@@ -38,7 +38,11 @@
 <xsl:template name="refentry-filename">
   <xsl:param name="title" />
 
-  <xsl:variable name="title2" select="translate($title, &quot; /&quot;, &quot;__&quot;)" />
+  <xsl:variable name="title2">
+    <xsl:call-template name="manpage-filename">
+      <xsl:with-param name="filename" select="$title" />
+    </xsl:call-template>
+  </xsl:variable>
 
   <!-- not using gentext here since man page names tend not to have
        accented chars / non-Latin chars ...



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-22 17:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 17:13 [gentoo-commits] gentoo-x86 commit in app-text/docbook2X/files: docbook2X-0.8.8-preprocessor_declaration_syntax.patch docbook2X-0.8.8-error_on_missing_refentry.patch docbook2X-0.8.8-filename_whitespace_handling.patch Peter Volkov (pva)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox