From fe072f9866b05a7ad32e77045ff8cb3825aa5569 Mon Sep 17 00:00:00 2001 From: Celeste <20312-Celeste@users.gitlab.alpinelinux.org> Date: Thu, 11 Jan 2024 03:14:35 +0000 Subject: [PATCH] apkbuild-cpan.in: fix empty directories by not installing .packlist and perllocal.pod. The call to find -delete has been removed as the modifications to build() have covered almost all cases, so deleting .packlist and perllocal.pod manually is no longer necessary. Also, increment template version from 3 to 4 to allow easy identification of aports that have this change applied. --- apkbuild-cpan.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in index ceacbcd..ab6abf9 100755 --- a/apkbuild-cpan.in +++ b/apkbuild-cpan.in @@ -35,7 +35,7 @@ my $package_mappings = { }; our $packager = ""; my $template = <<'EOF'; -# Automatically generated by apkbuild-cpan, template 3 +# Automatically generated by apkbuild-cpan, template 4 [% authors %] pkgname=[% pkgname %] #_pkgreal is used by apkbuild-cpan to find modules at MetaCpan @@ -264,14 +264,15 @@ sub update_functions { $build_func = <<'EOF'; build() { export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') - perl Build.PL --installdirs=vendor + perl Build.PL \ + --installdirs=vendor \ + --create_packlist=0 ./Build } EOF $package_func = <<'EOF'; package() { ./Build install --destdir="$pkgdir" - find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } EOF $check_func = <<'EOF'; @@ -284,14 +285,16 @@ EOF $build_func = <<'EOF'; build() { export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') - PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor + PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL \ + INSTALLDIRS=vendor \ + NO_PACKLIST=1 \ + NO_PERLLOCAL=1 make } EOF $package_func = <<'EOF'; package() { make DESTDIR="$pkgdir" install - find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } EOF $check_func = <<'EOF';