From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: how to add new perl modules to stock OE build?
Date: Thu, 27 Oct 2016 05:52:17 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.20.1610270533590.12908@localhost.localdomain> (raw)
(followup to earlier thread, but now that i have a better idea of
what i'm trying to do, i decided to start a new thread that should be
more focused. apologies for dragging this out just a bit longer.)
as i posted earlier, i want to add some perl modules to a basic poky
build; in this case, building core-image-minimal for qemuppc, if that
makes any difference.
initially, i went hunting for existing recipes for the modules i
wanted (meta-perl, meta-cpan, ...), until i noticed that the perl
recipe directory contains a "perl-rdepends_5.22.1.inc" file, which as
i read it defines all of the modules to be incorporated into the
"perl-modules" package, so that *appears* to be the solution -- just
extend the set of modules to be built by extending the contents of
that file.
so, first, is that the recommended (or even correct) approach? as an
example, i want to add Text::Template; would that involve adding lines
similar to the following?
RDEPENDS_${PN}-module-text-template += "${PN}-module-exporter"
RDEPENDS_${PN}-module-text-template += "${PN}-module-strict"
RDEPENDS_${PN}-module-text-template += "${PN}-module-vars"
(not saying that would be the *complete* set of lines for that module,
only that that looks like a starting point.)
next, if that's a valid approach, i can see the code near the bottom
of perl_5.22.1.bb that appears to be taking care of creating the
perl-modules package:
===== start =====
# Create a perl-modules package recommending all the other perl
# packages (actually the non modules packages and not created too)
ALLOW_EMPTY_perl-modules = "1"
PACKAGES_append = " perl-modules "
PACKAGESPLITFUNCS_prepend = "split_perl_packages "
python split_perl_packages () {
libdir = d.expand('${libdir}/perl/${PV}')
do_split_packages(d, libdir, 'auto/([^.]*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
# perl-modules should recommend every perl module, and only the
# modules. Don't attempt to use the result of do_split_packages() as some
# modules are manually split (eg. perl-module-unicore).
packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES', True).split())
d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
}
PACKAGES_DYNAMIC += "^perl-module-.*"
===== end =====
i sort of see what that's doing -- don't understand it completely,
but i'm assuming it's processing the contents of that .inc file to
list all modules to be built and incorporated into the "perl-modules"
dynamic package.
is this even remotely the right approach? is there an OE/YP manual
that explains this somewhere? thanks.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
next reply other threads:[~2016-10-27 9:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 9:52 Robert P. J. Day [this message]
2016-10-27 12:46 ` how to add new perl modules to stock OE build? Robert P. J. Day
2016-10-27 13:26 ` Olof Johansson
2016-10-27 13:55 ` Robert P. J. Day
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.20.1610270533590.12908@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox