poky/meta/classes/xmlcatalog.bbclass
Richard Purdie bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00

27 lines
758 B
Plaintext

DEPENDS = "libxml2-native"
# A whitespace-separated list of XML catalogs to be registered, for example
# "${sysconfdir}/xml/docbook-xml.xml".
XMLCATALOGS ?= ""
SYSROOT_PREPROCESS_FUNCS:append = " xmlcatalog_sstate_postinst"
xmlcatalog_complete() {
ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
if [ ! -f $ROOTCATALOG ]; then
mkdir --parents $(dirname $ROOTCATALOG)
xmlcatalog --noout --create $ROOTCATALOG
fi
for CATALOG in ${XMLCATALOGS}; do
xmlcatalog --noout --add nextCatalog unused file://$CATALOG $ROOTCATALOG
done
}
xmlcatalog_sstate_postinst() {
mkdir -p ${SYSROOT_DESTDIR}${bindir}
dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}-xmlcatalog
echo '#!/bin/sh' > $dest
echo '${xmlcatalog_complete}' >> $dest
chmod 0755 $dest
}