Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SUMMARY = "Graph Visualization Tools" |
| 2 | HOMEPAGE = "http://www.graphviz.org" |
| 3 | LICENSE = "EPL-1.0" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=9109f5fc16cf963fb3cdd32781b3ce04" |
| 5 | |
| 6 | DEPENDS = " \ |
| 7 | intltool-native \ |
| 8 | bison-native \ |
| 9 | groff-native \ |
| 10 | libtool \ |
| 11 | gdk-pixbuf \ |
| 12 | cairo \ |
| 13 | pango \ |
| 14 | expat \ |
| 15 | freetype \ |
| 16 | " |
| 17 | DEPENDS:append:class-target = " ${BPN}-native" |
| 18 | DEPENDS:append:class-nativesdk = " ${BPN}-native" |
| 19 | |
| 20 | inherit autotools-brokensep pkgconfig gettext qemu |
| 21 | |
| 22 | SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \ |
| 23 | " |
| 24 | # Use native mkdefs |
| 25 | SRC_URI:append:class-target = "\ |
| 26 | file://0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch \ |
| 27 | " |
| 28 | SRC_URI:append:class-nativesdk = "\ |
| 29 | file://graphviz-setup.sh \ |
| 30 | " |
| 31 | |
| 32 | SRC_URI[sha256sum] = "6b16bf990df114195be669773a1dae975dbbffada45e1de2849ddeb5851bb9a8" |
| 33 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 34 | CVE_CHECK_IGNORE += "\ |
| 35 | CVE-2014-9157 \ |
| 36 | " |
| 37 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 38 | PACKAGECONFIG ??= "librsvg" |
| 39 | PACKAGECONFIG[librsvg] = "--with-librsvg,--without-librsvg,librsvg" |
| 40 | |
| 41 | EXTRA_OECONF:append = " PS2PDF=/bin/echo" |
| 42 | |
| 43 | EXTRA_OECONF:class-target = "\ |
| 44 | --with-expatincludedir=${STAGING_INCDIR} \ |
| 45 | --with-expatlibdir=${STAGING_LIBDIR} \ |
| 46 | --without-included-ltdl \ |
| 47 | --disable-java \ |
| 48 | --disable-tcl \ |
| 49 | --disable-r \ |
| 50 | --disable-sharp \ |
| 51 | " |
| 52 | EXTRA_OECONF:class-nativesdk = "\ |
| 53 | --with-expatincludedir=${STAGING_INCDIR} \ |
| 54 | --with-expatlibdir=${STAGING_LIBDIR} \ |
| 55 | --without-included-ltdl \ |
| 56 | --disable-java \ |
| 57 | --disable-tcl \ |
| 58 | --disable-r \ |
| 59 | --disable-sharp \ |
| 60 | " |
| 61 | CFLAGS:append:class-target = " -D_typ_ssize_t=1 -D_long_double=1" |
| 62 | CFLAGS:append:class-nativesdk = " -D_typ_ssize_t=1 -D_long_double=1" |
| 63 | do_configure:prepend() { |
| 64 | cd ${S} |
| 65 | # create version.m4 and ignore libtoolize errors |
| 66 | ./autogen.sh NOCONFIG || true |
| 67 | } |
| 68 | |
| 69 | do_install:append:class-nativesdk() { |
| 70 | # graphviz-setup.sh must be executed at SDK installation |
| 71 | install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d |
| 72 | install -m 0755 ${WORKDIR}/graphviz-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d |
| 73 | } |
| 74 | FILES:${PN}:class-nativesdk += "${SDKPATHNATIVE}" |
| 75 | |
| 76 | # create /usr/lib/graphviz/config6 |
| 77 | graphviz_sstate_postinst() { |
| 78 | mkdir -p ${SYSROOT_DESTDIR}${bindir} |
| 79 | dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN} |
| 80 | echo '#!/bin/sh' > $dest |
| 81 | echo '' >> $dest |
| 82 | echo 'dot -c' >> $dest |
| 83 | chmod 0755 $dest |
| 84 | } |
| 85 | SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst" |
| 86 | |
| 87 | pkg_postinst:${PN} () { |
| 88 | if [ -n "$D" ]; then |
| 89 | if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then |
| 90 | ${@qemu_run_binary(d, '$D', '${bindir}/dot')} -c |
| 91 | fi |
| 92 | else |
| 93 | dot -c |
| 94 | fi |
| 95 | } |
| 96 | |
| 97 | pkg_postrm:${PN} () { |
| 98 | rm -f $D${libdir}/graphviz/config* |
| 99 | rmdir --ignore-fail-on-non-empty $D${libdir}/graphviz |
| 100 | } |
| 101 | |
| 102 | PACKAGE_WRITE_DEPS += "qemu-native" |
| 103 | |
| 104 | PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo" |
| 105 | |
| 106 | FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/" |
| 107 | FILES:${PN}-perl += "${libdir}/perl5/*/vendor_perl/ ${libdir}/graphviz/perl/" |
| 108 | FILES:${PN}-demo += "${datadir}/graphviz/demo/" |
| 109 | |
| 110 | RDEPENDS:${PN}-perl += "perl" |
| 111 | RDEPENDS:${PN}-python += "python3" |
| 112 | RDEPENDS:${PN}-demo += "python3 perl" |
| 113 | |
| 114 | RRECOMMENDS:${PN} = "liberation-fonts" |
| 115 | |
| 116 | INSANE_SKIP:${PN}-perl = "dev-so" |
| 117 | INSANE_SKIP:${PN}-python = "dev-so" |
| 118 | |
| 119 | FILES_SOLIBSDEV:append = " ${libdir}/graphviz/lib*${SOLIBSDEV}" |
| 120 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 121 | RRECOMMENDS:${PN} = "liberation-fonts" |
| 122 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 123 | BBCLASSEXTEND = "native nativesdk" |