mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added extra/docbook-xsl
This commit is contained in:
parent
0a8e2d3763
commit
a22605a163
3 changed files with 120 additions and 0 deletions
31
extra/docbook-xsl/765567_non-recursive_string_subst.patch
Normal file
31
extra/docbook-xsl/765567_non-recursive_string_subst.patch
Normal file
|
@ -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">
|
48
extra/docbook-xsl/PKGBUILD
Normal file
48
extra/docbook-xsl/PKGBUILD
Normal file
|
@ -0,0 +1,48 @@
|
|||
# $Id$
|
||||
# Maintainer: Antonio Rojas <arojas@archlinux.org>
|
||||
# Contributor: Tom Gundersen <teg@jklm.no>
|
||||
# Contributor: Jan de Groot <jgc@archlinux.org>
|
||||
# Contributor: Sean Middleditch <elanthis@awesomeplay.com>
|
||||
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - update and patch the fix from 1.79.1-2
|
||||
# - remove when upstream adds the patch back in
|
||||
|
||||
pkgname=docbook-xsl
|
||||
pkgver=1.79.2
|
||||
pkgrel=1.1
|
||||
pkgdesc='XML stylesheets for Docbook-xml transformations'
|
||||
arch=(any)
|
||||
license=(custom)
|
||||
url='http://docbook.org/'
|
||||
depends=(libxml2 libxslt docbook-xml)
|
||||
install="$pkgname.install"
|
||||
source=("https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F$pkgver/docbook-xsl-$pkgver.tar.gz"
|
||||
765567_non-recursive_string_subst.patch)
|
||||
sha256sums=('966188d7c05fc76eaca115a55893e643dd01a3486f6368733c9ad974fcee7a26'
|
||||
'9354a4cd1ae5020d4a378cce7c9ca2162d6835a97155c4a5719927903a0a91f7')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
patch -Np2 -i ../765567_non-recursive_string_subst.patch
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
_pkgroot="$pkgdir"/usr/share/xml/docbook/xsl-stylesheets-$pkgver
|
||||
|
||||
install -dm755 ${_pkgroot}
|
||||
install -m644 VERSION VERSION.xsl ${_pkgroot}
|
||||
|
||||
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 -dm755 ${_pkgroot}/${fn}
|
||||
install -m644 ${fn}/*.{xml,xsl,dtd,ent} ${_pkgroot}/${fn} || true # ignore missing files
|
||||
done
|
||||
|
||||
install -dm755 "$pkgdir"/etc/xml
|
||||
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
41
extra/docbook-xsl/docbook-xsl.install
Normal file
41
extra/docbook-xsl/docbook-xsl.install
Normal file
|
@ -0,0 +1,41 @@
|
|||
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
|
||||
}
|
Loading…
Reference in a new issue