blob: bb72316cf8859ff66be7c3ea37e1e272df974967 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001SUMMARY = "High performance data logging and graphing system for time series data"
2HOMEPAGE = "http://oss.oetiker.ch/rrdtool/"
3
4LICENSE = "GPLv2"
Brad Bishop15ae2502019-06-18 21:44:24 -04005LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39df84cfd8a5e18bf988f277f7946676"
Brad Bishopc342db32019-05-15 21:57:59 -04006
Andrew Geissler82c905d2020-04-13 13:39:40 -05007DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2 groff-native python3-setuptools-native"
Brad Bishopc342db32019-05-15 21:57:59 -04008
Brad Bishop15ae2502019-06-18 21:44:24 -04009SRCREV = "56a83f4f52e6745cd4352f9ee008be3183a6dedf"
10PV = "1.7.2"
Brad Bishopc342db32019-05-15 21:57:59 -040011
12SRC_URI = "\
Andrew Geissler595f6302022-01-24 19:11:47 +000013 git://github.com/oetiker/rrdtool-1.x.git;branch=master;protocol=http;;protocol=https \
Brad Bishopc342db32019-05-15 21:57:59 -040014"
15
16S = "${WORKDIR}/git"
17
Andrew Geissler5199d832021-09-24 16:47:35 -050018inherit cpan autotools-brokensep gettext pkgconfig python3native python3-dir systemd
Brad Bishopc342db32019-05-15 21:57:59 -040019
20BBCLASSEXTEND = "native"
21
22SYSTEMD_PACKAGES = "rrdcached"
Patrick Williams213cb262021-08-07 19:21:33 -050023SYSTEMD_SERVICE:rrdcached = "rrdcached.socket rrdcached.service"
Brad Bishopc342db32019-05-15 21:57:59 -040024
25EXTRA_AUTORECONF = "-I m4 --exclude=autopoint"
26
Andrew Geissler82c905d2020-04-13 13:39:40 -050027PACKAGECONFIG ??= "perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
Brad Bishopc342db32019-05-15 21:57:59 -040028
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] = \
Brad Bishop0a921262019-09-24 07:40:45 -040035"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor" CCFLAGS="${CFLAGS}" NO_PACKLIST=1 NO_PERLLOCAL=1' \
Brad Bishopc342db32019-05-15 21:57:59 -040036ac_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 \
52 --enable-nls=${USE_NLS} \
53 --disable-docs \
54"
55
56export STAGING_LIBDIR
57export STAGING_INCDIR
58
59# emulate cpan_do_configure
60EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" '
61# Avoid do_configure error on some hosts
62
63do_configure() {
64 unset PERLHOSTLIB
65 #fix the pkglib problem with newer automake
66 #perl
67 sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \
68 ${S}/bindings/perl-shared/Makefile.PL
69
70 #python
71 sed -i -e '/PYTHON_INCLUDES="-I${/c \
72 PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
73 ${S}/m4/acinclude.m4
74 #remove the useless RPATH from the rrdtool.so
75 sed -i -e 's|LD_RUN_PATH=$(libdir)||g' ${S}/bindings/Makefile.am
76
77 autotools_do_configure
78
79 #modify python sitepkg
80 #remove the dependency of perl-shared:Makefile
81 #or perl-shared/Makefile will be regenerated
82 #if any code touch bindings/Makefile after below perl bindings code
83 sed -i -e "s:python/setup.py install:python/setup.py install \
84 --install-lib=${PYTHON_SITEPACKAGES_DIR}:" \
85 -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \
86 ${B}/bindings/Makefile
87
88 #redo the perl bindings
89 (
90 cd ${S}/bindings/perl-shared;
91 perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
92
93 cd ../../bindings/perl-piped;
94 perl Makefile.PL INSTALLDIRS="vendor";
95 )
96
97 #change the interpreter in file
98 sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \
99 ${B}/examples/Makefile
100 sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \
101 ${B}/examples/*.pl
102}
103
104PACKAGES =+ "${PN}-perl ${PN}-python"
105PACKAGES =+ "rrdcached"
106
Patrick Williams213cb262021-08-07 19:21:33 -0500107DESCRIPTION:rrdcached = \
Brad Bishopc342db32019-05-15 21:57:59 -0400108"The rrdcached package contains the data caching daemon for RRDtool."
109
Patrick Williams213cb262021-08-07 19:21:33 -0500110FILES:rrdcached = "${bindir}/rrdcached \
Brad Bishopc342db32019-05-15 21:57:59 -0400111 ${systemd_unitdir}/system/rrdcached.service \
112 ${systemd_unitdir}/system/rrdcached.socket"
113
Patrick Williams213cb262021-08-07 19:21:33 -0500114FILES:${PN}-doc += "${datadir}/rrdtool/examples"
Brad Bishopc342db32019-05-15 21:57:59 -0400115
Patrick Williams213cb262021-08-07 19:21:33 -0500116DESCRIPTION:${PN}-perl = \
Brad Bishopc342db32019-05-15 21:57:59 -0400117"The ${PN}-perl package includes RRDtool bindings for perl."
Patrick Williams213cb262021-08-07 19:21:33 -0500118FILES:${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm \
Brad Bishopc342db32019-05-15 21:57:59 -0400119 ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*"
Patrick Williams213cb262021-08-07 19:21:33 -0500120RDEPENDS:${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-time-hires \
Brad Bishopc342db32019-05-15 21:57:59 -0400121 perl-module-io-file perl-module-ipc-open2 perl-module-io-socket"
122
Patrick Williams213cb262021-08-07 19:21:33 -0500123DESCRIPTION:${PN}-python = \
Brad Bishopc342db32019-05-15 21:57:59 -0400124"The ${PN}-python package includes RRDtool bindings for python."
Patrick Williams213cb262021-08-07 19:21:33 -0500125FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
126RDEPENDS:${PN}-python = "python3"
Brad Bishopc342db32019-05-15 21:57:59 -0400127
Patrick Williams213cb262021-08-07 19:21:33 -0500128FILES:${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \
Brad Bishopc342db32019-05-15 21:57:59 -0400129 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"