diff options
-rw-r--r-- | meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb b/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb index 0eca7fdba0..66353b8379 100644 --- a/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb +++ b/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb @@ -17,7 +17,7 @@ DEPENDS = " \ DEPENDS:append:class-target = " ${BPN}-native" DEPENDS:append:class-nativesdk = " ${BPN}-native" -inherit autotools-brokensep pkgconfig gettext +inherit autotools-brokensep pkgconfig gettext qemu SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \ " @@ -81,6 +81,23 @@ graphviz_sstate_postinst() { } SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst" +pkg_postinst:${PN} () { + if [ -n "$D" ]; then + if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then + ${@qemu_run_binary(d, '$D', '${bindir}/dot')} -c + fi + else + dot -c + fi +} + +pkg_postrm:${PN} () { + rm -f $D${libdir}/graphviz/config* + rmdir --ignore-fail-on-non-empty $D${libdir}/graphviz +} + +PACKAGE_WRITE_DEPS += "qemu-native" + PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo" FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/" |