graphviz: native: create /usr/lib/graphviz/config6 in populate_sysroot

The `dot` tool requires to be run once after installation in order to
create its configuration file.

The do_prepare_recipe_sysroot task uses do_populate_sysroot in order to
prepare the recipe-sysroot-native. Package postinstall scripts are not
executed for -native packages, but files under ${BINDIR}/postinst-* are.

This is quite the same as graphviz-setup.sh does for nativesdk. The
general idea has been taken from
OECORE/meta/classes/pixbufcache.bbclass.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Christian Eggers
2022-02-14 13:36:39 +01:00
committed by Khem Raj
parent 45479a258d
commit 907a649f0e
@@ -74,6 +74,17 @@ do_install:append:class-nativesdk() {
} }
FILES:${PN}:class-nativesdk += "${SDKPATHNATIVE}" FILES:${PN}:class-nativesdk += "${SDKPATHNATIVE}"
# create /usr/lib/graphviz/config6
graphviz_sstate_postinst() {
mkdir -p ${SYSROOT_DESTDIR}${bindir}
dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}
echo '#!/bin/sh' > $dest
echo '' >> $dest
echo 'dot -c' >> $dest
chmod 0755 $dest
}
SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst"
PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo" PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo"
FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/" FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/"