void-packages/srcpkgs/perl-XML-SAX/patches/fix-installation.patch
Đ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

50 lines
1.1 KiB
Diff

Source: maxice8
Upstream: No
Reason: Fixes installation
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -12,43 +12,3 @@ WriteMakefile(
'XML::NamespaceSupport' => 0.03,
},
);
-
-sub MY::install {
- package MY;
- my $script = shift->SUPER::install(@_);
-
- # Only modify existing ParserDetails.ini if user agrees
-
- my $write_ini_ok = 0;
-
- eval { require XML::SAX };
- if ($@) {
- $write_ini_ok = 1;
- }
- else {
- my $dir = File::Basename::dirname($INC{'XML/SAX.pm'});
- if (-e File::Spec->catfile($dir, 'SAX', 'ParserDetails.ini')) {
- $write_ini_ok =
- ExtUtils::MakeMaker::prompt(
- "Do you want XML::SAX to alter ParserDetails.ini?", "Y"
- ) =~ /^y/i;
- }
- else {
- $write_ini_ok = 1;
- }
- }
-
- if ($write_ini_ok) {
- $script =~ s/install :: (.*)$/install :: $1 install_sax_pureperl/m;
- $script .= <<"INSTALL";
-
-install_sax_pureperl : pure_install
-\t\@\$(PERL) -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
-
-INSTALL
-
- }
-
- return $script;
-}
-