diff options
Diffstat (limited to 'main/docbook-xsl')
-rw-r--r-- | main/docbook-xsl/765567_non-recursive_string_subst.patch | 30 | ||||
-rw-r--r-- | main/docbook-xsl/APKBUILD | 11 |
2 files changed, 36 insertions, 5 deletions
diff --git a/main/docbook-xsl/765567_non-recursive_string_subst.patch b/main/docbook-xsl/765567_non-recursive_string_subst.patch new file mode 100644 index 0000000000..99ce9960d9 --- /dev/null +++ b/main/docbook-xsl/765567_non-recursive_string_subst.patch @@ -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@gmail.com> +Bug-Debian: https://bugs.debian.org/750593 + +--- a/lib/lib.xsl ++++ b/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"> diff --git a/main/docbook-xsl/APKBUILD b/main/docbook-xsl/APKBUILD index edadb30c73..53059752d2 100644 --- a/main/docbook-xsl/APKBUILD +++ b/main/docbook-xsl/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=docbook-xsl pkgver=1.79.1 -pkgrel=0 +pkgrel=1 pkgdesc="XML stylesheets for Docbook-xml transformations." url="http://docbook.sourceforge.net/" arch="noarch" @@ -10,7 +10,9 @@ depends="libxml2-utils libxslt docbook-xml" makedepends="" options="!check" install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall" -source="http://downloads.sourceforge.net/sourceforge/docbook/$pkgname-$pkgver.tar.bz2" +source="http://downloads.sourceforge.net/sourceforge/docbook/$pkgname-$pkgver.tar.bz2 + 765567_non-recursive_string_subst.patch + " build() { return 0 @@ -41,6 +43,5 @@ package() { "$pkgdir"/usr/share/licenses/$pkgname/COPYING } -md5sums="b48cbf929a2ad85e6672f710777ca7bc docbook-xsl-1.79.1.tar.bz2" -sha256sums="725f452e12b296956e8bfb876ccece71eeecdd14b94f667f3ed9091761a4a968 docbook-xsl-1.79.1.tar.bz2" -sha512sums="83325cbaf1545da6b9b8b77f5f0e6fdece26e3c455164b300a1aa3d19e3bd29ae71fd563553a714a5394968d1a65684c6c7987c77524469358d18b8c227025c7 docbook-xsl-1.79.1.tar.bz2" +sha512sums="83325cbaf1545da6b9b8b77f5f0e6fdece26e3c455164b300a1aa3d19e3bd29ae71fd563553a714a5394968d1a65684c6c7987c77524469358d18b8c227025c7 docbook-xsl-1.79.1.tar.bz2 +6a26838078a3ce28273dddfa1af6a378cffc28b6d1ba48a4cfc839addd7bf58ce217d6584b735f9c75381954744ab2386c75fa3c593858b6e27882be55c00d04 765567_non-recursive_string_subst.patch" |