diff mbox series

[v2,4/9] docbook-xsl: use xmlcatalog

Message ID 20190404221644.20496-4-ross.burton@intel.com
State Accepted
Commit c4638117142b4e516755161bf35b29c82f41cfc7
Headers show
Series [v2,1/9] xmlcatalog: new class to update the XML catalogue | expand

Commit Message

Ross Burton April 4, 2019, 10:16 p.m. UTC
There is no need to ship a static catalog that we have to patch, as upstream
comes with a catalog fragment.

Use the xmlcatalog class to register this catalog.

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 .../docbook-xsl-stylesheets/docbook-xsl.xml         |  6 ------
 .../docbook-xml/docbook-xsl-stylesheets_1.79.1.bb   | 21 +++++++--------------
 2 files changed, 7 insertions(+), 20 deletions(-)
 delete mode 100644 meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
deleted file mode 100644
index c60555ae149..00000000000
--- a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
+++ /dev/null
@@ -1,6 +0,0 @@ 
-<?xml version="1.0"?>
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
-<delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets/catalog.xml"/>
-<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets/catalog.xml"/>
-</catalog>
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
index 036fc15dc9a..ff38e874b3e 100644
--- a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
@@ -4,7 +4,6 @@  LICENSE = "XSL"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6beadd98f9c54ab0c387e14211ee4d0e"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-xsl-${PV}.tar.bz2 \
-           file://docbook-xsl.xml \
            file://docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch \
 "
 
@@ -15,10 +14,11 @@  UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-xsl/
 # Reject versions ending in .0 as those are release candidates
 UPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
 
+DEPENDS = "libxml2-native"
+
 S = "${WORKDIR}/docbook-xsl-${PV}"
 
-inherit allarch
-BBCLASSEXTEND = "native"
+inherit allarch xmlcatalog
 
 do_configure (){
 	:
@@ -29,8 +29,6 @@  do_compile (){
 }
 
 do_install () {
-	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html
-	# for details.
 	install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
 	ln -s xsl-stylesheets-${PV} ${D}${datadir}/xml/docbook/xsl-stylesheets
 
@@ -44,17 +42,12 @@  do_install () {
 
 	install -d ${D}${docdir}/${BPN}
 	install -v -m644 README RELEASE-NOTES* NEWS* ${D}${docdir}/${BPN}
-
-	install -d ${D}${sysconfdir}/xml/
-	install -m 755  ${WORKDIR}/docbook-xsl.xml ${D}${sysconfdir}/xml/docbook-xsl.xml
-}
-
-do_install_append_class-native () {
-	# Ensure that the catalog file sgml-docbook.cat is properly
-	# updated when the package is installed from sstate cache.
-	sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${D}${sysconfdir}/xml/docbook-xsl.xml
 }
 
 RDEPENDS_${PN} += "perl"
 FILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml"
 FILES_${PN}-doc = "${datadir}/doc/*"
+
+XMLCATALOGS = "${datadir}/xml/docbook/xsl-stylesheets-${PV}/catalog.xml"
+
+BBCLASSEXTEND = "native"