diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-11 21:03:45 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-11 21:03:45 +0000 |
commit | b8a4be9e71e9a8768cfa344b64bae186690a5fb1 (patch) | |
tree | 464e5f1e1eb69df9d8daaf5d8d59e8b62444fdf4 /user/docbook2x | |
parent | 4b5db770f22714a3d481f3ab091e28d140e5d053 (diff) | |
download | packages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.tar.gz packages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.tar.bz2 packages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.tar.xz packages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.zip |
user/docbook2x: new package
Diffstat (limited to 'user/docbook2x')
-rw-r--r-- | user/docbook2x/APKBUILD | 48 | ||||
-rw-r--r-- | user/docbook2x/doc-typo.patch | 24 | ||||
-rw-r--r-- | user/docbook2x/manpage-comments.patch | 81 | ||||
-rw-r--r-- | user/docbook2x/refentry-whitespace.patch | 34 | ||||
-rw-r--r-- | user/docbook2x/sourceforge-url.patch | 19 |
5 files changed, 206 insertions, 0 deletions
diff --git a/user/docbook2x/APKBUILD b/user/docbook2x/APKBUILD new file mode 100644 index 000000000..edd43eb3c --- /dev/null +++ b/user/docbook2x/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: A. Wilcox <awilfox@adelielinux.org> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=docbook2x +pkgver=0.8.8 +pkgrel=0 +pkgdesc="Tool to convert DocBook XML to Unix man pages" +url="http://docbook2x.sourceforge.net/" +arch="all" +license="MIT" +depends="docbook-xml docbook-xsl libxml2-utils libxslt perl-xml-sax" +makedepends="$depends_dev" +subpackages="$pkgname-doc" +source="https://downloads.sourceforge.net/docbook2x/docbook2X-$pkgver.tar.gz + doc-typo.patch + manpage-comments.patch + refentry-whitespace.patch + sourceforge-url.patch + " +builddir="$srcdir/docbook2X-$pkgver" + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --program-transform-name 's/docbook2/docbook2x-/' + make +} + +check() { + cd "$builddir"/test/refentry + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="cc336017ad734fc62d96d289105e8ea154c418a03a37f3e21b0b3520063f8b466b4aae5a5aec2e0b83f6324c6c79b5557247a93338d0a9882a94a44112f6b65c docbook2X-0.8.8.tar.gz +a563b46e7eaa8052dc2daea6ad8b0f3b12780ef063fafd37a6345ae663f6229ccb0b52be5e7b1fd6584d31e56de89af391efb856bbabfed164353578b39fb458 doc-typo.patch +f204384bb206324d813b36e4e87e6a96f8b5808bfb3d7396505c84efc6784d4950a87533a3be1c67fce5f7b1d2f76eee8cf57f3ae48e3df43cf0cdc6531fbe14 manpage-comments.patch +10ce7f7da9bb2e05701a38d9e6900e87e62043604736eef5dbb52d8b143c8693463cffacf24453ec3d1e057b0b243d1c53952247f412e6f036c7067ad5840c1f refentry-whitespace.patch +c9dfbc19fc6bd11980c6da264e2683fd3c320f8c5d0d35f6c6d322cf3e7341d2d3fc88498e4a0213d4191f83c238abb0d824630be1360b3ec58e9887e8309aaa sourceforge-url.patch" diff --git a/user/docbook2x/doc-typo.patch b/user/docbook2x/doc-typo.patch new file mode 100644 index 000000000..5be21bdf9 --- /dev/null +++ b/user/docbook2x/doc-typo.patch @@ -0,0 +1,24 @@ +Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> + +--- docbook2x-0.8.8.orig/doc/docbook2man.1 ++++ docbook2x-0.8.8/doc/docbook2man.1 +@@ -187,7 +187,7 @@ parameter instead. + + However, inside a custom stylesheet + (\fInot on the command-line\fR) +-this paramter can be set to the XPath expression ++this parameter can be set to the XPath expression + \*(T<document('')\*(T>, + which will cause the custom translations + directly embedded inside the custom stylesheet to be read. +--- docbook2x-0.8.8.orig/doc/docbook2texi.1 ++++ docbook2x-0.8.8/doc/docbook2texi.1 +@@ -230,7 +230,7 @@ parameter instead. + + However, inside a custom stylesheet + (\fInot on the command-line\fR) +-this paramter can be set to the XPath expression ++this parameter can be set to the XPath expression + \*(T<document('')\*(T>, + which will cause the custom translations + directly embedded inside the custom stylesheet to be read. diff --git a/user/docbook2x/manpage-comments.patch b/user/docbook2x/manpage-comments.patch new file mode 100644 index 000000000..c78a95c91 --- /dev/null +++ b/user/docbook2x/manpage-comments.patch @@ -0,0 +1,81 @@ +# Conventionally, preprocessor declarations should start with +# '\" +# rather than +# .\" +# Current man-db only supports the first (and recommended) syntax. + +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> -*- </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> -*- </xsl:text> + <xsl:copy-of select="$content" /> diff --git a/user/docbook2x/refentry-whitespace.patch b/user/docbook2x/refentry-whitespace.patch new file mode 100644 index 000000000..d80ab18b0 --- /dev/null +++ b/user/docbook2x/refentry-whitespace.patch @@ -0,0 +1,34 @@ +# Peter Eisentraut reported a regression in the whitespace handling of +# refentrytitle content during filename creation: http://bugs.debian.org/420153 +# The problem is docbook2x replaces all spaces with underlines and then tries +# to normalize the result. A linebreak with additional whitespaces results in +# manpage names like 'foo_ ____bar.9'. + +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, " /", "__"))" /> ++ <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, " /", "__")" /> ++ <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 ... diff --git a/user/docbook2x/sourceforge-url.patch b/user/docbook2x/sourceforge-url.patch new file mode 100644 index 000000000..d6fd4a44a --- /dev/null +++ b/user/docbook2x/sourceforge-url.patch @@ -0,0 +1,19 @@ +## Ondrej Certik reported a resolver issue: http://bugs.debian.org/418703. +## The error seems to be caused by using the abbreviated sf.net URLs. + +diff -urNad docbook2x-0.8.8~/perl/db2x_xsltproc.pl docbook2x-0.8.8/perl/db2x_xsltproc.pl +--- docbook2x-0.8.8~/perl/db2x_xsltproc.pl 2004-08-18 16:21:52.000000000 +0200 ++++ docbook2x-0.8.8/perl/db2x_xsltproc.pl 2007-04-12 16:07:20.000000000 +0200 +@@ -110,10 +110,10 @@ + + if($options->{'stylesheet'} eq 'texi') { + $options->{'stylesheet'} = +- "http://docbook2x.sf.net/latest/xslt/texi/docbook.xsl"; ++ "http://docbook2x.sourceforge.net/latest/xslt/texi/docbook.xsl"; + } elsif($options->{'stylesheet'} eq 'man') { + $options->{'stylesheet'} = +- "http://docbook2x.sf.net/latest/xslt/man/docbook.xsl"; ++ "http://docbook2x.sourceforge.net/latest/xslt/man/docbook.xsl"; + } + + if(scalar(@argv) != 1) { |