* [PATCH] rrdtool: enable libwrap, perl and python bindings
@ 2014-04-16 6:51 Chong Lu
2014-04-16 7:15 ` Koen Kooi
2014-04-20 12:01 ` Martin Jansa
0 siblings, 2 replies; 8+ messages in thread
From: Chong Lu @ 2014-04-16 6:51 UTC (permalink / raw)
To: openembedded-devel
1. default enable libwrap, perl and python bindings
2. rrdtool uses perl.real, perl.real doesn't know where the PERL5LIB should be
when prebuilts are used. Use the wrapper perl instead, perl sets PERL5LIB and
invokes perl.real
3. While using dash as /bin/sh, subsequent commands in functions will not use
the environment variables passed to the function call line unless explicitly
run "export ENV_VAR".
4. delete unrecognized options: "--enable-local-libpng" and "--enable-local-zlib"
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb | 127 +++++++++++++++++++--
1 file changed, 120 insertions(+), 7 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 533451f..422e22f 100644
--- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
@@ -5,6 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2"
+DEPENDS_${PN}-perl = "perl-module-lib perl-module-dynaloader"
PR = "r2"
@@ -15,25 +16,137 @@ SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-${PV}.tar.gz \
SRC_URI[md5sum] = "ffe369d8921b4dfdeaaf43812100c38f"
SRC_URI[sha256sum] = "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11"
-inherit autotools gettext
+inherit autotools gettext pythonnative perlnative python-dir
EXTRA_AUTORECONF = "-I m4"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "python libwrap perl"
+
+PACKAGECONFIG[python] = "--enable-python=yes \
+am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
+am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
+--disable-python,python,"
+
+PACKAGECONFIG[perl] = \
+"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \
+ac_cv_path_PERL_CC='${CC}', \
+--disable-perl,perl,"
+
+PACKAGECONFIG[libwrap] = ",--disable-libwrap,tcp-wrappers,libwrap"
PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
EXTRA_OECONF = " \
--enable-shared \
- --enable-local-libpng \
- --enable-local-zlib \
- --disable-libwrap \
--program-prefix='' \
rd_cv_ieee_works=yes \
- --disable-perl \
- --disable-python \
--disable-ruby \
--disable-lua \
--disable-rpath \
"
+# don't use perl.real, this results in break issues with prebuilts since perl.real doesn't
+# know where the PERL5LIB is...
+# use wrapper perl instead
+EXTRA_OEMAKE = "PERL=${STAGING_BINDIR_NATIVE}/perl-native/perl FULLPERL=${STAGING_BINDIR_NATIVE}/perl-native/perl"
+
+export BUILD_SYS
+export HOST_SYS
+export STAGING_LIBDIR
+export STAGING_INCDIR
+
+do_configure() {
+ #fix the pkglib problem with newer automake
+ #perl
+ sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \
+ ${S}/bindings/perl-shared/Makefile.PL
+
+ #python
+ sed -i -e '/PYTHON_INCLUDES="-I${/c \
+ PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
+ ${S}/m4/acinclude.m4
+ #remove the hardcoded $(libdir) rpath
+ sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am
+
+ autotools_do_configure
+
+ perl_version=`perl -v 2>/dev/null | \
+ sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
+
+ #modify python sitepkg
+ #remove the dependency of perl-shared:Makefile
+ #or perl-shared/Makefile will be regenerated
+ #if any code touch bindings/Makefile after below perl bindings code
+ sed -i -e "s:\$(PYTHON) setup.py install:\$(PYTHON) setup.py install \
+ --install-lib=${D}${PYTHON_SITEPACKAGES_DIR}:" \
+ -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \
+ ${S}/bindings/Makefile
+
+ #redo the perl bindings
+ (
+ cd bindings/perl-shared;
+ perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"
+ INSTALLPRIVLIB="abc";
+ sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
+
+ cd ../../bindings/perl-piped;
+ perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor";
+ sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
+ )
+
+ #change the interpreter in file
+ sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \
+ ${S}/examples/Makefile
+ sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \
+ ${S}/examples/*.pl
+}
+
+python populate_packages_prepend() {
+ def fill_more(name, dbg=True, rdep=None):
+ if name is None or name.strip() == "":
+ return
+
+ fpack=d.getVar('PACKAGES') or ""
+ fpack="${PN}-" + name + " " + fpack
+ if dbg:
+ fpack="${PN}-" + name + "-dbg" + " " + fpack
+ d.setVar('PACKAGES', fpack)
+ if rdep is not None:
+ prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
+ prdep=rdep + " " + prdep
+ d.setVar('RDEPENDS_${PN}-' + name, prdep)
+
+ prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
+ bb.debug(1, "RDEPENDS_${PN}-" + name + "=" + prdep)
+
+ conf=(d.getVar('PACKAGECONFIG', True) or "").split()
+ pack=d.getVar('PACKAGES') or ""
+ bb.debug(1, "PACKAGECONFIG=%s" % conf)
+ bb.debug(1, "PACKAGES1=%s" % pack )
+
+ if "perl" in conf :
+ fill_more("perl")
+
+ if "python" in conf:
+ fill_more("python")
+
+ pack=d.getVar('PACKAGES', True) or ""
+ bb.debug(1, "PACKAGES after=%s" % pack)
+
+ #debug code
+ #prdep=d.getVar('RDEPENDS_${PN}') or ""
+ #bb.debug(1, "RDEPENDS_${PN}" + "=" + prdep)
+ #prdep=d.getVar('RDEPENDS') or ""
+ #bb.debug(1, "RDEPENDS" + "=" + prdep)
+}
+
+FILES_${PN}-doc += "${datadir}/examples"
+
+DESCRIPTION_${PN}-perl = \
+"The ${PN}-perl package includes RRDtool bindings for perl."
+FILES_${PN}-perl = "${libdir}/perl/vendor_perl/* ${datadir}/${PN}/examples"
+FILES_${PN}-perl-dbg = "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug"
+DESCRIPTION_${PN}-python = \
+"The ${PN}-python package includes RRDtool bindings for python."
+FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_${PN}-python-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] rrdtool: enable libwrap, perl and python bindings
2014-04-16 6:51 [PATCH] rrdtool: enable libwrap, perl and python bindings Chong Lu
@ 2014-04-16 7:15 ` Koen Kooi
2014-04-16 10:02 ` Paul Eggleton
2014-04-20 12:01 ` Martin Jansa
1 sibling, 1 reply; 8+ messages in thread
From: Koen Kooi @ 2014-04-16 7:15 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chong Lu schreef op 16-04-14 08:51:
> 1. default enable libwrap, perl and python bindings
A number of big distros are moving away from tcpwrappers, Arch has removed
it years ago and fedora looked into it a while ago. Since tcpwrappers hasn't
seen a release (or development) in years I think we should default it to off.
regards,
Koen
> 2. rrdtool uses perl.real, perl.real doesn't know where the PERL5LIB
> should be when prebuilts are used. Use the wrapper perl instead, perl
> sets PERL5LIB and invokes perl.real 3. While using dash as /bin/sh,
> subsequent commands in functions will not use the environment variables
> passed to the function call line unless explicitly run "export ENV_VAR".
> 4. delete unrecognized options: "--enable-local-libpng" and
> "--enable-local-zlib"
>
> Signed-off-by: Chong Lu <Chong.Lu@windriver.com> ---
> meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb | 127
> +++++++++++++++++++-- 1 file changed, 120 insertions(+), 7 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
> 533451f..422e22f 100644 ---
> a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb +++
> b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb @@ -5,6 +5,7 @@
> LICENSE = "GPLv2" LIC_FILES_CHKSUM =
> "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
>
> DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2" +DEPENDS_${PN}-perl
> = "perl-module-lib perl-module-dynaloader"
>
> PR = "r2"
>
> @@ -15,25 +16,137 @@ SRC_URI =
> "http://oss.oetiker.ch/rrdtool/pub/rrdtool-${PV}.tar.gz \ SRC_URI[md5sum]
> = "ffe369d8921b4dfdeaaf43812100c38f" SRC_URI[sha256sum] =
> "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11"
>
> -inherit autotools gettext +inherit autotools gettext pythonnative
> perlnative python-dir
>
> EXTRA_AUTORECONF = "-I m4"
>
> -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "python libwrap perl" +
> +PACKAGECONFIG[python] = "--enable-python=yes \
> +am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages
> \
> +am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
>
>
+--disable-python,python,"
> + +PACKAGECONFIG[perl] = \ +"--enable-perl=yes
> --with-perl-options='INSTALLDIRS="vendor"' \ +ac_cv_path_PERL_CC='${CC}',
> \ +--disable-perl,perl," + +PACKAGECONFIG[libwrap] =
> ",--disable-libwrap,tcp-wrappers,libwrap" PACKAGECONFIG[dbi] =
> "--enable-libdbi,--disable-libdbi,libdbi"
>
> EXTRA_OECONF = " \ --enable-shared \ - --enable-local-libpng \ -
> --enable-local-zlib \ - --disable-libwrap \ --program-prefix='' \
> rd_cv_ieee_works=yes \ - --disable-perl \ - --disable-python \
> --disable-ruby \ --disable-lua \ --disable-rpath \ "
>
> +# don't use perl.real, this results in break issues with prebuilts since
> perl.real doesn't +# know where the PERL5LIB is... +# use wrapper perl
> instead +EXTRA_OEMAKE = "PERL=${STAGING_BINDIR_NATIVE}/perl-native/perl
> FULLPERL=${STAGING_BINDIR_NATIVE}/perl-native/perl" + +export BUILD_SYS
> +export HOST_SYS +export STAGING_LIBDIR +export STAGING_INCDIR +
> +do_configure() { + #fix the pkglib problem with newer automake + #perl +
> sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \ +
> ${S}/bindings/perl-shared/Makefile.PL + + #python + sed -i -e
> '/PYTHON_INCLUDES="-I${/c \ +
> PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \ +
> ${S}/m4/acinclude.m4 + #remove the hardcoded $(libdir) rpath + sed -i -e
> 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am + +
> autotools_do_configure + + perl_version=`perl -v 2>/dev/null | \ +
> sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'` + +
> #modify python sitepkg + #remove the dependency of perl-shared:Makefile +
> #or perl-shared/Makefile will be regenerated + #if any code touch
> bindings/Makefile after below perl bindings code + sed -i -e
> "s:\$(PYTHON) setup.py install:\$(PYTHON) setup.py install \ +
> --install-lib=${D}${PYTHON_SITEPACKAGES_DIR}:" \ + -e
> "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \ +
> ${S}/bindings/Makefile + + #redo the perl bindings + ( + cd
> bindings/perl-shared; + perl -I${STAGING_LIBDIR}/perl/$perl_version
> Makefile.PL INSTALLDIRS="vendor" + INSTALLPRIVLIB="abc"; + sed -i -e
> "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile; + + cd
> ../../bindings/perl-piped; + perl -I${STAGING_LIBDIR}/perl/$perl_version
> Makefile.PL INSTALLDIRS="vendor"; + sed -i -e "s| ${libdir}/perl/|
> ${STAGING_LIBDIR}/perl/|g" Makefile; + ) + + #change the interpreter in
> file + sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL =
> /usr/bin/perl|g" \ + ${S}/examples/Makefile + sed -i -e
> "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \ +
> ${S}/examples/*.pl +} + +python populate_packages_prepend() { + def
> fill_more(name, dbg=True, rdep=None): + if name is None or
> name.strip() == "": + return + +
> fpack=d.getVar('PACKAGES') or "" + fpack="${PN}-" + name + " " +
> fpack + if dbg: + fpack="${PN}-" + name + "-dbg" + " "
> + fpack + d.setVar('PACKAGES', fpack) + if rdep is not
> None: + prdep=d.getVar('RDEPENDS_${PN}-' + name) or "" +
> prdep=rdep + " " + prdep + d.setVar('RDEPENDS_${PN}-' + name,
> prdep) + + prdep=d.getVar('RDEPENDS_${PN}-' + name) or "" +
> bb.debug(1, "RDEPENDS_${PN}-" + name + "=" + prdep) + +
> conf=(d.getVar('PACKAGECONFIG', True) or "").split() +
> pack=d.getVar('PACKAGES') or "" + bb.debug(1, "PACKAGECONFIG=%s" %
> conf) + bb.debug(1, "PACKAGES1=%s" % pack ) + + if "perl" in conf
> : + fill_more("perl") + + if "python" in conf: +
> fill_more("python") + + pack=d.getVar('PACKAGES', True) or "" +
> bb.debug(1, "PACKAGES after=%s" % pack) + + #debug code +
> #prdep=d.getVar('RDEPENDS_${PN}') or "" + #bb.debug(1,
> "RDEPENDS_${PN}" + "=" + prdep) + #prdep=d.getVar('RDEPENDS') or "" +
> #bb.debug(1, "RDEPENDS" + "=" + prdep) +} + +FILES_${PN}-doc +=
> "${datadir}/examples" + +DESCRIPTION_${PN}-perl = \ +"The ${PN}-perl
> package includes RRDtool bindings for perl." +FILES_${PN}-perl =
> "${libdir}/perl/vendor_perl/* ${datadir}/${PN}/examples"
> +FILES_${PN}-perl-dbg = "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug"
>
> +DESCRIPTION_${PN}-python = \ +"The ${PN}-python package includes RRDtool
> bindings for python." +FILES_${PN}-python =
> "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
> +FILES_${PN}-python-dbg =
> "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org
iD8DBQFTTi4jMkyGM64RGpERAlEyAJ9oaVhwjiOoYzYwiS0eoXyrVQRb7gCfdBMQ
F7N3OIaJp8iKhWSvSdk/m0Q=
=Ng7E
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] rrdtool: enable libwrap, perl and python bindings
2014-04-16 7:15 ` Koen Kooi
@ 2014-04-16 10:02 ` Paul Eggleton
2014-04-16 10:40 ` Koen Kooi
0 siblings, 1 reply; 8+ messages in thread
From: Paul Eggleton @ 2014-04-16 10:02 UTC (permalink / raw)
To: Koen Kooi, Chris Larson; +Cc: openembedded-devel
On Wednesday 16 April 2014 09:15:47 Koen Kooi wrote:
> Chong Lu schreef op 16-04-14 08:51:
> > 1. default enable libwrap, perl and python bindings
>
> A number of big distros are moving away from tcpwrappers, Arch has removed
> it years ago and fedora looked into it a while ago. Since tcpwrappers hasn't
> seen a release (or development) in years I think we should default it to
> off.
Chris added a tcp-wrappers PACKAGECONFIG to a number of recipes about a year
ago; I wonder if we ought to promote it to a DISTRO_FEATURES item and if
appropriate just not enable that by default.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rrdtool: enable libwrap, perl and python bindings
2014-04-16 10:02 ` Paul Eggleton
@ 2014-04-16 10:40 ` Koen Kooi
2014-04-16 14:54 ` Christopher Larson
0 siblings, 1 reply; 8+ messages in thread
From: Koen Kooi @ 2014-04-16 10:40 UTC (permalink / raw)
To: Paul Eggleton; +Cc: Chris Larson, openembedded-devel
Op 16 apr. 2014, om 12:02 heeft Paul Eggleton <paul.eggleton@linux.intel.com> het volgende geschreven:
> On Wednesday 16 April 2014 09:15:47 Koen Kooi wrote:
>> Chong Lu schreef op 16-04-14 08:51:
>>> 1. default enable libwrap, perl and python bindings
>>
>> A number of big distros are moving away from tcpwrappers, Arch has removed
>> it years ago and fedora looked into it a while ago. Since tcpwrappers hasn't
>> seen a release (or development) in years I think we should default it to
>> off.
>
> Chris added a tcp-wrappers PACKAGECONFIG to a number of recipes about a year
> ago; I wonder if we ought to promote it to a DISTRO_FEATURES item and if
> appropriate just not enable that by default.
I think that makes the most sense in this situation.
regards,
Koen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rrdtool: enable libwrap, perl and python bindings
2014-04-16 10:40 ` Koen Kooi
@ 2014-04-16 14:54 ` Christopher Larson
0 siblings, 0 replies; 8+ messages in thread
From: Christopher Larson @ 2014-04-16 14:54 UTC (permalink / raw)
To: Openembedded Discussion; +Cc: Paul Eggleton
On Wed, Apr 16, 2014 at 3:40 AM, Koen Kooi <koen@dominion.thruhere.net>wrote:
> Op 16 apr. 2014, om 12:02 heeft Paul Eggleton <
> paul.eggleton@linux.intel.com> het volgende geschreven:
>
> > On Wednesday 16 April 2014 09:15:47 Koen Kooi wrote:
> >> Chong Lu schreef op 16-04-14 08:51:
> >>> 1. default enable libwrap, perl and python bindings
> >>
> >> A number of big distros are moving away from tcpwrappers, Arch has
> removed
> >> it years ago and fedora looked into it a while ago. Since tcpwrappershasn't
> >> seen a release (or development) in years I think we should default it to
> >> off.
> >
> > Chris added a tcp-wrappers PACKAGECONFIG to a number of recipes about a
> year
> > ago; I wonder if we ought to promote it to a DISTRO_FEATURES item and if
> > appropriate just not enable that by default.
>
> I think that makes the most sense in this situation.
>
Agreed, I'd be all for that.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rrdtool: enable libwrap, perl and python bindings
2014-04-16 6:51 [PATCH] rrdtool: enable libwrap, perl and python bindings Chong Lu
2014-04-16 7:15 ` Koen Kooi
@ 2014-04-20 12:01 ` Martin Jansa
2014-04-22 1:52 ` Chong Lu
1 sibling, 1 reply; 8+ messages in thread
From: Martin Jansa @ 2014-04-20 12:01 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 7177 bytes --]
On Wed, Apr 16, 2014 at 02:51:05PM +0800, Chong Lu wrote:
> 1. default enable libwrap, perl and python bindings
> 2. rrdtool uses perl.real, perl.real doesn't know where the PERL5LIB should be
> when prebuilts are used. Use the wrapper perl instead, perl sets PERL5LIB and
> invokes perl.real
> 3. While using dash as /bin/sh, subsequent commands in functions will not use
> the environment variables passed to the function call line unless explicitly
> run "export ENV_VAR".
> 4. delete unrecognized options: "--enable-local-libpng" and "--enable-local-zlib"
>
> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> ---
> meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb | 127 +++++++++++++++++++--
> 1 file changed, 120 insertions(+), 7 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 533451f..422e22f 100644
> --- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
> +++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
> @@ -5,6 +5,7 @@ LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
>
> DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2"
> +DEPENDS_${PN}-perl = "perl-module-lib perl-module-dynaloader"
This looks like misspelled RDEPENDS_${PN}-perl
>
> PR = "r2"
>
> @@ -15,25 +16,137 @@ SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-${PV}.tar.gz \
> SRC_URI[md5sum] = "ffe369d8921b4dfdeaaf43812100c38f"
> SRC_URI[sha256sum] = "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11"
>
> -inherit autotools gettext
> +inherit autotools gettext pythonnative perlnative python-dir
>
> EXTRA_AUTORECONF = "-I m4"
>
> -PACKAGECONFIG ??= ""
> +PACKAGECONFIG ??= "python libwrap perl"
> +
> +PACKAGECONFIG[python] = "--enable-python=yes \
> +am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
> +am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
> +--disable-python,python,"
> +
> +PACKAGECONFIG[perl] = \
> +"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \
> +ac_cv_path_PERL_CC='${CC}', \
> +--disable-perl,perl,"
> +
> +PACKAGECONFIG[libwrap] = ",--disable-libwrap,tcp-wrappers,libwrap"
> PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
>
> EXTRA_OECONF = " \
> --enable-shared \
> - --enable-local-libpng \
> - --enable-local-zlib \
> - --disable-libwrap \
> --program-prefix='' \
> rd_cv_ieee_works=yes \
> - --disable-perl \
> - --disable-python \
> --disable-ruby \
> --disable-lua \
> --disable-rpath \
> "
>
> +# don't use perl.real, this results in break issues with prebuilts since perl.real doesn't
> +# know where the PERL5LIB is...
> +# use wrapper perl instead
> +EXTRA_OEMAKE = "PERL=${STAGING_BINDIR_NATIVE}/perl-native/perl FULLPERL=${STAGING_BINDIR_NATIVE}/perl-native/perl"
> +
> +export BUILD_SYS
> +export HOST_SYS
> +export STAGING_LIBDIR
> +export STAGING_INCDIR
> +
> +do_configure() {
> + #fix the pkglib problem with newer automake
> + #perl
> + sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \
> + ${S}/bindings/perl-shared/Makefile.PL
> +
> + #python
> + sed -i -e '/PYTHON_INCLUDES="-I${/c \
> + PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
> + ${S}/m4/acinclude.m4
> + #remove the hardcoded $(libdir) rpath
> + sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am
> +
> + autotools_do_configure
> +
> + perl_version=`perl -v 2>/dev/null | \
> + sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
> +
> + #modify python sitepkg
> + #remove the dependency of perl-shared:Makefile
> + #or perl-shared/Makefile will be regenerated
> + #if any code touch bindings/Makefile after below perl bindings code
> + sed -i -e "s:\$(PYTHON) setup.py install:\$(PYTHON) setup.py install \
> + --install-lib=${D}${PYTHON_SITEPACKAGES_DIR}:" \
> + -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \
> + ${S}/bindings/Makefile
> +
> + #redo the perl bindings
> + (
> + cd bindings/perl-shared;
> + perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"
> + INSTALLPRIVLIB="abc";
> + sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
> +
> + cd ../../bindings/perl-piped;
> + perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor";
> + sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
> + )
> +
> + #change the interpreter in file
> + sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \
> + ${S}/examples/Makefile
> + sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \
> + ${S}/examples/*.pl
> +}
> +
> +python populate_packages_prepend() {
> + def fill_more(name, dbg=True, rdep=None):
> + if name is None or name.strip() == "":
> + return
> +
> + fpack=d.getVar('PACKAGES') or ""
> + fpack="${PN}-" + name + " " + fpack
> + if dbg:
> + fpack="${PN}-" + name + "-dbg" + " " + fpack
> + d.setVar('PACKAGES', fpack)
> + if rdep is not None:
> + prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
> + prdep=rdep + " " + prdep
> + d.setVar('RDEPENDS_${PN}-' + name, prdep)
> +
> + prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
> + bb.debug(1, "RDEPENDS_${PN}-" + name + "=" + prdep)
> +
> + conf=(d.getVar('PACKAGECONFIG', True) or "").split()
> + pack=d.getVar('PACKAGES') or ""
> + bb.debug(1, "PACKAGECONFIG=%s" % conf)
> + bb.debug(1, "PACKAGES1=%s" % pack )
> +
> + if "perl" in conf :
> + fill_more("perl")
> +
> + if "python" in conf:
> + fill_more("python")
> +
> + pack=d.getVar('PACKAGES', True) or ""
> + bb.debug(1, "PACKAGES after=%s" % pack)
> +
> + #debug code
> + #prdep=d.getVar('RDEPENDS_${PN}') or ""
> + #bb.debug(1, "RDEPENDS_${PN}" + "=" + prdep)
> + #prdep=d.getVar('RDEPENDS') or ""
> + #bb.debug(1, "RDEPENDS" + "=" + prdep)
> +}
> +
> +FILES_${PN}-doc += "${datadir}/examples"
> +
> +DESCRIPTION_${PN}-perl = \
> +"The ${PN}-perl package includes RRDtool bindings for perl."
> +FILES_${PN}-perl = "${libdir}/perl/vendor_perl/* ${datadir}/${PN}/examples"
> +FILES_${PN}-perl-dbg = "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug"
>
> +DESCRIPTION_${PN}-python = \
> +"The ${PN}-python package includes RRDtool bindings for python."
> +FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
> +FILES_${PN}-python-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
I think there should be just one -dbg package.
> --
> 1.7.9.5
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] rrdtool: enable libwrap, perl and python bindings
2014-04-20 12:01 ` Martin Jansa
@ 2014-04-22 1:52 ` Chong Lu
2014-04-22 5:02 ` Martin Jansa
0 siblings, 1 reply; 8+ messages in thread
From: Chong Lu @ 2014-04-22 1:52 UTC (permalink / raw)
To: openembedded-devel
On 04/20/2014 08:01 PM, Martin Jansa wrote:
> On Wed, Apr 16, 2014 at 02:51:05PM +0800, Chong Lu wrote:
>> 1. default enable libwrap, perl and python bindings
>> 2. rrdtool uses perl.real, perl.real doesn't know where the PERL5LIB should be
>> when prebuilts are used. Use the wrapper perl instead, perl sets PERL5LIB and
>> invokes perl.real
>> 3. While using dash as /bin/sh, subsequent commands in functions will not use
>> the environment variables passed to the function call line unless explicitly
>> run "export ENV_VAR".
>> 4. delete unrecognized options: "--enable-local-libpng" and "--enable-local-zlib"
>>
>> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>> ---
>> meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb | 127 +++++++++++++++++++--
>> 1 file changed, 120 insertions(+), 7 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 533451f..422e22f 100644
>> --- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
>> +++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
>> @@ -5,6 +5,7 @@ LICENSE = "GPLv2"
>> LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
>>
>> DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2"
>> +DEPENDS_${PN}-perl = "perl-module-lib perl-module-dynaloader"
> This looks like misspelled RDEPENDS_${PN}-perl
>
>>
>> PR = "r2"
>>
>> @@ -15,25 +16,137 @@ SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-${PV}.tar.gz \
>> SRC_URI[md5sum] = "ffe369d8921b4dfdeaaf43812100c38f"
>> SRC_URI[sha256sum] = "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11"
>>
>> -inherit autotools gettext
>> +inherit autotools gettext pythonnative perlnative python-dir
>>
>> EXTRA_AUTORECONF = "-I m4"
>>
>> -PACKAGECONFIG ??= ""
>> +PACKAGECONFIG ??= "python libwrap perl"
>> +
>> +PACKAGECONFIG[python] = "--enable-python=yes \
>> +am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
>> +am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
>> +--disable-python,python,"
>> +
>> +PACKAGECONFIG[perl] = \
>> +"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \
>> +ac_cv_path_PERL_CC='${CC}', \
>> +--disable-perl,perl,"
>> +
>> +PACKAGECONFIG[libwrap] = ",--disable-libwrap,tcp-wrappers,libwrap"
>> PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
>>
>> EXTRA_OECONF = " \
>> --enable-shared \
>> - --enable-local-libpng \
>> - --enable-local-zlib \
>> - --disable-libwrap \
>> --program-prefix='' \
>> rd_cv_ieee_works=yes \
>> - --disable-perl \
>> - --disable-python \
>> --disable-ruby \
>> --disable-lua \
>> --disable-rpath \
>> "
>>
>> +# don't use perl.real, this results in break issues with prebuilts since perl.real doesn't
>> +# know where the PERL5LIB is...
>> +# use wrapper perl instead
>> +EXTRA_OEMAKE = "PERL=${STAGING_BINDIR_NATIVE}/perl-native/perl FULLPERL=${STAGING_BINDIR_NATIVE}/perl-native/perl"
>> +
>> +export BUILD_SYS
>> +export HOST_SYS
>> +export STAGING_LIBDIR
>> +export STAGING_INCDIR
>> +
>> +do_configure() {
>> + #fix the pkglib problem with newer automake
>> + #perl
>> + sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \
>> + ${S}/bindings/perl-shared/Makefile.PL
>> +
>> + #python
>> + sed -i -e '/PYTHON_INCLUDES="-I${/c \
>> + PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
>> + ${S}/m4/acinclude.m4
>> + #remove the hardcoded $(libdir) rpath
>> + sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am
>> +
>> + autotools_do_configure
>> +
>> + perl_version=`perl -v 2>/dev/null | \
>> + sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
>> +
>> + #modify python sitepkg
>> + #remove the dependency of perl-shared:Makefile
>> + #or perl-shared/Makefile will be regenerated
>> + #if any code touch bindings/Makefile after below perl bindings code
>> + sed -i -e "s:\$(PYTHON) setup.py install:\$(PYTHON) setup.py install \
>> + --install-lib=${D}${PYTHON_SITEPACKAGES_DIR}:" \
>> + -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \
>> + ${S}/bindings/Makefile
>> +
>> + #redo the perl bindings
>> + (
>> + cd bindings/perl-shared;
>> + perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"
>> + INSTALLPRIVLIB="abc";
>> + sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
>> +
>> + cd ../../bindings/perl-piped;
>> + perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor";
>> + sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
>> + )
>> +
>> + #change the interpreter in file
>> + sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \
>> + ${S}/examples/Makefile
>> + sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \
>> + ${S}/examples/*.pl
>> +}
>> +
>> +python populate_packages_prepend() {
>> + def fill_more(name, dbg=True, rdep=None):
>> + if name is None or name.strip() == "":
>> + return
>> +
>> + fpack=d.getVar('PACKAGES') or ""
>> + fpack="${PN}-" + name + " " + fpack
>> + if dbg:
>> + fpack="${PN}-" + name + "-dbg" + " " + fpack
>> + d.setVar('PACKAGES', fpack)
>> + if rdep is not None:
>> + prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
>> + prdep=rdep + " " + prdep
>> + d.setVar('RDEPENDS_${PN}-' + name, prdep)
>> +
>> + prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
>> + bb.debug(1, "RDEPENDS_${PN}-" + name + "=" + prdep)
>> +
>> + conf=(d.getVar('PACKAGECONFIG', True) or "").split()
>> + pack=d.getVar('PACKAGES') or ""
>> + bb.debug(1, "PACKAGECONFIG=%s" % conf)
>> + bb.debug(1, "PACKAGES1=%s" % pack )
>> +
>> + if "perl" in conf :
>> + fill_more("perl")
>> +
>> + if "python" in conf:
>> + fill_more("python")
>> +
>> + pack=d.getVar('PACKAGES', True) or ""
>> + bb.debug(1, "PACKAGES after=%s" % pack)
>> +
>> + #debug code
>> + #prdep=d.getVar('RDEPENDS_${PN}') or ""
>> + #bb.debug(1, "RDEPENDS_${PN}" + "=" + prdep)
>> + #prdep=d.getVar('RDEPENDS') or ""
>> + #bb.debug(1, "RDEPENDS" + "=" + prdep)
>> +}
>> +
>> +FILES_${PN}-doc += "${datadir}/examples"
>> +
>> +DESCRIPTION_${PN}-perl = \
>> +"The ${PN}-perl package includes RRDtool bindings for perl."
>> +FILES_${PN}-perl = "${libdir}/perl/vendor_perl/* ${datadir}/${PN}/examples"
>> +FILES_${PN}-perl-dbg = "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug"
>>
>> +DESCRIPTION_${PN}-python = \
>> +"The ${PN}-python package includes RRDtool bindings for python."
>> +FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
>> +FILES_${PN}-python-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
> I think there should be just one -dbg package.
If have only one -dbg package, we will get QA error:
non debug package contains .debug directory: rrdtool-perl
So, I split them into two packages.
I will resend V2 for other issues.
Best Regards
Chong
>> --
>> 1.7.9.5
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] rrdtool: enable libwrap, perl and python bindings
2014-04-22 1:52 ` Chong Lu
@ 2014-04-22 5:02 ` Martin Jansa
0 siblings, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2014-04-22 5:02 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 8396 bytes --]
On Tue, Apr 22, 2014 at 09:52:54AM +0800, Chong Lu wrote:
>
> On 04/20/2014 08:01 PM, Martin Jansa wrote:
> > On Wed, Apr 16, 2014 at 02:51:05PM +0800, Chong Lu wrote:
> >> 1. default enable libwrap, perl and python bindings
> >> 2. rrdtool uses perl.real, perl.real doesn't know where the PERL5LIB should be
> >> when prebuilts are used. Use the wrapper perl instead, perl sets PERL5LIB and
> >> invokes perl.real
> >> 3. While using dash as /bin/sh, subsequent commands in functions will not use
> >> the environment variables passed to the function call line unless explicitly
> >> run "export ENV_VAR".
> >> 4. delete unrecognized options: "--enable-local-libpng" and "--enable-local-zlib"
> >>
> >> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> >> ---
> >> meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb | 127 +++++++++++++++++++--
> >> 1 file changed, 120 insertions(+), 7 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 533451f..422e22f 100644
> >> --- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
> >> +++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
> >> @@ -5,6 +5,7 @@ LICENSE = "GPLv2"
> >> LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
> >>
> >> DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2"
> >> +DEPENDS_${PN}-perl = "perl-module-lib perl-module-dynaloader"
> > This looks like misspelled RDEPENDS_${PN}-perl
> >
> >>
> >> PR = "r2"
> >>
> >> @@ -15,25 +16,137 @@ SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-${PV}.tar.gz \
> >> SRC_URI[md5sum] = "ffe369d8921b4dfdeaaf43812100c38f"
> >> SRC_URI[sha256sum] = "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11"
> >>
> >> -inherit autotools gettext
> >> +inherit autotools gettext pythonnative perlnative python-dir
> >>
> >> EXTRA_AUTORECONF = "-I m4"
> >>
> >> -PACKAGECONFIG ??= ""
> >> +PACKAGECONFIG ??= "python libwrap perl"
> >> +
> >> +PACKAGECONFIG[python] = "--enable-python=yes \
> >> +am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
> >> +am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
> >> +--disable-python,python,"
> >> +
> >> +PACKAGECONFIG[perl] = \
> >> +"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \
> >> +ac_cv_path_PERL_CC='${CC}', \
> >> +--disable-perl,perl,"
> >> +
> >> +PACKAGECONFIG[libwrap] = ",--disable-libwrap,tcp-wrappers,libwrap"
> >> PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
> >>
> >> EXTRA_OECONF = " \
> >> --enable-shared \
> >> - --enable-local-libpng \
> >> - --enable-local-zlib \
> >> - --disable-libwrap \
> >> --program-prefix='' \
> >> rd_cv_ieee_works=yes \
> >> - --disable-perl \
> >> - --disable-python \
> >> --disable-ruby \
> >> --disable-lua \
> >> --disable-rpath \
> >> "
> >>
> >> +# don't use perl.real, this results in break issues with prebuilts since perl.real doesn't
> >> +# know where the PERL5LIB is...
> >> +# use wrapper perl instead
> >> +EXTRA_OEMAKE = "PERL=${STAGING_BINDIR_NATIVE}/perl-native/perl FULLPERL=${STAGING_BINDIR_NATIVE}/perl-native/perl"
> >> +
> >> +export BUILD_SYS
> >> +export HOST_SYS
> >> +export STAGING_LIBDIR
> >> +export STAGING_INCDIR
> >> +
> >> +do_configure() {
> >> + #fix the pkglib problem with newer automake
> >> + #perl
> >> + sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \
> >> + ${S}/bindings/perl-shared/Makefile.PL
> >> +
> >> + #python
> >> + sed -i -e '/PYTHON_INCLUDES="-I${/c \
> >> + PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
> >> + ${S}/m4/acinclude.m4
> >> + #remove the hardcoded $(libdir) rpath
> >> + sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am
> >> +
> >> + autotools_do_configure
> >> +
> >> + perl_version=`perl -v 2>/dev/null | \
> >> + sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
> >> +
> >> + #modify python sitepkg
> >> + #remove the dependency of perl-shared:Makefile
> >> + #or perl-shared/Makefile will be regenerated
> >> + #if any code touch bindings/Makefile after below perl bindings code
> >> + sed -i -e "s:\$(PYTHON) setup.py install:\$(PYTHON) setup.py install \
> >> + --install-lib=${D}${PYTHON_SITEPACKAGES_DIR}:" \
> >> + -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \
> >> + ${S}/bindings/Makefile
> >> +
> >> + #redo the perl bindings
> >> + (
> >> + cd bindings/perl-shared;
> >> + perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"
> >> + INSTALLPRIVLIB="abc";
> >> + sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
> >> +
> >> + cd ../../bindings/perl-piped;
> >> + perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor";
> >> + sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
> >> + )
> >> +
> >> + #change the interpreter in file
> >> + sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \
> >> + ${S}/examples/Makefile
> >> + sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \
> >> + ${S}/examples/*.pl
> >> +}
> >> +
> >> +python populate_packages_prepend() {
> >> + def fill_more(name, dbg=True, rdep=None):
> >> + if name is None or name.strip() == "":
> >> + return
> >> +
> >> + fpack=d.getVar('PACKAGES') or ""
> >> + fpack="${PN}-" + name + " " + fpack
> >> + if dbg:
> >> + fpack="${PN}-" + name + "-dbg" + " " + fpack
> >> + d.setVar('PACKAGES', fpack)
> >> + if rdep is not None:
> >> + prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
> >> + prdep=rdep + " " + prdep
> >> + d.setVar('RDEPENDS_${PN}-' + name, prdep)
> >> +
> >> + prdep=d.getVar('RDEPENDS_${PN}-' + name) or ""
> >> + bb.debug(1, "RDEPENDS_${PN}-" + name + "=" + prdep)
> >> +
> >> + conf=(d.getVar('PACKAGECONFIG', True) or "").split()
> >> + pack=d.getVar('PACKAGES') or ""
> >> + bb.debug(1, "PACKAGECONFIG=%s" % conf)
> >> + bb.debug(1, "PACKAGES1=%s" % pack )
> >> +
> >> + if "perl" in conf :
> >> + fill_more("perl")
> >> +
> >> + if "python" in conf:
> >> + fill_more("python")
> >> +
> >> + pack=d.getVar('PACKAGES', True) or ""
> >> + bb.debug(1, "PACKAGES after=%s" % pack)
> >> +
> >> + #debug code
> >> + #prdep=d.getVar('RDEPENDS_${PN}') or ""
> >> + #bb.debug(1, "RDEPENDS_${PN}" + "=" + prdep)
> >> + #prdep=d.getVar('RDEPENDS') or ""
> >> + #bb.debug(1, "RDEPENDS" + "=" + prdep)
> >> +}
> >> +
> >> +FILES_${PN}-doc += "${datadir}/examples"
> >> +
> >> +DESCRIPTION_${PN}-perl = \
> >> +"The ${PN}-perl package includes RRDtool bindings for perl."
> >> +FILES_${PN}-perl = "${libdir}/perl/vendor_perl/* ${datadir}/${PN}/examples"
> >> +FILES_${PN}-perl-dbg = "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug"
> >>
> >> +DESCRIPTION_${PN}-python = \
> >> +"The ${PN}-python package includes RRDtool bindings for python."
> >> +FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
> >> +FILES_${PN}-python-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
> > I think there should be just one -dbg package.
> If have only one -dbg package, we will get QA error:
> non debug package contains .debug directory: rrdtool-perl
> So, I split them into two packages.
> I will resend V2 for other issues.
You can have one -dbg package which contains all FILES_* if you order
PACKAGES correctly.
>
> Best Regards
> Chong
> >> --
> >> 1.7.9.5
> >>
> >> --
> >> _______________________________________________
> >> Openembedded-devel mailing list
> >> Openembedded-devel@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> >
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-04-22 5:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16 6:51 [PATCH] rrdtool: enable libwrap, perl and python bindings Chong Lu
2014-04-16 7:15 ` Koen Kooi
2014-04-16 10:02 ` Paul Eggleton
2014-04-16 10:40 ` Koen Kooi
2014-04-16 14:54 ` Christopher Larson
2014-04-20 12:01 ` Martin Jansa
2014-04-22 1:52 ` Chong Lu
2014-04-22 5:02 ` Martin Jansa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.