diff options
author | Kai Kang <kai.kang@windriver.com> | 2022-03-29 13:48:38 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-03-29 08:33:41 -0700 |
commit | 49139cf082de562150a24b239f31799b15227e69 (patch) | |
tree | f7f320f76dd6fce5bc1e44c9a4e2c80a87fa23bc /meta-oe/recipes-graphics/graphviz | |
parent | 144a7fff1e32f682610e80aba4851dc97fc1b575 (diff) | |
download | meta-openembedded-49139cf082de562150a24b239f31799b15227e69.tar.gz |
graphviz: add pkg_postinst script
It needs to run `dot -c` first before call 'dot' command, otherwise it
fails with:
| Format: "png" not recognized. No formats found.
| Perhaps "dot -c" needs to be run (with installer's privileges) to
register the plugins?
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics/graphviz')
-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 0eca7fdba..66353b837 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 = " \ | |||
17 | DEPENDS:append:class-target = " ${BPN}-native" | 17 | DEPENDS:append:class-target = " ${BPN}-native" |
18 | DEPENDS:append:class-nativesdk = " ${BPN}-native" | 18 | DEPENDS:append:class-nativesdk = " ${BPN}-native" |
19 | 19 | ||
20 | inherit autotools-brokensep pkgconfig gettext | 20 | inherit autotools-brokensep pkgconfig gettext qemu |
21 | 21 | ||
22 | SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \ | 22 | SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \ |
23 | " | 23 | " |
@@ -81,6 +81,23 @@ graphviz_sstate_postinst() { | |||
81 | } | 81 | } |
82 | SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst" | 82 | SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst" |
83 | 83 | ||
84 | pkg_postinst:${PN} () { | ||
85 | if [ -n "$D" ]; then | ||
86 | if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then | ||
87 | ${@qemu_run_binary(d, '$D', '${bindir}/dot')} -c | ||
88 | fi | ||
89 | else | ||
90 | dot -c | ||
91 | fi | ||
92 | } | ||
93 | |||
94 | pkg_postrm:${PN} () { | ||
95 | rm -f $D${libdir}/graphviz/config* | ||
96 | rmdir --ignore-fail-on-non-empty $D${libdir}/graphviz | ||
97 | } | ||
98 | |||
99 | PACKAGE_WRITE_DEPS += "qemu-native" | ||
100 | |||
84 | PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo" | 101 | PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo" |
85 | 102 | ||
86 | FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/" | 103 | FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/" |