aboutsummaryrefslogtreecommitdiffstats
path: root/main/docbook-xsl
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-11-06 08:51:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-11-06 09:09:11 +0000
commit8de3834ac8ce4411683cf6531921305961d9fcbe (patch)
treec733615d8ae8f67a43181df3b9ae85f0d790342d /main/docbook-xsl
parentd729abe7def371f4550fb58cd7054eff4552389e (diff)
downloadaports-8de3834ac8ce4411683cf6531921305961d9fcbe.tar.bz2
aports-8de3834ac8ce4411683cf6531921305961d9fcbe.tar.xz
Revert "main/docbook-xsl: remove not needed patch and bump pkgrel"
The non-recursive-string-subst patch is needed for building samba docs. Rebase it again against 1.79.2. This reverts commit 218abcf559420f71eb7f8f96b0c066ffa7f62590 and paritally reverts 163ac6aeef12affd8b0296e5c491fa944f313d63.
Diffstat (limited to 'main/docbook-xsl')
-rw-r--r--main/docbook-xsl/765567_non-recursive_string_subst.patch33
-rw-r--r--main/docbook-xsl/APKBUILD6
2 files changed, 37 insertions, 2 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..3a5fe80745
--- /dev/null
+++ b/main/docbook-xsl/765567_non-recursive_string_subst.patch
@@ -0,0 +1,33 @@
+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
+
+diff --git a/lib/lib.xsl b/lib/lib.xsl
+index e65776a..bc45cd8 100644
+--- a/lib/lib.xsl
++++ b/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">
diff --git a/main/docbook-xsl/APKBUILD b/main/docbook-xsl/APKBUILD
index 80c6f99409..e5b8be5d90 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.2
-pkgrel=1
+pkgrel=2
pkgdesc="XML stylesheets for Docbook-xml transformations."
url="https://docbook.org"
arch="noarch"
@@ -11,6 +11,7 @@ makedepends=""
options="!check"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
source="https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F$pkgver/docbook-xsl-$pkgver.tar.gz
+ 765567_non-recursive_string_subst.patch
"
build() {
@@ -42,4 +43,5 @@ package() {
"$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
-sha512sums="cd375e7a2339bcd9d24936b370c4371b351cab7c8a79044e785d0300dab75bed5a5c9b9076d4fba32d39b22535edfc6f449a7b1086139ad8bf54eab844b9434e docbook-xsl-1.79.2.tar.gz"
+sha512sums="cd375e7a2339bcd9d24936b370c4371b351cab7c8a79044e785d0300dab75bed5a5c9b9076d4fba32d39b22535edfc6f449a7b1086139ad8bf54eab844b9434e docbook-xsl-1.79.2.tar.gz
+3199de6b5a61ed25defa50a55fa3d138b60e1f5e4c2e3b9a14e169099189794adc3ac079fa3f62debc682f4840c6dadff40f8bd5a07fdba34fe1016ce885b9e2 765567_non-recursive_string_subst.patch"