diff options
Diffstat (limited to 'meta/classes/cpan_build.bbclass')
-rw-r--r-- | meta/classes/cpan_build.bbclass | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass deleted file mode 100644 index f3fb4666ef..0000000000 --- a/meta/classes/cpan_build.bbclass +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | # | ||
2 | # This is for perl modules that use the new Build.PL build system | ||
3 | # | ||
4 | inherit cpan-base perlnative | ||
5 | |||
6 | EXTRA_CPAN_BUILD_FLAGS ?= "" | ||
7 | |||
8 | # Env var which tells perl if it should use host (no) or target (yes) settings | ||
9 | export PERLCONFIGTARGET = "${@is_target(d)}" | ||
10 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" | ||
11 | export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/" | ||
12 | export PERLHOSTARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/${@get_perl_hostarch(d)}/" | ||
13 | export LD = "${CCLD}" | ||
14 | |||
15 | cpan_build_do_configure () { | ||
16 | if [ "${@is_target(d)}" = "yes" ]; then | ||
17 | # build for target | ||
18 | . ${STAGING_LIBDIR}/perl5/config.sh | ||
19 | fi | ||
20 | |||
21 | perl Build.PL --installdirs vendor --destdir ${D} \ | ||
22 | ${EXTRA_CPAN_BUILD_FLAGS} | ||
23 | |||
24 | # Build.PLs can exit with success without generating a | ||
25 | # Build, e.g. in cases of missing configure time | ||
26 | # dependencies. This is considered a best practice by | ||
27 | # cpantesters.org. See: | ||
28 | # * http://wiki.cpantesters.org/wiki/CPANAuthorNotes | ||
29 | # * http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html | ||
30 | [ -e Build ] || bbfatal "No Build was generated by Build.PL" | ||
31 | } | ||
32 | |||
33 | cpan_build_do_compile () { | ||
34 | perl Build --perl "${bindir}/perl" verbose=1 | ||
35 | } | ||
36 | |||
37 | cpan_build_do_install () { | ||
38 | perl Build install --destdir ${D} | ||
39 | } | ||
40 | |||
41 | EXPORT_FUNCTIONS do_configure do_compile do_install | ||