[arch-commits] Commit in docbook-xsl/trunk (2 files)
Jan de Groot
jgc at archlinux.org
Fri Nov 4 13:36:19 UTC 2016
Date: Friday, November 4, 2016 @ 13:36:18
Author: jgc
Revision: 279835
upgpkg: docbook-xsl 1.79.1-2
Add non-recursive string_subst function from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765567
Added:
docbook-xsl/trunk/765567_non-recursive_string_subst.patch
Modified:
docbook-xsl/trunk/PKGBUILD
-----------------------------------------+
765567_non-recursive_string_subst.patch | 30 ++++++++++++++++++++++++++++++
PKGBUILD | 13 ++++++++++---
2 files changed, 40 insertions(+), 3 deletions(-)
Added: 765567_non-recursive_string_subst.patch
===================================================================
--- 765567_non-recursive_string_subst.patch (rev 0)
+++ 765567_non-recursive_string_subst.patch 2016-11-04 13:36:18 UTC (rev 279835)
@@ -0,0 +1,30 @@
+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
+@@ -10,7 +10,10 @@
+ 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 -->
+@@ -56,6 +59,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">
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-11-04 12:49:02 UTC (rev 279834)
+++ PKGBUILD 2016-11-04 13:36:18 UTC (rev 279835)
@@ -6,7 +6,7 @@
pkgname=docbook-xsl
pkgver=1.79.1
-pkgrel=1
+pkgrel=2
pkgdesc='XML stylesheets for Docbook-xml transformations'
arch=('any')
license=('custom')
@@ -13,8 +13,16 @@
url='http://docbook.sourceforge.net/'
depends=('libxml2' 'libxslt' 'docbook-xml')
install="$pkgname.install"
-source=("http://downloads.sourceforge.net/docbook/${pkgname}-${pkgver}.tar.bz2")
+source=("https://downloads.sourceforge.net/docbook/${pkgname}-${pkgver}.tar.bz2"
+ 765567_non-recursive_string_subst.patch)
+md5sums=('b48cbf929a2ad85e6672f710777ca7bc'
+ 'e0dbf66b23121ae789f1930fe90fae0c')
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np2 -i ../765567_non-recursive_string_subst.patch
+}
+
package() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -32,4 +40,3 @@
install -dm755 ${pkgdir}/etc/xml
install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
-md5sums=('b48cbf929a2ad85e6672f710777ca7bc')
More information about the arch-commits
mailing list