From e19e176e673e9b1129c640e12a85f1338130f29e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 19 Dec 2018 11:37:35 -0600 Subject: [PATCH] Add latest version of docbook-xsl (#10147) --- .../docbook-xsl-1.79.2-stack_fix-1.patch | 39 +++++++++++++++++++ .../builtin/packages/docbook-xsl/package.py | 21 +++++----- 2 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 var/spack/repos/builtin/packages/docbook-xsl/docbook-xsl-1.79.2-stack_fix-1.patch diff --git a/var/spack/repos/builtin/packages/docbook-xsl/docbook-xsl-1.79.2-stack_fix-1.patch b/var/spack/repos/builtin/packages/docbook-xsl/docbook-xsl-1.79.2-stack_fix-1.patch new file mode 100644 index 0000000000..eaba57963f --- /dev/null +++ b/var/spack/repos/builtin/packages/docbook-xsl/docbook-xsl-1.79.2-stack_fix-1.patch @@ -0,0 +1,39 @@ +Submitted By: Bruce Dubbs +Date: 2018-01-01 +Initial Package Version: 1.78.1 +Upstream Status: Unsure +Origin: Peter De Wachter +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 +Bug-Debian: https://bugs.debian.org/750593 + +Rediffed for 1.79.2 by Bruce Dubbs + +diff -Naur docbook-xsl-1.79.2.orig/lib/lib.xsl docbook-xsl-1.79.2/lib/lib.xsl +--- docbook-xsl-1.79.2.orig/lib/lib.xsl 2016-12-09 16:41:39.000000000 -0600 ++++ docbook-xsl-1.79.2/lib/lib.xsl 2018-01-01 12:54:52.507332514 -0600 +@@ -6,7 +6,11 @@ + + This module implements DTD-independent functions + +- ******************************************************************** --> ++ ******************************************************************** --> ++ + + + +@@ -52,6 +56,9 @@ + + + ++ ++ ++ + + + diff --git a/var/spack/repos/builtin/packages/docbook-xsl/package.py b/var/spack/repos/builtin/packages/docbook-xsl/package.py index 1cd1c3ae3d..f4676ba4d9 100644 --- a/var/spack/repos/builtin/packages/docbook-xsl/package.py +++ b/var/spack/repos/builtin/packages/docbook-xsl/package.py @@ -8,23 +8,20 @@ class DocbookXsl(Package): - """Docbook XSL vocabulary.""" - homepage = "http://docbook.sourceforge.net/" - url = "https://downloads.sourceforge.net/project/docbook/docbook-xsl/1.79.1/docbook-xsl-1.79.1.tar.bz2" + """DocBook XSLT 1.0 Stylesheets.""" - version('1.79.1', 'b48cbf929a2ad85e6672f710777ca7bc') + homepage = "https://github.com/docbook/xslt10-stylesheets" + url = "https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F1.79.2/docbook-xsl-1.79.2.tar.bz2" + + version('1.79.2', sha256='316524ea444e53208a2fb90eeb676af755da96e1417835ba5f5eb719c81fa371') depends_on('docbook-xml') + patch('docbook-xsl-1.79.2-stack_fix-1.patch', when='@1.79.2') + def install(self, spec, prefix): - for item in os.listdir('.'): - src = os.path.abspath(item) - dst = os.path.join(prefix, item) - if os.path.isdir(item): - install_tree(src, dst, symlinks=True) - else: - install(src, dst) + install_tree('.', prefix) def setup_environment(self, spack_env, run_env): - catalog = os.path.join(self.spec.prefix, 'catalog.xml') + catalog = os.path.join(self.prefix, 'catalog.xml') run_env.set('XML_CATALOG_FILES', catalog, separator=' ')