Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [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 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | cairo \ |
| 13 | pango \ |
| 14 | expat \ |
| 15 | freetype \ |
| 16 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | DEPENDS:append:class-target = " ${BPN}-native" |
| 18 | DEPENDS:append:class-nativesdk = " ${BPN}-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | |
| 20 | inherit autotools-brokensep pkgconfig gettext |
| 21 | |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 22 | SRC_URI = "https://www2.graphviz.org/Packages/stable/portable_source/${BP}.tar.gz \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 23 | file://0001-plugin-pango-Include-freetype-headers-explicitly.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | " |
| 25 | # Use native mkdefs |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | SRC_URI:append:class-target = "\ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 27 | file://0001-Use-native-mkdefs.patch \ |
| 28 | file://0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch \ |
| 29 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 30 | SRC_URI:append:class-nativesdk = "\ |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 31 | file://0001-Use-native-mkdefs.patch \ |
| 32 | file://graphviz-setup.sh \ |
| 33 | " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 34 | SRC_URI[sha256sum] = "8e1b34763254935243ccdb83c6ce108f531876d7a5dfd443f255e6418b8ea313" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 36 | PACKAGECONFIG ??= "librsvg" |
| 37 | PACKAGECONFIG:class-nativesdk ??= "" |
| 38 | PACKAGECONFIG[librsvg] = "--with-librsvg,--without-librsvg,librsvg" |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | EXTRA_OECONF:append = " PS2PDF=/bin/echo" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 41 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 42 | EXTRA_OECONF:class-target = "\ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 43 | --with-expatincludedir=${STAGING_INCDIR} \ |
| 44 | --with-expatlibdir=${STAGING_LIBDIR} \ |
| 45 | --without-included-ltdl \ |
| 46 | --disable-java \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 47 | --disable-tcl \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 48 | --disable-r \ |
| 49 | --disable-sharp \ |
| 50 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | EXTRA_OECONF:class-nativesdk = "\ |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 52 | --with-expatincludedir=${STAGING_INCDIR} \ |
| 53 | --with-expatlibdir=${STAGING_LIBDIR} \ |
| 54 | --without-included-ltdl \ |
| 55 | --disable-java \ |
| 56 | --disable-tcl \ |
| 57 | --disable-r \ |
| 58 | --disable-sharp \ |
| 59 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | CFLAGS:append:class-target = " -D_typ_ssize_t=1 -D_long_double=1" |
| 61 | CFLAGS:append:class-nativesdk = " -D_typ_ssize_t=1 -D_long_double=1" |
| 62 | do_configure:prepend() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 63 | cd ${S} |
| 64 | # create version.m4 and ignore libtoolize errors |
| 65 | ./autogen.sh NOCONFIG || true |
| 66 | } |
| 67 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 68 | do_install:append:class-native() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 69 | # install mkdefs for target build |
| 70 | install -m755 ${B}/lib/gvpr/mkdefs ${D}${bindir} |
| 71 | } |
| 72 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 73 | do_install:append:class-nativesdk() { |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 74 | # graphviz-setup.sh must be executed at SDK installation |
| 75 | install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d |
| 76 | install -m 0755 ${WORKDIR}/graphviz-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d |
| 77 | } |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | FILES:${PN}:class-nativesdk += "${SDKPATHNATIVE}" |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 79 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 80 | # create /usr/lib/graphviz/config6 |
| 81 | graphviz_sstate_postinst() { |
| 82 | mkdir -p ${SYSROOT_DESTDIR}${bindir} |
| 83 | dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN} |
| 84 | echo '#!/bin/sh' > $dest |
| 85 | echo '' >> $dest |
| 86 | echo 'dot -c' >> $dest |
| 87 | chmod 0755 $dest |
| 88 | } |
| 89 | SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst" |
| 90 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 91 | PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo" |
| 92 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 93 | FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/" |
| 94 | FILES:${PN}-perl += "${libdir}/perl5/*/vendor_perl/ ${libdir}/graphviz/perl/" |
| 95 | FILES:${PN}-demo += "${datadir}/graphviz/demo/" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 96 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 97 | RDEPENDS:${PN}-perl += "perl" |
| 98 | RDEPENDS:${PN}-python += "python3" |
| 99 | RDEPENDS:${PN}-demo += "python3 perl" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 100 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 101 | INSANE_SKIP:${PN}-perl = "dev-so" |
| 102 | INSANE_SKIP:${PN}-python = "dev-so" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 103 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 104 | FILES_SOLIBSDEV:append = " ${libdir}/graphviz/lib*${SOLIBSDEV}" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 105 | |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 106 | BBCLASSEXTEND = "native nativesdk" |