diff options
| -rw-r--r-- | meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb | 92 |
1 files changed, 86 insertions, 6 deletions
diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb index 533451fc38..2994df28ea 100644 --- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb +++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb | |||
| @@ -15,25 +15,105 @@ SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-${PV}.tar.gz \ | |||
| 15 | SRC_URI[md5sum] = "ffe369d8921b4dfdeaaf43812100c38f" | 15 | SRC_URI[md5sum] = "ffe369d8921b4dfdeaaf43812100c38f" |
| 16 | SRC_URI[sha256sum] = "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11" | 16 | SRC_URI[sha256sum] = "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11" |
| 17 | 17 | ||
| 18 | inherit autotools gettext | 18 | inherit autotools gettext pythonnative perlnative python-dir |
| 19 | 19 | ||
| 20 | EXTRA_AUTORECONF = "-I m4" | 20 | EXTRA_AUTORECONF = "-I m4" |
| 21 | 21 | ||
| 22 | PACKAGECONFIG ??= "" | 22 | PACKAGECONFIG ??= "python perl" |
| 23 | |||
| 24 | PACKAGECONFIG[python] = "--enable-python=yes \ | ||
| 25 | am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \ | ||
| 26 | am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\ | ||
| 27 | --disable-python,python," | ||
| 28 | |||
| 29 | PACKAGECONFIG[perl] = \ | ||
| 30 | "--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \ | ||
| 31 | ac_cv_path_PERL_CC='${CC}', \ | ||
| 32 | --disable-perl,perl," | ||
| 33 | |||
| 23 | PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi" | 34 | PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi" |
| 24 | 35 | ||
| 25 | EXTRA_OECONF = " \ | 36 | EXTRA_OECONF = " \ |
| 26 | --enable-shared \ | 37 | --enable-shared \ |
| 27 | --enable-local-libpng \ | ||
| 28 | --enable-local-zlib \ | ||
| 29 | --disable-libwrap \ | 38 | --disable-libwrap \ |
| 30 | --program-prefix='' \ | 39 | --program-prefix='' \ |
| 31 | rd_cv_ieee_works=yes \ | 40 | rd_cv_ieee_works=yes \ |
| 32 | --disable-perl \ | ||
| 33 | --disable-python \ | ||
| 34 | --disable-ruby \ | 41 | --disable-ruby \ |
| 35 | --disable-lua \ | 42 | --disable-lua \ |
| 36 | --disable-rpath \ | 43 | --disable-rpath \ |
| 37 | " | 44 | " |
| 38 | 45 | ||
| 46 | # don't use perl.real, this results in break issues with prebuilts since perl.real doesn't | ||
| 47 | # know where the PERL5LIB is... | ||
| 48 | # use wrapper perl instead | ||
| 49 | EXTRA_OEMAKE = "PERL=${STAGING_BINDIR_NATIVE}/perl-native/perl FULLPERL=${STAGING_BINDIR_NATIVE}/perl-native/perl" | ||
| 50 | |||
| 51 | export BUILD_SYS | ||
| 52 | export HOST_SYS | ||
| 53 | export STAGING_LIBDIR | ||
| 54 | export STAGING_INCDIR | ||
| 55 | |||
| 56 | do_configure() { | ||
| 57 | #fix the pkglib problem with newer automake | ||
| 58 | #perl | ||
| 59 | sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \ | ||
| 60 | ${S}/bindings/perl-shared/Makefile.PL | ||
| 61 | |||
| 62 | #python | ||
| 63 | sed -i -e '/PYTHON_INCLUDES="-I${/c \ | ||
| 64 | PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \ | ||
| 65 | ${S}/m4/acinclude.m4 | ||
| 66 | #remove the hardcoded $(libdir) rpath | ||
| 67 | sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am | ||
| 68 | |||
| 69 | autotools_do_configure | ||
| 70 | |||
| 71 | perl_version=`perl -v 2>/dev/null | \ | ||
| 72 | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'` | ||
| 73 | |||
| 74 | #modify python sitepkg | ||
| 75 | #remove the dependency of perl-shared:Makefile | ||
| 76 | #or perl-shared/Makefile will be regenerated | ||
| 77 | #if any code touch bindings/Makefile after below perl bindings code | ||
| 78 | sed -i -e "s:\$(PYTHON) setup.py install:\$(PYTHON) setup.py install \ | ||
| 79 | --install-lib=${D}${PYTHON_SITEPACKAGES_DIR}:" \ | ||
| 80 | -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \ | ||
| 81 | ${S}/bindings/Makefile | ||
| 82 | |||
| 83 | #redo the perl bindings | ||
| 84 | ( | ||
| 85 | cd bindings/perl-shared; | ||
| 86 | perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor" | ||
| 87 | INSTALLPRIVLIB="abc"; | ||
| 88 | sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile; | ||
| 89 | |||
| 90 | cd ../../bindings/perl-piped; | ||
| 91 | perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"; | ||
| 92 | sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile; | ||
| 93 | ) | ||
| 94 | |||
| 95 | #change the interpreter in file | ||
| 96 | sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \ | ||
| 97 | ${S}/examples/Makefile | ||
| 98 | sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \ | ||
| 99 | ${S}/examples/*.pl | ||
| 100 | } | ||
| 101 | |||
| 102 | PACKAGES =+ "${PN}-perl ${PN}-python" | ||
| 103 | |||
| 104 | FILES_${PN}-doc += "${datadir}/examples" | ||
| 105 | |||
| 106 | DESCRIPTION_${PN}-perl = \ | ||
| 107 | "The ${PN}-perl package includes RRDtool bindings for perl." | ||
| 108 | FILES_${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm ${datadir}/${PN}/examples \ | ||
| 109 | ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*" | ||
| 110 | RDEPENDS_${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-time-hires \ | ||
| 111 | perl-module-io-file perl-module-ipc-open2 perl-module-io-socket" | ||
| 112 | |||
| 113 | DESCRIPTION_${PN}-python = \ | ||
| 114 | "The ${PN}-python package includes RRDtool bindings for python." | ||
| 115 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
| 116 | RDEPENDS_${PN}-python = "python" | ||
| 39 | 117 | ||
| 118 | FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \ | ||
| 119 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug" | ||
