summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/libmodule-build-perl_0.4232.bb
blob: 748412b414f6ff8ff9d164b348ed180edf0efc64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
SUMMARY = "Module::Build - Build and install Perl modules"
DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a \
Makefile.PL file to drive distribution configuration, build, test and \
installation. Traditionally, Build.PL uses Module::Build as the underlying \
build system. This module provides a simple, lightweight, drop-in replacement. \
Whereas Module::Build has over 6,700 lines of code; this module has less than \
120, yet supports the features needed by most distributions."

SECTION = "libs"

HOMEPAGE = "https://metacpan.org/release/Module-Build"

LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://README;beginline=881;endline=886;md5=3027f56c664545e54678c26b7f1ac19c"

SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-${PV}.tar.gz \
           file://run-ptest \
           "
SRC_URI[sha256sum] = "67c82ee245d94ba06decfa25572ab75fdcd26a9009094289d8f45bc54041771b"

S = "${WORKDIR}/Module-Build-${PV}"

inherit cpan_build ptest-perl

# From:
# https://github.com/rehsack/meta-cpan/blob/master/recipes-devel/module-build-perl/module-build-perl_0.4216.bb
#
do_patch_module_build () {
    cd ${S}
    sed -i -e 's,my $interpreter = $self->{properties}{perl};,my $interpreter = "${bindir}/perl";,g' lib/Module/Build/Base.pm
}

do_patch[postfuncs] += "do_patch_module_build"

EXTRA_CPAN_BUILD_FLAGS = "--create_packlist=0"

do_install:append () {
        rm -rf ${D}${docdir}/perl/html
        sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/config_data
}

do_install_ptest() {
	cp -r ${B}/inc ${D}${PTEST_PATH}
	cp -r ${B}/blib ${D}${PTEST_PATH}
	cp -r ${B}/_build ${D}${PTEST_PATH}
	cp -r ${B}/lib ${D}${PTEST_PATH}
	chown -R root:root ${D}${PTEST_PATH}
	sed -i -e "s,'perl' => .*,'perl' => '/usr/bin/perl'\,,g" \
               -e "s,${STAGING_BINDIR_NATIVE}/perl-native/\.\.,${bindir}/,g" \
               -e "s,${S},,g" \
               -e "s,${D},,g" \
               ${D}${PTEST_PATH}/_build/build_params \
               ${D}${PTEST_PATH}/_build/runtime_params
        rm -rf ${D}${PTEST_PATH}/blib/libhtml/site/lib/Module/
        rm -rf ${D}${PTEST_PATH}/_build/magicnum
}

RDEPENDS:${PN} += " \
    perl-module-carp \
    perl-module-cpan \
    perl-module-config \
    perl-module-cwd \
    perl-module-data-dumper \
    perl-module-encode \
    perl-module-extutils-cbuilder \
    perl-module-extutils-command \
    perl-module-extutils-install \
    perl-module-extutils-installed \
    perl-module-extutils-mkbootstrap \
    perl-module-extutils-packlist \
    perl-module-extutils-parsexs \
    perl-module-file-basename \
    perl-module-file-compare \
    perl-module-file-copy \
    perl-module-file-find \
    perl-module-file-glob \
    perl-module-file-path \
    perl-module-file-spec \
    perl-module-file-spec-functions \
    perl-module-getopt-long \
    perl-module-metadata \
    perl-module-perl-ostype \
    perl-module-pod-man \
    perl-module-tap-harness \
    perl-module-text-abbrev \
    perl-module-text-parsewords \
    perl-module-utf8 \
"

RDEPENDS:${PN}-ptest += " \
    packagegroup-core-buildessential \
    perl-dev \
    perl-module-blib \
    perl-module-extutils-command-mm \
    perl-module-file-temp \
    perl-module-lib \
    perl-module-perlio \
    perl-module-perlio-encoding \
    perl-module-pod-text \
    perl-module-tap-harness-env \
    perl-module-tap-parser \
    perl-module-tap-parser-scheduler \
    perl-module-test-harness \
    perl-module-test-more \
"

RPROVIDES:${PN} += "\
    libmodule-build-base-perl \
    libmodule-build-compat-perl \
    libmodule-build-config-perl \
    libmodule-build-cookbook-perl \
    libmodule-build-dumper-perl \
    libmodule-build-notes-perl \
    libmodule-build-ppmaker-perl \
    libmodule-build-platform-default-perl \
    libmodule-build-platform-unix-perl \
    libmodule-build-podparser-perl \
"

# t/xs.t RDEPENDS on "EXTERN.h" provided by perl-dev
INSANE_SKIP:${PN}-ptest = "dev-deps"

BBCLASSEXTEND = "native"