blob: bc46a11d3a65c6a75cbe5f9fe0f70db866d9a7b7 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Graph Visualization Tools"
2HOMEPAGE = "http://www.graphviz.org"
3LICENSE = "EPL-1.0"
4LIC_FILES_CHKSUM = "file://COPYING;md5=9109f5fc16cf963fb3cdd32781b3ce04"
5
6DEPENDS = " \
7 intltool-native \
8 bison-native \
9 groff-native \
10 libtool \
11 gdk-pixbuf \
12 librsvg \
13 cairo \
14 pango \
15 expat \
16 freetype \
17"
18DEPENDS_append_class-target = " ${BPN}-native"
Andrew Geissler89770b02020-06-13 10:40:47 -050019DEPENDS_append_class-nativesdk = " ${BPN}-native"
Brad Bishop19323692019-04-05 15:28:33 -040020
21inherit autotools-brokensep pkgconfig gettext
22
23# The source tarball suggested at
24# https://graphviz.gitlab.io/_pages/Download/Download_source.html has no
25# version in its name. So once graphviz is updgraded, only first time users will
26# get checksum errors. Fedora people seem to expect same so they use a versioned
27# source - see https://src.fedoraproject.org/cgit/rpms/graphviz.git/tree/graphviz.spec
28
Andrew Geissler4b7c1152020-11-30 19:55:29 -060029SRCREV = "771bc4dbff3e6f358fa75cdc7774a413ccacad51"
30SRC_URI = "https://www2.graphviz.org/Packages/stable/portable_source/${BP}.tar.gz \
Brad Bishop26bdd442019-08-16 17:08:17 -040031 file://0001-plugin-pango-Include-freetype-headers-explicitly.patch \
Brad Bishop19323692019-04-05 15:28:33 -040032"
33# Use native mkdefs
Brad Bishop26bdd442019-08-16 17:08:17 -040034SRC_URI_append_class-target = "\
35 file://0001-Use-native-mkdefs.patch \
36 file://0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch \
37"
Andrew Geissler89770b02020-06-13 10:40:47 -050038SRC_URI_append_class-nativesdk = "\
39 file://0001-Use-native-mkdefs.patch \
40 file://graphviz-setup.sh \
41"
Andrew Geissler4b7c1152020-11-30 19:55:29 -060042SRC_URI[sha256sum] = "8e1b34763254935243ccdb83c6ce108f531876d7a5dfd443f255e6418b8ea313"
Brad Bishop19323692019-04-05 15:28:33 -040043
Andrew Geissler4b7c1152020-11-30 19:55:29 -060044EXTRA_OECONF_append = " PS2PDF=/bin/echo"
Brad Bishop19323692019-04-05 15:28:33 -040045
46EXTRA_OECONF_class-target = "\
47 --with-expatincludedir=${STAGING_INCDIR} \
48 --with-expatlibdir=${STAGING_LIBDIR} \
49 --without-included-ltdl \
50 --disable-java \
Brad Bishop26bdd442019-08-16 17:08:17 -040051 --disable-tcl \
Brad Bishop19323692019-04-05 15:28:33 -040052 --disable-r \
53 --disable-sharp \
54 "
Andrew Geissler89770b02020-06-13 10:40:47 -050055EXTRA_OECONF_class-nativesdk = "\
56 --with-expatincludedir=${STAGING_INCDIR} \
57 --with-expatlibdir=${STAGING_LIBDIR} \
58 --without-included-ltdl \
59 --disable-java \
60 --disable-tcl \
61 --disable-r \
62 --disable-sharp \
63 "
Brad Bishop19323692019-04-05 15:28:33 -040064CFLAGS_append_class-target = " -D_typ_ssize_t=1 -D_long_double=1"
Andrew Geissler89770b02020-06-13 10:40:47 -050065CFLAGS_append_class-nativesdk = " -D_typ_ssize_t=1 -D_long_double=1"
Brad Bishop19323692019-04-05 15:28:33 -040066do_configure_prepend() {
67 cd ${S}
68 # create version.m4 and ignore libtoolize errors
69 ./autogen.sh NOCONFIG || true
70}
71
72do_install_append_class-native() {
73 # install mkdefs for target build
74 install -m755 ${B}/lib/gvpr/mkdefs ${D}${bindir}
75}
76
Andrew Geissler89770b02020-06-13 10:40:47 -050077do_install_append_class-nativesdk() {
78 # graphviz-setup.sh must be executed at SDK installation
79 install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
80 install -m 0755 ${WORKDIR}/graphviz-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d
81}
82FILES_${PN}_class-nativesdk += "${SDKPATHNATIVE}"
83
Brad Bishop26bdd442019-08-16 17:08:17 -040084PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo"
85
86FILES_${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/"
87FILES_${PN}-perl += "${libdir}/perl5/*/vendor_perl/ ${libdir}/graphviz/perl/"
88FILES_${PN}-demo += "${datadir}/graphviz/demo/"
89
90RDEPENDS_${PN}-perl += "perl"
Andrew Geissler82c905d2020-04-13 13:39:40 -050091RDEPENDS_${PN}-python += "python3"
92RDEPENDS_${PN}-demo += "python3 perl"
Brad Bishop26bdd442019-08-16 17:08:17 -040093
94INSANE_SKIP_${PN}-perl = "dev-so"
95INSANE_SKIP_${PN}-python = "dev-so"
96
Brad Bishop19323692019-04-05 15:28:33 -040097FILES_SOLIBSDEV_append = " ${libdir}/graphviz/lib*${SOLIBSDEV}"
98
Andrew Geissler89770b02020-06-13 10:40:47 -050099BBCLASSEXTEND = "native nativesdk"