From 6a5d399f55f09c0447f37c5cd14425203681225a Mon Sep 17 00:00:00 2001 From: lorddavidiii Date: Wed, 28 Oct 2020 02:11:37 +0100 Subject: asciidoc-py3 add docbook dependency and fix a enviroment variable problem for docbook-{xml,xsl} (#19547) * asciidoc-py3: add docbook-{xml,xsl} dependency * docbook-{xsl,xml}: fix XML_CATALOG_FILES enviroment variable --- var/spack/repos/builtin/packages/asciidoc-py3/package.py | 2 ++ var/spack/repos/builtin/packages/docbook-xml/package.py | 10 +++++++++- var/spack/repos/builtin/packages/docbook-xsl/package.py | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/asciidoc-py3/package.py b/var/spack/repos/builtin/packages/asciidoc-py3/package.py index b8c9d9f03a..5bfe18f7da 100644 --- a/var/spack/repos/builtin/packages/asciidoc-py3/package.py +++ b/var/spack/repos/builtin/packages/asciidoc-py3/package.py @@ -23,3 +23,5 @@ class AsciidocPy3(AutotoolsPackage): depends_on('python@3.5:', type=('build', 'run')) depends_on('libxml2', type=('build', 'run')) depends_on('libxslt', type=('build', 'run')) + depends_on('docbook-xml', type=('build', 'run')) + depends_on('docbook-xsl', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/docbook-xml/package.py b/var/spack/repos/builtin/packages/docbook-xml/package.py index 257d2566f8..35b6669a50 100644 --- a/var/spack/repos/builtin/packages/docbook-xml/package.py +++ b/var/spack/repos/builtin/packages/docbook-xml/package.py @@ -20,6 +20,14 @@ class DocbookXml(Package): def install(self, spec, prefix): install_tree('.', prefix) + @property + def catalog(self): + return os.path.join(self.prefix, 'catalog.xml') + def setup_run_environment(self, env): - catalog = os.path.join(self.prefix, 'catalog.xml') + catalog = self.catalog env.set('XML_CATALOG_FILES', catalog, separator=' ') + + def setup_dependent_build_environment(self, env, dependent_spec): + catalog = self.catalog + env.set("XML_CATALOG_FILES", catalog, separator=' ') diff --git a/var/spack/repos/builtin/packages/docbook-xsl/package.py b/var/spack/repos/builtin/packages/docbook-xsl/package.py index 9533f3950c..8b7d84007a 100644 --- a/var/spack/repos/builtin/packages/docbook-xsl/package.py +++ b/var/spack/repos/builtin/packages/docbook-xsl/package.py @@ -28,8 +28,8 @@ class DocbookXsl(Package): def setup_run_environment(self, env): catalog = self.catalog - env.set('XML_CATALOG_FILES', catalog, separator=' ') + env.prepend_path('XML_CATALOG_FILES', catalog, separator=' ') def setup_dependent_build_environment(self, env, dependent_spec): catalog = self.catalog - env.prepend_path("XML_CATALOG_FILES", catalog) + env.prepend_path("XML_CATALOG_FILES", catalog, separator=' ') -- cgit v1.2.3-70-g09d2