docbook-xsl: use xmlcatalog

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.

(From OE-Core rev: c4638117142b4e516755161bf35b29c82f41cfc7)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2019-04-04 23:16:39 +01:00 committed by Richard Purdie
parent 2d69e3434a
commit 95f6ab495b
2 changed files with 7 additions and 20 deletions

View File

@ -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>

View File

@ -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"