diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-10 14:35:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-12 15:27:17 +0100 |
commit | fd1517e2b51a170f2427122c6b95396db251d827 (patch) | |
tree | dabfe3e631339c2fc99a9ee7febb0f9c128e325e /meta/classes/cpan_build.bbclass | |
parent | 10317912ee319ccf7f83605d438b5cbf9663f296 (diff) | |
download | poky-fd1517e2b51a170f2427122c6b95396db251d827.tar.gz |
classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.
(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/cpan_build.bbclass')
-rw-r--r-- | meta/classes/cpan_build.bbclass | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass deleted file mode 100644 index 026859b6c7..0000000000 --- a/meta/classes/cpan_build.bbclass +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | # | ||
8 | # This is for perl modules that use the new Build.PL build system | ||
9 | # | ||
10 | inherit cpan-base perlnative | ||
11 | |||
12 | EXTRA_CPAN_BUILD_FLAGS ?= "" | ||
13 | |||
14 | # Env var which tells perl if it should use host (no) or target (yes) settings | ||
15 | export PERLCONFIGTARGET = "${@is_target(d)}" | ||
16 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" | ||
17 | export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/" | ||
18 | export PERLHOSTARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/${@get_perl_hostarch(d)}/" | ||
19 | export LD = "${CCLD}" | ||
20 | |||
21 | cpan_build_do_configure () { | ||
22 | if [ "${@is_target(d)}" = "yes" ]; then | ||
23 | # build for target | ||
24 | . ${STAGING_LIBDIR}/perl5/config.sh | ||
25 | fi | ||
26 | |||
27 | perl Build.PL --installdirs vendor --destdir ${D} \ | ||
28 | ${EXTRA_CPAN_BUILD_FLAGS} | ||
29 | |||
30 | # Build.PLs can exit with success without generating a | ||
31 | # Build, e.g. in cases of missing configure time | ||
32 | # dependencies. This is considered a best practice by | ||
33 | # cpantesters.org. See: | ||
34 | # * http://wiki.cpantesters.org/wiki/CPANAuthorNotes | ||
35 | # * http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html | ||
36 | [ -e Build ] || bbfatal "No Build was generated by Build.PL" | ||
37 | } | ||
38 | |||
39 | cpan_build_do_compile () { | ||
40 | perl Build --perl "${bindir}/perl" verbose=1 | ||
41 | } | ||
42 | |||
43 | cpan_build_do_install () { | ||
44 | perl Build install --destdir ${D} | ||
45 | } | ||
46 | |||
47 | EXPORT_FUNCTIONS do_configure do_compile do_install | ||