There would be build errors if multiple builds use the same SSTATE_DIR, and the builds use the different versions' docbook-sgml-dtd-native, the problems are: we have multiple versions docbook-sgml-dtd-native: docbook-sgml-dtd-3.1-native docbook-sgml-dtd-4.1-native docbook-sgml-dtd-4.5-native And they depend on sgml-common-native which installs the file sysroot/etc/sgml/sgml-docbook.cat, this file is also included in the sstate cache file (.tar.gz), but both the 3 versions docbook-sgml-dtd-native may update the sysroot/ect/sgml/sgml-docbook.cat, and it is a hardlink to SYSROOT_DESTDIR/etc/sgml/sgml-docbook.cat, so the sgml-docbook.cat in the sstate cache file may contain the docbook-sgml-dtd-<version>-native's info, and there would be errors when we mirror the sstate-cache to another build which uses a different version. Now we exclude the sgml-docbook.cat from the ${D}, and generate sysroot/ect/sgml/sgml-docbook.cat dynamically will fix the problem, both the sgml-common-native and docbook-sgml-dtd-<version>-native can update it it correctly. The similar to docbook-dsssl-stylesheets-native and openjade-native. [YOCTO #5994] (From OE-Core rev: 50683df81e1605ad7c03bc633aa55da7e97cfe62) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
109 lines
4.1 KiB
BlitzBasic
109 lines
4.1 KiB
BlitzBasic
SUMMARY = "Tools for working with DSSSL stylesheets for SGML and XML documents"
|
|
DESCRIPTION = "OpenJade is a suite of tools for validating, \
|
|
processing, and applying DSSSL (Document Style Semantics and \
|
|
Specification Language) stylesheets to SGML and XML documents."
|
|
HOMEPAGE = "http://openjade.sourceforge.net"
|
|
SECTION = "base"
|
|
LICENSE = "BSD"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=641ff1e4511f0a87044ad42f87cb1045"
|
|
|
|
PR = "r5"
|
|
|
|
DEPENDS = "opensp-native sgml-common-native"
|
|
RDEPENDS_${PN} = "sgml-common-native"
|
|
|
|
SRC_URI = "${SOURCEFORGE_MIRROR}/openjade/openjade-${PV}.tar.gz \
|
|
file://makefile.patch \
|
|
file://msggen.pl.patch \
|
|
file://reautoconf.patch \
|
|
file://user-declared-default-constructor.patch \
|
|
file://fix-regex.patch"
|
|
|
|
SRC_URI[md5sum] = "7df692e3186109cc00db6825b777201e"
|
|
SRC_URI[sha256sum] = "1d2d7996cc94f9b87d0c51cf0e028070ac177c4123ecbfd7ac1cb8d0b7d322d1"
|
|
|
|
inherit autotools-brokensep native
|
|
|
|
EXTRA_OECONF = "--enable-spincludedir=${STAGING_INCDIR}/OpenSP \
|
|
--enable-splibdir=${STAGING_LIBDIR}"
|
|
|
|
# We need to set datadir explicitly, but adding it to EXTRA_OECONF
|
|
# results in it being specified twice when configure is run.
|
|
CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--datadir=${datadir}', '--datadir=${STAGING_DATADIR}/sgml/openjade-${PV}')}"
|
|
|
|
# CONFIGUREOPTS has hard coded paths so we need to ignore it's vardeps
|
|
# there are other bits in there too but they are picked up by other variable
|
|
# dependencies so it all works out
|
|
oe_runconf[vardepsexclude] += "CONFIGUREOPTS"
|
|
|
|
CFLAGS =+ "-I${S}/include"
|
|
|
|
SSTATEPOSTINSTFUNCS += "openjade_sstate_postinst"
|
|
SYSROOT_PREPROCESS_FUNCS += "openjade_sysroot_preprocess"
|
|
CLEANFUNCS += "openjade_sstate_clean"
|
|
|
|
# configure.in needs to be reloacted to trigger reautoconf
|
|
do_extraunpack () {
|
|
cp ${S}/config/configure.in ${S}/
|
|
}
|
|
addtask extraunpack after do_patch before do_configure
|
|
|
|
# We need to do this else the source interdependencies aren't generated and
|
|
# build failures can result (e.g. zero size style/Makefile.dep file)
|
|
do_compile_prepend () {
|
|
oe_runmake depend
|
|
}
|
|
|
|
do_install() {
|
|
# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/openjade.html
|
|
# for details.
|
|
install -d ${D}${bindir}
|
|
install -m 0755 ${S}/jade/.libs/openjade ${D}${bindir}/openjade
|
|
ln -sf openjade ${D}${bindir}/jade
|
|
|
|
oe_libinstall -a -so -C style libostyle ${D}${libdir}
|
|
oe_libinstall -a -so -C spgrove libospgrove ${D}${libdir}
|
|
oe_libinstall -a -so -C grove libogrove ${D}${libdir}
|
|
|
|
install -d ${D}${datadir}/sgml/openjade-${PV}
|
|
install -m 644 dsssl/catalog ${D}${datadir}/sgml/openjade-${PV}
|
|
install -m 644 dsssl/*.dtd ${D}${datadir}/sgml/openjade-${PV}
|
|
install -m 644 dsssl/*.dsl ${D}${datadir}/sgml/openjade-${PV}
|
|
install -m 644 dsssl/*.sgm ${D}${datadir}/sgml/openjade-${PV}
|
|
|
|
install -d ${datadir}/sgml/openjade-${PV}
|
|
install -m 644 dsssl/catalog ${datadir}/sgml/openjade-${PV}/catalog
|
|
|
|
install -d ${D}${sysconfdir}/sgml
|
|
echo "CATALOG ${datadir}/sgml/openjade-${PV}/catalog" > \
|
|
${D}${sysconfdir}/sgml/openjade-${PV}.cat
|
|
}
|
|
|
|
openjade_sstate_postinst() {
|
|
if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
|
|
then
|
|
# Ensure that the catalog file sgml-docbook.cat is properly
|
|
# updated when the package is installed from sstate cache.
|
|
${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade \
|
|
--add ${sysconfdir}/sgml/sgml-docbook.bak \
|
|
${sysconfdir}/sgml/openjade-${PV}.cat
|
|
${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade \
|
|
--add ${sysconfdir}/sgml/sgml-docbook.cat \
|
|
${sysconfdir}/sgml/openjade-${PV}.cat
|
|
fi
|
|
}
|
|
|
|
openjade_sysroot_preprocess () {
|
|
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
|
install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade
|
|
}
|
|
|
|
openjade_sstate_clean () {
|
|
# Ensure that the catalog file sgml-docbook.cat is properly
|
|
# updated when the package is removed from sstate cache.
|
|
files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
|
|
for f in $files; do
|
|
[ ! -f $f ] || sed -i '/\/sgml\/openjade-${PV}.cat/d' $f
|
|
done
|
|
}
|