Compare commits

..
3 Commits
Author SHA1 Message Date
EnumDev 9bc6d6ad47 Switch to new package format 2026-06-13 19:59:06 +03:00
EnumDev 1e61c998a9 Add missing files 2026-03-13 20:06:23 +02:00
EnumDev d156cb4bf2 Switch to new download format, update source.sh script and add patch 2026-03-13 18:30:48 +02:00
4 changed files with 58 additions and 33 deletions
+20
View File
@@ -0,0 +1,20 @@
name: docbook-xsl-nons
description: Docbook XSL modular stylesheet
version: 1.79.2
revision: 6
url: https://docbook.org/
license: LicenseRef-docbook-XSL
maintainers:
- [email protected]
architecture: any
output_architecture: any
type: source
depends:
- docbook-xml
- libxml2
- libxslt
downloads:
- url: https://github.com/docbook/xslt10-stylesheets/releases/download/release/${BPM_PKG_VERSION}/docbook-xsl-nons-${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: f89425b44e48aad24319a2f0d38e0cb6059fdc7dbaf31787c8346c748175ca8e
-13
View File
@@ -1,13 +0,0 @@
name: docbook-xsl-nons
description: Docbook XSL modular stylesheet
version: 1.79.2
revision: 3
url: https://docbook.org/
license: LicenseRef-docbook-XSL
architecture: any
output_architecture: any
type: source
depends:
- docbook-xml
- libxml2
- libxslt
+6 -20
View File
@@ -1,25 +1,19 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
DOWNLOAD="https://github.com/docbook/xslt10-stylesheets/releases/download/release/${BPM_PKG_VERSION}/docbook-xsl-nons-${BPM_PKG_VERSION}.tar.bz2"
DOWNLOAD_DOCS="https://github.com/docbook/xslt10-stylesheets/releases/download/release/${BPM_PKG_VERSION}/docbook-xsl-doc-${BPM_PKG_VERSION}.tar.bz2"
FILENAME="${DOWNLOAD##*/}"
FILENAME_DOCS="${DOWNLOAD_DOCS##*/}"
# The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
wget "$DOWNLOAD"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
wget "$DOWNLOAD_DOCS"
tar -xvf "$FILENAME_DOCS" --strip-components=1 -C "$BPM_SOURCE"
cd "$BPM_SOURCE"
patch -Np2 -i "$BPM_WORKDIR"/765567_non-recursive_string_subst.patch
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
install -dvm755 "$BPM_OUTPUT"/usr/share/xml/docbook/xsl-stylesheets-nons-${BPM_PKG_VERSION}
install -m644 "$BPM_SOURCE"/VERSION{,.xsl} -t "$BPM_OUTPUT"/usr/share/xml/docbook/xsl-stylesheets-nons-${BPM_PKG_VERSION}
(
shopt -s nullglob
for i in assembly common eclipse epub epub3 fo highlighting html \
@@ -30,14 +24,6 @@ package() {
done
)
install -Dm644 VERSION{,.xsl} -t "$BPM_OUTPUT"/usr/share/xml/docbook/xsl-stylesheets-nons-${BPM_PKG_VERSION}
install -Dvm644 README \
"$BPM_OUTPUT"/usr/share/doc/docbook-xsl-nons/README.txt
install -Dvm644 RELEASE-NOTES* NEWS* \
"$BPM_OUTPUT"/usr/share/doc/docbook-xsl-nons
cp -v -R doc/* "$BPM_OUTPUT"/usr/share/doc/docbook-xsl-nons
# Install package license
install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/docbook-xsl-nons/COPYING
}
@@ -0,0 +1,32 @@
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 <[email protected]>
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">