summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-04-02 17:52:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-03 14:56:27 +0100
commitffa5a1bda6741f5dc9f1b8db1bb37b0c6f103c99 (patch)
tree52f36d7e26ef8d27989489e60b8588cc3ae9b4a9 /meta
parentac01686d919addab17e5a9d60cc532e82943cd9b (diff)
downloadpoky-ffa5a1bda6741f5dc9f1b8db1bb37b0c6f103c99.tar.gz
asciidoc: specify XML catalogue to use
libxml-native by default uses a XML catalogue at /etc/xml/catalog, instead of the one in the sysroot. Until this is fixed (#13260) override the XML catalogue manually in the recipe to point explicitly at the docbook-xml and docbook-xsl catalogues. This fixes either complete build failures (where the host doesn't have docbook-xml installed) or slow builds (where the host doesn't have docbook-xsl installed). (From OE-Core rev: efb6168e41797ad6ed00ede6f3d9141b90eff4b5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch53
-rw-r--r--meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb9
2 files changed, 60 insertions, 2 deletions
diff --git a/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch
new file mode 100644
index 0000000000..ca170db00f
--- /dev/null
+++ b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch
@@ -0,0 +1,53 @@
1If SGML_CATALOG_FILES is in the environment, pass --catalogs to xmllint and
2xsltproc. Also pass --nonet to xsltproc to detect future missing stylesheet
3problems.
4
5An earlier version of this patch was filed upstream at
6https://github.com/asciidoc/asciidoc-py3/issues/61 so depending on how that goes
7this could get merged.
8
9Upstream-Status: Inappropriate
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12diff --git a/a2x.py b/a2x.py
13index 2d7699a..582d809 100755
14--- a/a2x.py
15+++ b/a2x.py
16@@ -57,6 +57,10 @@ LYNX_OPTS = '-dump'
17 W3M_OPTS = '-dump -cols 70 -T text/html -no-graph'
18 XSLTPROC_OPTS = ''
19
20+if "SGML_CATALOG_FILES" in os.environ:
21+ XMLLINT += " --catalogs"
22+ XSLTPROC += " --catalogs"
23+
24 ######################################################################
25 # End of configuration file parameters.
26 ######################################################################
27@@ -298,7 +302,7 @@ def exec_xsltproc(xsl_file, xml_file, dst_dir, opts = ''):
28 cwd = os.getcwd()
29 shell_cd(dst_dir)
30 try:
31- shell('"%s" %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file))
32+ shell('%s %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file))
33 finally:
34 shell_cd(cwd)
35
36@@ -483,7 +487,7 @@ class A2X(AttrDict):
37 self.asciidoc_opts += ' --doctype %s' % self.doctype
38 for attr in self.attributes:
39 self.asciidoc_opts += ' --attribute "%s"' % attr
40-# self.xsltproc_opts += ' --nonet'
41+ self.xsltproc_opts += ' --nonet'
42 if self.verbose:
43 self.asciidoc_opts += ' --verbose'
44 self.dblatex_opts += ' -V'
45@@ -634,7 +638,7 @@ class A2X(AttrDict):
46 shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' %
47 (self.asciidoc, self.format, self.asciidoc_opts, docbook_file, self.asciidoc_file))
48 if not self.no_xmllint and XMLLINT:
49- shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
50+ shell('%s --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
51
52 def to_xhtml(self):
53 self.to_docbook()
diff --git a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
index d0d15171ac..f684f12dc7 100644
--- a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
+++ b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
@@ -8,14 +8,19 @@ LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ 8LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
9 file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069" 9 file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069"
10 10
11SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https" 11SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https \
12 file://auto-catalogs.patch"
12SRCREV = "618f6e6f6b558ed1e5f2588cd60a5a6b4f881ca0" 13SRCREV = "618f6e6f6b558ed1e5f2588cd60a5a6b4f881ca0"
13PV .= "+py3-git${SRCPV}" 14PV .= "+py3-git${SRCPV}"
14 15
15DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native" 16DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
16 17
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
18 19
20# Tell xmllint where to find the DocBook XML catalogue, because right now it
21# opens /etc/xml/catalog on the host. Depends on auto-catalogs.patch
22export SGML_CATALOG_FILES="file://${STAGING_ETCDIR_NATIVE}/xml/docbook-xml.xml file://${STAGING_ETCDIR_NATIVE}/xml/docbook-xsl.xml"
23
19# Not using automake 24# Not using automake
20inherit autotools-brokensep 25inherit autotools-brokensep
21CLEANBROKEN = "1" 26CLEANBROKEN = "1"