blob: b57618724d1a05c3ea8eca79f67ce970545996ef [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 "
Andrew Geissler028142b2023-05-05 11:29:21 -050019SRC_URI[sha256sum] = "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f"
Andrew Geissler517393d2023-01-13 08:55:19 -060020
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
Andrew Geissler028142b2023-05-05 11:29:21 -050037do_install:prepend () {
38 # We do not have a recipe for libpod-parser-perl which is for
39 # documentation (and is deprecated in favor of Pod::Simple)
40 rm -rf ${B}/t/pod_parser.t
41}
42
Andrew Geissler517393d2023-01-13 08:55:19 -060043do_install:append () {
44 rm -rf ${D}${docdir}/perl/html
45 sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/config_data
46}
47
48do_install_ptest() {
49 cp -r ${B}/inc ${D}${PTEST_PATH}
50 cp -r ${B}/blib ${D}${PTEST_PATH}
51 cp -r ${B}/_build ${D}${PTEST_PATH}
52 cp -r ${B}/lib ${D}${PTEST_PATH}
53 chown -R root:root ${D}${PTEST_PATH}
54 sed -i -e "s,'perl' => .*,'perl' => '/usr/bin/perl'\,,g" \
55 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/\.\.,${bindir}/,g" \
56 -e "s,${S},,g" \
57 -e "s,${D},,g" \
58 ${D}${PTEST_PATH}/_build/build_params \
59 ${D}${PTEST_PATH}/_build/runtime_params
60 rm -rf ${D}${PTEST_PATH}/blib/libhtml/site/lib/Module/
61 rm -rf ${D}${PTEST_PATH}/_build/magicnum
62}
63
64RDEPENDS:${PN} += " \
65 perl-module-carp \
66 perl-module-cpan \
67 perl-module-config \
68 perl-module-cwd \
69 perl-module-data-dumper \
70 perl-module-encode \
71 perl-module-extutils-cbuilder \
72 perl-module-extutils-command \
73 perl-module-extutils-install \
74 perl-module-extutils-installed \
75 perl-module-extutils-mkbootstrap \
76 perl-module-extutils-packlist \
77 perl-module-extutils-parsexs \
78 perl-module-file-basename \
79 perl-module-file-compare \
80 perl-module-file-copy \
81 perl-module-file-find \
82 perl-module-file-glob \
83 perl-module-file-path \
84 perl-module-file-spec \
85 perl-module-file-spec-functions \
86 perl-module-getopt-long \
87 perl-module-metadata \
88 perl-module-perl-ostype \
89 perl-module-pod-man \
90 perl-module-tap-harness \
91 perl-module-text-abbrev \
92 perl-module-text-parsewords \
93 perl-module-utf8 \
94"
95
96RDEPENDS:${PN}-ptest += " \
97 packagegroup-core-buildessential \
98 perl-dev \
99 perl-module-blib \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500100 perl-module-encode-encoding \
101 perl-module-extutils-cbuilder-base \
Andrew Geissler517393d2023-01-13 08:55:19 -0600102 perl-module-extutils-command-mm \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500103 perl-module-extutils-mm-unix \
Andrew Geissler517393d2023-01-13 08:55:19 -0600104 perl-module-file-temp \
105 perl-module-lib \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500106 perl-module-parse-cpan-meta \
Andrew Geissler517393d2023-01-13 08:55:19 -0600107 perl-module-perlio \
108 perl-module-perlio-encoding \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500109 perl-module-pod-simple-transcodesmart \
Andrew Geissler517393d2023-01-13 08:55:19 -0600110 perl-module-pod-text \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500111 perl-module-tap-base \
112 perl-module-tap-formatter-base \
113 perl-module-tap-formatter-file \
114 perl-module-tap-formatter-session \
Andrew Geissler517393d2023-01-13 08:55:19 -0600115 perl-module-tap-harness-env \
116 perl-module-tap-parser \
117 perl-module-tap-parser-scheduler \
118 perl-module-test-harness \
119 perl-module-test-more \
120"
121
122RPROVIDES:${PN} += "\
123 libmodule-build-base-perl \
124 libmodule-build-compat-perl \
125 libmodule-build-config-perl \
126 libmodule-build-cookbook-perl \
127 libmodule-build-dumper-perl \
128 libmodule-build-notes-perl \
129 libmodule-build-ppmaker-perl \
130 libmodule-build-platform-default-perl \
131 libmodule-build-platform-unix-perl \
132 libmodule-build-podparser-perl \
133"
134
135# t/xs.t RDEPENDS on "EXTERN.h" provided by perl-dev
136INSANE_SKIP:${PN}-ptest = "dev-deps"
137
138BBCLASSEXTEND = "native"