Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SUMMARY = "High performance data logging and graphing system for time series data" |
| 2 | HOMEPAGE = "http://oss.oetiker.ch/rrdtool/" |
| 3 | |
| 4 | LICENSE = "GPL-2.0-only" |
| 5 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39df84cfd8a5e18bf988f277f7946676" |
| 6 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 7 | DEPENDS = "libpng zlib glib-2.0 libxml2 groff-native python3-setuptools-native" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8 | |
| 9 | SRCREV = "3af04acd38bbc61bbdcdd931dcf234c971aa5336" |
| 10 | PV = "1.8.0" |
| 11 | |
| 12 | SRC_URI = "\ |
| 13 | git://github.com/oetiker/rrdtool-1.x.git;branch=master;protocol=http;;protocol=https \ |
| 14 | " |
| 15 | |
| 16 | S = "${WORKDIR}/git" |
| 17 | |
| 18 | inherit cpan autotools-brokensep gettext pkgconfig python3native python3-dir systemd |
| 19 | |
| 20 | BBCLASSEXTEND = "native" |
| 21 | |
| 22 | SYSTEMD_PACKAGES = "rrdcached" |
| 23 | SYSTEMD_SERVICE:rrdcached = "rrdcached.socket rrdcached.service" |
| 24 | |
| 25 | EXTRA_AUTORECONF = "-I m4 --exclude=autopoint" |
| 26 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 27 | PACKAGECONFIG ??= "perl graph ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 28 | |
| 29 | PACKAGECONFIG[python] = "--enable-python=yes \ |
| 30 | am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \ |
| 31 | am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\ |
| 32 | --disable-python,python," |
| 33 | |
| 34 | PACKAGECONFIG[perl] = \ |
| 35 | "--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor" CCFLAGS="${CFLAGS}" NO_PACKLIST=1 NO_PERLLOCAL=1' \ |
| 36 | ac_cv_path_PERL_CC='${CC}', \ |
| 37 | --disable-perl,perl," |
| 38 | |
| 39 | PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi" |
| 40 | |
| 41 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd," |
| 42 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 43 | PACKAGECONFIG[graph] = "--enable-rrd_graph,--disable-rrd_graph,pango cairo" |
| 44 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 45 | EXTRA_OECONF = " \ |
| 46 | --enable-shared \ |
| 47 | --disable-libwrap \ |
| 48 | --program-prefix='' \ |
| 49 | rd_cv_ieee_works=yes \ |
| 50 | --disable-ruby \ |
| 51 | --disable-lua \ |
| 52 | --disable-tcl \ |
| 53 | --disable-rpath \ |
| 54 | --enable-nls=${USE_NLS} \ |
| 55 | --disable-docs \ |
| 56 | " |
| 57 | |
| 58 | export STAGING_LIBDIR |
| 59 | export STAGING_INCDIR |
| 60 | |
| 61 | # emulate cpan_do_configure |
| 62 | EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" ' |
| 63 | # Avoid do_configure error on some hosts |
| 64 | |
| 65 | do_configure() { |
| 66 | unset PERLHOSTLIB |
| 67 | #fix the pkglib problem with newer automake |
| 68 | #perl |
| 69 | sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \ |
| 70 | ${S}/bindings/perl-shared/Makefile.PL |
| 71 | |
| 72 | #python |
| 73 | sed -i -e '/PYTHON_INCLUDES="-I${/c \ |
| 74 | PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \ |
| 75 | ${S}/m4/acinclude.m4 |
| 76 | #remove the useless RPATH from the rrdtool.so |
| 77 | sed -i -e 's|LD_RUN_PATH=$(libdir)||g' ${S}/bindings/Makefile.am |
| 78 | |
| 79 | autotools_do_configure |
| 80 | |
| 81 | #modify python sitepkg |
| 82 | #remove the dependency of perl-shared:Makefile |
| 83 | #or perl-shared/Makefile will be regenerated |
| 84 | #if any code touch bindings/Makefile after below perl bindings code |
| 85 | sed -i -e "s:python/setup.py install:python/setup.py install \ |
| 86 | --install-lib=${PYTHON_SITEPACKAGES_DIR}:" \ |
| 87 | -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \ |
| 88 | ${B}/bindings/Makefile |
| 89 | |
| 90 | #redo the perl bindings |
| 91 | ( |
| 92 | cd ${S}/bindings/perl-shared; |
| 93 | perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc"; |
| 94 | |
| 95 | cd ../../bindings/perl-piped; |
| 96 | perl Makefile.PL INSTALLDIRS="vendor"; |
| 97 | ) |
| 98 | |
| 99 | #change the interpreter in file |
| 100 | sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \ |
| 101 | ${B}/examples/Makefile |
| 102 | sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \ |
| 103 | ${B}/examples/*.pl |
| 104 | } |
| 105 | |
| 106 | PACKAGES =+ "${PN}-perl ${PN}-python" |
| 107 | PACKAGES =+ "rrdcached" |
| 108 | |
| 109 | DESCRIPTION:rrdcached = \ |
| 110 | "The rrdcached package contains the data caching daemon for RRDtool." |
| 111 | |
| 112 | FILES:rrdcached = "${bindir}/rrdcached \ |
| 113 | ${systemd_unitdir}/system/rrdcached.service \ |
| 114 | ${systemd_unitdir}/system/rrdcached.socket" |
| 115 | |
| 116 | FILES:${PN}-doc += "${datadir}/rrdtool/examples" |
| 117 | |
| 118 | DESCRIPTION:${PN}-perl = \ |
| 119 | "The ${PN}-perl package includes RRDtool bindings for perl." |
| 120 | FILES:${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm \ |
| 121 | ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*" |
| 122 | RDEPENDS:${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-time-hires \ |
| 123 | perl-module-io-file perl-module-ipc-open2 perl-module-io-socket" |
| 124 | |
| 125 | DESCRIPTION:${PN}-python = \ |
| 126 | "The ${PN}-python package includes RRDtool bindings for python." |
| 127 | FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" |
| 128 | RDEPENDS:${PN}-python = "python3" |
| 129 | |
| 130 | FILES:${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \ |
| 131 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug" |