blob: aa5c0c8206d1f61e52c0792c1322d00b10fa9d54 [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
29SRC_URI = "https://gitlab.com/graphviz/graphviz/-/archive/stable_release_${PV}/graphviz-stable_release_${PV}.tar.gz \
Brad Bishop26bdd442019-08-16 17:08:17 -040030 file://0001-plugin-pango-Include-freetype-headers-explicitly.patch \
Brad Bishop19323692019-04-05 15:28:33 -040031"
32# Use native mkdefs
Brad Bishop26bdd442019-08-16 17:08:17 -040033SRC_URI_append_class-target = "\
34 file://0001-Use-native-mkdefs.patch \
35 file://0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch \
36"
Andrew Geissler89770b02020-06-13 10:40:47 -050037SRC_URI_append_class-nativesdk = "\
38 file://0001-Use-native-mkdefs.patch \
39 file://graphviz-setup.sh \
40"
Brad Bishop19323692019-04-05 15:28:33 -040041SRC_URI[md5sum] = "2acf30ca8e6cc8b001b0334db65fd072"
42SRC_URI[sha256sum] = "e6c3f8dbfde1c4523055403927bef29f97f9fc12715c1042b5dcf648a2c1c62a"
43
44S = "${WORKDIR}/${BPN}-stable_release_${PV}"
45
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"