void-packages/srcpkgs/perl/patches/cpan_definstalldirs.diff
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

38 lines
1.5 KiB
Diff

From 91c395844c280f07b4eeb4aa20f1b2abd9fe1126 Mon Sep 17 00:00:00 2001
From: Torsten Veller <tove@gentoo.org>
Date: Sat, 14 Apr 2012 13:34:20 +0200
Subject: Provide a sensible INSTALLDIRS default for modules installed from
CPAN.
Some modules which are included in core set INSTALLDIRS => 'perl'
explicitly in Makefile.PL or Build.PL. This makes sense for the normal @INC
ordering, but not ours.
Taken from Debian.
Patch-Name: gentoo/cpan_definstalldirs.diff
---
cpan/CPAN/lib/CPAN/FirstTime.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm
index 5030ef9..5953cb7 100644
--- a/cpan/CPAN/lib/CPAN/FirstTime.pm
+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
@@ -990,7 +990,7 @@ sub init {
my_prompt_loop(prefer_installer => 'MB', $matcher, 'MB|EUMM|RAND');
if (!$matcher or 'makepl_arg make_arg' =~ /$matcher/) {
- my_dflt_prompt(makepl_arg => "", $matcher);
+ my_dflt_prompt(makepl_arg => "INSTALLDIRS=site", $matcher);
my_dflt_prompt(make_arg => "", $matcher);
if ( $CPAN::Config->{makepl_arg} =~ /LIBS=|INC=/ ) {
$CPAN::Frontend->mywarn(
@@ -1022,7 +1022,7 @@ sub init {
my_dflt_prompt(make_install_arg => $CPAN::Config->{make_arg} || "",
$matcher);
- my_dflt_prompt(mbuildpl_arg => "", $matcher);
+ my_dflt_prompt(mbuildpl_arg => "--installdirs site", $matcher);
my_dflt_prompt(mbuild_arg => "", $matcher);
if (exists $CPAN::HandleConfig::keys{mbuild_install_build_command}