[arch-commits] Commit in docbook-xsl/repos (4 files)

Jan Steffens heftig at archlinux.org
Sat Mar 9 12:18:48 UTC 2019


    Date: Saturday, March 9, 2019 @ 12:18:47
  Author: heftig
Revision: 347558

archrelease: copy trunk to testing-any

Added:
  docbook-xsl/repos/testing-any/
  docbook-xsl/repos/testing-any/765567_non-recursive_string_subst.patch
    (from rev 347557, docbook-xsl/trunk/765567_non-recursive_string_subst.patch)
  docbook-xsl/repos/testing-any/PKGBUILD
    (from rev 347557, docbook-xsl/trunk/PKGBUILD)
  docbook-xsl/repos/testing-any/docbook-xsl.install
    (from rev 347557, docbook-xsl/trunk/docbook-xsl.install)

-----------------------------------------+
 765567_non-recursive_string_subst.patch |   32 +++++++++++++++++
 PKGBUILD                                |   54 ++++++++++++++++++++++++++++++
 docbook-xsl.install                     |   37 ++++++++++++++++++++
 3 files changed, 123 insertions(+)

Copied: docbook-xsl/repos/testing-any/765567_non-recursive_string_subst.patch (from rev 347557, docbook-xsl/trunk/765567_non-recursive_string_subst.patch)
===================================================================
--- testing-any/765567_non-recursive_string_subst.patch	                        (rev 0)
+++ testing-any/765567_non-recursive_string_subst.patch	2019-03-09 12:18:47 UTC (rev 347558)
@@ -0,0 +1,32 @@
+Description: use EXSLT "replace" function when available
+ A recursive implementation  of string.subst is problematic,
+ long strings with many matches will cause stack overflows.
+Author: Peter De Wachter <pdewacht at gmail.com>
+Bug-Debian: https://bugs.debian.org/750593
+
+--- docbook-xsl-1.78.1+dfsg.orig/docbook-xsl/lib/lib.xsl
++++ docbook-xsl-1.78.1+dfsg/docbook-xsl/lib/lib.xsl
+@@ -6,7 +6,11 @@
+ 
+      This module implements DTD-independent functions
+ 
+-     ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
++     ******************************************************************** -->
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++                xmlns:str="http://exslt.org/strings"
++                exclude-result-prefixes="str"
++                version="1.0">
+ 
+ <xsl:template name="dot.count">
+   <!-- Returns the number of "." characters in a string -->
+@@ -52,6 +56,9 @@
+   <xsl:param name="replacement"/>
+ 
+   <xsl:choose>
++    <xsl:when test="function-available('str:replace')">
++      <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
++    </xsl:when>
+     <xsl:when test="contains($string, $target)">
+       <xsl:variable name="rest">
+         <xsl:call-template name="string.subst">
+

Copied: docbook-xsl/repos/testing-any/PKGBUILD (from rev 347557, docbook-xsl/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2019-03-09 12:18:47 UTC (rev 347558)
@@ -0,0 +1,54 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Tom Gundersen <teg at jklm.no>
+# Contributor: Jan de Groot <jgc at archlinux.org>
+# Contributor: Sean Middleditch <elanthis at awesomeplay.com>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=docbook-xsl
+pkgver=1.79.2
+pkgrel=5
+pkgdesc='XML stylesheets for Docbook-xml transformations'
+url='https://docbook.org/'
+arch=(any)
+license=(custom)
+install=$pkgname.install
+source=(https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F$pkgver/docbook-xsl{,-nons}-$pkgver.tar.gz
+        765567_non-recursive_string_subst.patch)
+sha256sums=('966188d7c05fc76eaca115a55893e643dd01a3486f6368733c9ad974fcee7a26'
+            'f89425b44e48aad24319a2f0d38e0cb6059fdc7dbaf31787c8346c748175ca8e'
+            '193ec26dcb37bdf12037ed4ea98d68bd550500c8e96b719685d76d7096c3f9b3')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np2 -i ../765567_non-recursive_string_subst.patch
+
+  cd ../$pkgname-nons-$pkgver
+  patch -Np2 -i ../765567_non-recursive_string_subst.patch
+}
+
+package() {
+  depends=(libxml2 libxslt docbook-xml)
+
+  local pkgroot ns dir
+  for ns in -nons ''; do
+    pkgroot="$pkgdir/usr/share/xml/docbook/xsl-stylesheets-$pkgver$ns"
+    dir=$pkgname$ns-$pkgver
+
+    install -Dt "$pkgroot" -m644 $dir/VERSION{,.xsl}
+
+    (
+      shopt -s nullglob  # ignore missing files
+      for fn in assembly common eclipse epub epub3 fo highlighting html \
+        htmlhelp javahelp lib manpages params profiling roundtrip template \
+        website xhtml xhtml-1_1 xhtml5
+      do
+        install -Dt "$pkgroot/$fn" -m644 $dir/$fn/*.{xml,xsl,dtd,ent}
+      done
+    )
+  done
+
+  install -d "$pkgdir/etc/xml"
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $dir/COPYING
+}
+
+# vim:set sw=2 et:

Copied: docbook-xsl/repos/testing-any/docbook-xsl.install (from rev 347557, docbook-xsl/trunk/docbook-xsl.install)
===================================================================
--- testing-any/docbook-xsl.install	                        (rev 0)
+++ testing-any/docbook-xsl.install	2019-03-09 12:18:47 UTC (rev 347558)
@@ -0,0 +1,37 @@
+_xmlcatalog() {
+  xmlcatalog --noout "$@" etc/xml/catalog
+}
+
+post_install() {
+  [[ -f etc/xml/catalog ]] || _xmlcatalog --create
+
+  local ver x new=${1%-*}
+
+  for ver in $new current; do
+    for x in rewriteSystem rewriteURI; do
+      _xmlcatalog --add $x http://cdn.docbook.org/release/xsl/$ver \
+        /usr/share/xml/docbook/xsl-stylesheets-$new
+
+      _xmlcatalog --add $x http://docbook.sourceforge.net/release/xsl-ns/$ver \
+        /usr/share/xml/docbook/xsl-stylesheets-$new
+
+      _xmlcatalog --add $x http://docbook.sourceforge.net/release/xsl/$ver \
+        /usr/share/xml/docbook/xsl-stylesheets-$new-nons
+    done
+  done
+}
+
+post_upgrade() {
+  post_remove $2
+  post_install $1
+}
+
+post_remove() {
+  local old=${1%-*}
+  _xmlcatalog --del /usr/share/xml/docbook/xsl-stylesheets-$old
+  if (( $(vercmp $1 1.79.2-5) >= 0 )); then
+    _xmlcatalog --del /usr/share/xml/docbook/xsl-stylesheets-$old-nons
+  fi
+}
+
+# vim:set ft=sh sw=2 et:



More information about the arch-commits mailing list