blob: 0ead690067bc6de0e44e8017dfbcab3c97eecb50 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "Module::Build - Build and install Perl modules"
2DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a \
3Makefile.PL file to drive distribution configuration, build, test and \
4installation. Traditionally, Build.PL uses Module::Build as the underlying \
5build system. This module provides a simple, lightweight, drop-in replacement. \
6Whereas Module::Build has over 6,700 lines of code; this module has less than \
7120, yet supports the features needed by most distributions."
8
9SECTION = "libs"
10
11HOMEPAGE = "https://metacpan.org/release/Module-Build"
12
13LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
14LIC_FILES_CHKSUM = "file://README;beginline=881;endline=886;md5=3027f56c664545e54678c26b7f1ac19c"
15
16SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-${PV}.tar.gz \
17 file://run-ptest \
18 "
19SRC_URI[sha256sum] = "67c82ee245d94ba06decfa25572ab75fdcd26a9009094289d8f45bc54041771b"
20
21S = "${WORKDIR}/Module-Build-${PV}"
22
23inherit cpan_build ptest-perl
24
25# From:
26# https://github.com/rehsack/meta-cpan/blob/master/recipes-devel/module-build-perl/module-build-perl_0.4216.bb
27#
28do_patch_module_build () {
29 cd ${S}
30 sed -i -e 's,my $interpreter = $self->{properties}{perl};,my $interpreter = "${bindir}/perl";,g' lib/Module/Build/Base.pm
31}
32
33do_patch[postfuncs] += "do_patch_module_build"
34
35EXTRA_CPAN_BUILD_FLAGS = "--create_packlist=0"
36
37do_install:append () {
38 rm -rf ${D}${docdir}/perl/html
39 sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/config_data
40}
41
42do_install_ptest() {
43 cp -r ${B}/inc ${D}${PTEST_PATH}
44 cp -r ${B}/blib ${D}${PTEST_PATH}
45 cp -r ${B}/_build ${D}${PTEST_PATH}
46 cp -r ${B}/lib ${D}${PTEST_PATH}
47 chown -R root:root ${D}${PTEST_PATH}
48 sed -i -e "s,'perl' => .*,'perl' => '/usr/bin/perl'\,,g" \
49 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/\.\.,${bindir}/,g" \
50 -e "s,${S},,g" \
51 -e "s,${D},,g" \
52 ${D}${PTEST_PATH}/_build/build_params \
53 ${D}${PTEST_PATH}/_build/runtime_params
54 rm -rf ${D}${PTEST_PATH}/blib/libhtml/site/lib/Module/
55 rm -rf ${D}${PTEST_PATH}/_build/magicnum
56}
57
58RDEPENDS:${PN} += " \
59 perl-module-carp \
60 perl-module-cpan \
61 perl-module-config \
62 perl-module-cwd \
63 perl-module-data-dumper \
64 perl-module-encode \
65 perl-module-extutils-cbuilder \
66 perl-module-extutils-command \
67 perl-module-extutils-install \
68 perl-module-extutils-installed \
69 perl-module-extutils-mkbootstrap \
70 perl-module-extutils-packlist \
71 perl-module-extutils-parsexs \
72 perl-module-file-basename \
73 perl-module-file-compare \
74 perl-module-file-copy \
75 perl-module-file-find \
76 perl-module-file-glob \
77 perl-module-file-path \
78 perl-module-file-spec \
79 perl-module-file-spec-functions \
80 perl-module-getopt-long \
81 perl-module-metadata \
82 perl-module-perl-ostype \
83 perl-module-pod-man \
84 perl-module-tap-harness \
85 perl-module-text-abbrev \
86 perl-module-text-parsewords \
87 perl-module-utf8 \
88"
89
90RDEPENDS:${PN}-ptest += " \
91 packagegroup-core-buildessential \
92 perl-dev \
93 perl-module-blib \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050094 perl-module-encode-encoding \
95 perl-module-extutils-cbuilder-base \
Andrew Geissler517393d2023-01-13 08:55:19 -060096 perl-module-extutils-command-mm \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050097 perl-module-extutils-mm-unix \
Andrew Geissler517393d2023-01-13 08:55:19 -060098 perl-module-file-temp \
99 perl-module-lib \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500100 perl-module-parse-cpan-meta \
Andrew Geissler517393d2023-01-13 08:55:19 -0600101 perl-module-perlio \
102 perl-module-perlio-encoding \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500103 perl-module-pod-simple-transcodesmart \
Andrew Geissler517393d2023-01-13 08:55:19 -0600104 perl-module-pod-text \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500105 perl-module-tap-base \
106 perl-module-tap-formatter-base \
107 perl-module-tap-formatter-file \
108 perl-module-tap-formatter-session \
Andrew Geissler517393d2023-01-13 08:55:19 -0600109 perl-module-tap-harness-env \
110 perl-module-tap-parser \
111 perl-module-tap-parser-scheduler \
112 perl-module-test-harness \
113 perl-module-test-more \
114"
115
116RPROVIDES:${PN} += "\
117 libmodule-build-base-perl \
118 libmodule-build-compat-perl \
119 libmodule-build-config-perl \
120 libmodule-build-cookbook-perl \
121 libmodule-build-dumper-perl \
122 libmodule-build-notes-perl \
123 libmodule-build-ppmaker-perl \
124 libmodule-build-platform-default-perl \
125 libmodule-build-platform-unix-perl \
126 libmodule-build-podparser-perl \
127"
128
129# t/xs.t RDEPENDS on "EXTERN.h" provided by perl-dev
130INSANE_SKIP:${PN}-ptest = "dev-deps"
131
132BBCLASSEXTEND = "native"