docbook-xsl yenilendi
This commit is contained in:
1 parent
9111c6d218
commit
eac1b2d727
3 files changed
+83
-5
No files matched your search
@@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
--- 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">
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
post_install() {
|
||||||
|
if [ ! -f /etc/xml/catalog ]; then
|
||||||
|
xmlcatalog --noout --create /etc/xml/catalog
|
||||||
|
fi
|
||||||
|
_NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'`
|
||||||
|
|
||||||
|
xmlcatalog --noout --add "rewriteSystem" \
|
||||||
|
"http://docbook.sourceforge.net/release/xsl/${_NEW}" \
|
||||||
|
"/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
|
||||||
|
etc/xml/catalog
|
||||||
|
|
||||||
|
xmlcatalog --noout --add "rewriteURI" \
|
||||||
|
"http://docbook.sourceforge.net/release/xsl/${_NEW}" \
|
||||||
|
"/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
|
||||||
|
etc/xml/catalog &&
|
||||||
|
|
||||||
|
xmlcatalog --noout --add "rewriteSystem" \
|
||||||
|
"http://docbook.sourceforge.net/release/xsl/current" \
|
||||||
|
"/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
|
||||||
|
etc/xml/catalog &&
|
||||||
|
|
||||||
|
xmlcatalog --noout --add "rewriteURI" \
|
||||||
|
"http://docbook.sourceforge.net/release/xsl/current" \
|
||||||
|
"/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
|
||||||
|
etc/xml/catalog
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
post_remove $2
|
||||||
|
post_install $1
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
_OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'`
|
||||||
|
xmlcatalog --noout --del "/usr/share/xml/docbook/xsl-stylesheets-${_OLD}" etc/xml/catalog
|
||||||
|
|
||||||
|
if [ $(vercmp $1 1.72.0-3) -lt 0 ]; then
|
||||||
|
xmlcatalog --noout --del "/usr/share/xml/docbook" etc/xml/catalog
|
||||||
|
xmlcatalog --noout --del "file:///etc/xml/docbook" etc/xml/catalog
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
op=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
$op $*
|
||||||
@@ -7,20 +7,21 @@ description='XML stylesheets for Docbook-xml transformations'
|
|||||||
email='akarsu@protonmail.com'
|
email='akarsu@protonmail.com'
|
||||||
maintainer='akarsu'
|
maintainer='akarsu'
|
||||||
license=('custom')
|
license=('custom')
|
||||||
source=(https://github.com/docbook/xslt10-stylesheets/releases/download/release/$version/docbook-xsl{,-nons}-$version.zip '765567_non-recursive_string_subst.patch')
|
source=(https://github.com/docbook/xslt10-stylesheets/releases/download/release/${version}/docbook-xsl{,-nons}-${version}.zip
|
||||||
|
'docbook-xls.install'
|
||||||
|
'765567_non-recursive_string_subst.patch')
|
||||||
depends=(docbook-xml libxml2 libxslt)
|
depends=(docbook-xml libxml2 libxslt)
|
||||||
makedepends=()
|
makedepends=()
|
||||||
md5sums=('39c12481817d5a57501d27621eeba9a8' 'df397633036d576f04431f1b00047910' 'd41d8cd98f00b204e9800998ecf8427e')
|
md5sums=('39c12481817d5a57501d27621eeba9a8' 'df397633036d576f04431f1b00047910' 'SKIP' 'SKIP')
|
||||||
group=(app.text)
|
group=(app.text)
|
||||||
uses=()
|
uses=()
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
|
|
||||||
install=$name.install
|
install=../../$name.install
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
|
ls -l ../
|
||||||
build(){
|
build(){
|
||||||
|
|
||||||
patch -Np2 -i ../765567_non-recursive_string_subst.patch
|
patch -Np2 -i ../765567_non-recursive_string_subst.patch
|
||||||
cd ../$name-nons-$version
|
cd ../$name-nons-$version
|
||||||
patch -Np2 -i ../765567_non-recursive_string_subst.patch
|
patch -Np2 -i ../765567_non-recursive_string_subst.patch
|
||||||
|
|||||||
Reference in new issue
Block a user