blob: 797bcaaeeaf01923c864ce2ed42323c3b91f68ee [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "High performance data logging and graphing system for time series data"
2HOMEPAGE = "http://oss.oetiker.ch/rrdtool/"
3
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3349111ed0533471494beec99715bc9d"
6
7DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2 groff-native"
8
Patrick Williamsddad1a12017-02-23 20:36:32 -06009SRCREV = "61f116744262c4c18922dcf806e496715f199669"
10PV = "1.6.0"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011
12SRC_URI = "\
Patrick Williamsddad1a12017-02-23 20:36:32 -060013 git://github.com/oetiker/rrdtool-1.x.git;branch=1.6;protocol=http; \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014"
15
16S = "${WORKDIR}/git"
17
18inherit cpan autotools-brokensep gettext pythonnative python-dir systemd
19
20BBCLASSEXTEND = "native"
21
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022SYSTEMD_PACKAGES = "rrdcached"
23SYSTEMD_SERVICE_rrdcached = "rrdcached.socket rrdcached.service"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050024
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025EXTRA_AUTORECONF = "-I m4 --exclude=autopoint"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050026
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027PACKAGECONFIG ??= "python perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050028
29PACKAGECONFIG[python] = "--enable-python=yes \
30am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
31am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
32--disable-python,python,"
33
34PACKAGECONFIG[perl] = \
35"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \
36ac_cv_path_PERL_CC='${CC}', \
37--disable-perl,perl,"
38
39PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
40
41PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
42
43EXTRA_OECONF = " \
44 --enable-shared \
45 --disable-libwrap \
46 --program-prefix='' \
47 rd_cv_ieee_works=yes \
48 --disable-ruby \
49 --disable-lua \
50 --disable-tcl \
51 --disable-rpath \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050052 --enable-nls=${USE_NLS} \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050053"
54
Patrick Williamsb48b7b42016-08-17 15:04:38 -050055export STAGING_LIBDIR
56export STAGING_INCDIR
57
58# emulate cpan_do_configure
59EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" '
60# Avoid do_configure error on some hosts
Patrick Williamsb48b7b42016-08-17 15:04:38 -050061
62do_configure() {
Patrick Williamsddad1a12017-02-23 20:36:32 -060063 unset PERLHOSTLIB
Patrick Williamsb48b7b42016-08-17 15:04:38 -050064 #fix the pkglib problem with newer automake
65 #perl
66 sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \
67 ${S}/bindings/perl-shared/Makefile.PL
68
69 #python
70 sed -i -e '/PYTHON_INCLUDES="-I${/c \
71 PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
72 ${S}/m4/acinclude.m4
73 #remove the useless RPATH from the rrdtool.so
74 sed -i -e 's|LD_RUN_PATH=$(libdir)||g' ${S}/bindings/Makefile.am
75
76 autotools_do_configure
77
78 #modify python sitepkg
79 #remove the dependency of perl-shared:Makefile
80 #or perl-shared/Makefile will be regenerated
81 #if any code touch bindings/Makefile after below perl bindings code
82 sed -i -e "s:python/setup.py install:python/setup.py install \
83 --install-lib=${PYTHON_SITEPACKAGES_DIR}:" \
84 -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \
85 ${B}/bindings/Makefile
86
87 #redo the perl bindings
88 (
89 cd ${S}/bindings/perl-shared;
90 perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
91
92 cd ../../bindings/perl-piped;
93 perl Makefile.PL INSTALLDIRS="vendor";
94 )
95
96 #change the interpreter in file
97 sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \
98 ${B}/examples/Makefile
99 sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \
100 ${B}/examples/*.pl
101}
102
103PACKAGES =+ "${PN}-perl ${PN}-python"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500104PACKAGES =+ "rrdcached"
105
106DESCRIPTION_rrdcached = \
107"The rrdcached package contains the data caching daemon for RRDtool."
108
109FILES_rrdcached = "${bindir}/rrdcached \
110 ${systemd_unitdir}/system/rrdcached.service \
111 ${systemd_unitdir}/system/rrdcached.socket"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500112
113FILES_${PN}-doc += "${datadir}/rrdtool/examples"
114
115DESCRIPTION_${PN}-perl = \
116"The ${PN}-perl package includes RRDtool bindings for perl."
117FILES_${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm \
118 ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*"
119RDEPENDS_${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-time-hires \
120 perl-module-io-file perl-module-ipc-open2 perl-module-io-socket"
121
122DESCRIPTION_${PN}-python = \
123"The ${PN}-python package includes RRDtool bindings for python."
124FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
125RDEPENDS_${PN}-python = "python"
126
127FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \
128 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"