repo/gentoo:master commit in: eclass/
"Sam James" <[email protected]> Tue, 04 Aug 2026 19:57:42 +0000 (UTC)
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1785873211.af17a74b9fcde94431cc5898078fc49950ddc468.sam@gentoo> |
commit: af17a74b9fcde94431cc5898078fc49950ddc468
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 4 19:38:11 2026 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 4 19:53:31 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af17a74b
perl-module.eclass: support Dist::Build
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/perl-module.eclass | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 29b4959bfa98..6acaa108cd26 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -255,7 +255,31 @@ perl-module_src_configure() {
local myconf_local=("${myconf[@]}")
fi
- if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then
+ if [[ -f Build.PL ]] && grep -q '\(use\|require\)\s* Dist::Build' Build.PL ; then
+ einfo "Using Dist::Build"
+ if [[ ${BDEPEND} != *dev-perl/Dist-Build* && ${PN} != Dist-Build ]]; then
+ eerror "QA Notice: The ebuild uses Dist::Build but doesn't depend on it."
+ eerror " Add dev-perl/Dist-Build to BDEPEND!"
+ fi
+
+ # https://metacpan.org/pod/CPAN::API::BuildPL#Command-Line-Options
+ set -- \
+ --installdirs=vendor \
+ --create_packlist=1 \
+ --verbose \
+ --prefix "${EPREFIX}"/usr \
+ --config ar="$(tc-getAR)" \
+ --config cc="$(tc-getCC)" \
+ --config cpp="$(tc-getCPP)" \
+ --config ld="$(tc-getCC)" \
+ --config nm="$(tc-getNM)" \
+ --config ranlib="$(tc-getRANLIB)" \
+ --config optimize="${CFLAGS}" \
+ --config ldflags="${LDFLAGS}" \
+ "${myconf_local[@]}"
+ einfo "perl Build.PL" "$@"
+ perl Build.PL "$@" <<< "${pm_echovar}" || die "Unable to build!"
+ elif [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then
if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then
einfo "Using Module::Build::Tiny"
if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then