Sat Aug 17 13:12:00 2019 UTC ()
pkgtools/url2pkg: fix for p5-HTML-Quoted


(rillig)
diff -r1.7 -r1.8 pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm
diff -r1.40 -r1.41 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl

cvs diff -r1.7 -r1.8 pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm (expand / switch to unified diff)

--- pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm 2019/08/17 12:50:00 1.7
+++ pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm 2019/08/17 13:12:00 1.8
@@ -42,27 +42,27 @@ use warnings; @@ -42,27 +42,27 @@ use warnings;
42use constant conf_pkgsrcdir => '@PKGSRCDIR@'; 42use constant conf_pkgsrcdir => '@PKGSRCDIR@';
43 43
44BEGIN { 44BEGIN {
45 use Exporter; 45 use Exporter;
46 use vars qw(@ISA @EXPORT); 46 use vars qw(@ISA @EXPORT);
47 @ISA = qw(Exporter); 47 @ISA = qw(Exporter);
48} 48}
49 49
50# From lib/perl5/5.18.0/ExtUtils/MakeMaker.pm 50# From lib/perl5/5.18.0/ExtUtils/MakeMaker.pm
51our $VERSION = '6.66'; 51our $VERSION = '6.66';
52 52
53our $Verbose = 0; # exported 53our $Verbose = 0; # exported
54our @EXPORT = qw(&WriteMakefile &prompt $Verbose $version); 54our @EXPORT = qw(&WriteMakefile &prompt $Verbose $version);
55our @EXPORT_OK = qw(&neatvalue); 55our @EXPORT_OK = qw(&neatvalue &_sprintf562);
56 56
57# Finds and returns the category a given package lies in. 57# Finds and returns the category a given package lies in.
58# If the package does not exist, C<undef> is returned. 58# If the package does not exist, C<undef> is returned.
59# If the package exists more than once, it is unspecified which 59# If the package exists more than once, it is unspecified which
60# of the categories is returned. 60# of the categories is returned.
61sub find_category($) { 61sub find_category($) {
62 my ($pkg) = @_; 62 my ($pkg) = @_;
63 my ($retval, $pkgsrcdir); 63 my ($retval, $pkgsrcdir);
64 64
65 opendir(D, conf_pkgsrcdir) or die; 65 opendir(D, conf_pkgsrcdir) or die;
66 foreach my $cat (readdir(D)) { 66 foreach my $cat (readdir(D)) {
67 next if ($cat =~ qr"^\."); 67 next if ($cat =~ qr"^\.");
68 68
@@ -103,14 +103,18 @@ sub WriteMakefile(%) { @@ -103,14 +103,18 @@ sub WriteMakefile(%) {
103 } 103 }
104} 104}
105 105
106sub prompt(@) { 106sub prompt(@) {
107 my ($message, $default) = @_; 107 my ($message, $default) = @_;
108 108
109 return $default || ""; 109 return $default || "";
110} 110}
111 111
112sub neatvalue { 112sub neatvalue {
113 return; 113 return;
114} 114}
115 115
 116sub _sprintf562 {
 117 return sprintf(@_);
 118}
 119
1161; 1201;

cvs diff -r1.40 -r1.41 pkgsrc/pkgtools/url2pkg/files/Attic/url2pkg.pl (expand / switch to unified diff)

--- pkgsrc/pkgtools/url2pkg/files/Attic/url2pkg.pl 2019/08/17 11:57:36 1.40
+++ pkgsrc/pkgtools/url2pkg/files/Attic/url2pkg.pl 2019/08/17 13:12:00 1.41
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#! @PERL@ 1#! @PERL@
2# $NetBSD: url2pkg.pl,v 1.40 2019/08/17 11:57:36 rillig Exp $ 2# $NetBSD: url2pkg.pl,v 1.41 2019/08/17 13:12:00 rillig Exp $
3# 3#
4 4
5# Copyright (c) 2010 The NetBSD Foundation, Inc. 5# Copyright (c) 2010 The NetBSD Foundation, Inc.
6# All rights reserved. 6# All rights reserved.
7# 7#
8# This code is derived from software contributed to The NetBSD Foundation 8# This code is derived from software contributed to The NetBSD Foundation
9# by Roland Illig. 9# by Roland Illig.
10# 10#
11# Redistribution and use in source and binary forms, with or without 11# Redistribution and use in source and binary forms, with or without
12# modification, are permitted provided that the following conditions 12# modification, are permitted provided that the following conditions
13# are met: 13# are met:
14# 1. Redistributions of source code must retain the above copyright 14# 1. Redistributions of source code must retain the above copyright
15# notice, this list of conditions and the following disclaimer. 15# notice, this list of conditions and the following disclaimer.
@@ -171,30 +171,31 @@ sub magic_libtool() { @@ -171,30 +171,31 @@ sub magic_libtool() {
171 } 171 }
172} 172}
173 173
174sub magic_perlmod() { 174sub magic_perlmod() {
175 if (-f "${abs_wrksrc}/Build.PL") { 175 if (-f "${abs_wrksrc}/Build.PL") {
176 176
177 # It's a Module::Build module. Dependencies cannot yet be 177 # It's a Module::Build module. Dependencies cannot yet be
178 # extracted automatically. 178 # extracted automatically.
179 push(@todo, "Look for the dependencies in Build.PL."); 179 push(@todo, "Look for the dependencies in Build.PL.");
180 180
181 push(@build_vars, ["PERL5_MODULE_TYPE", "Module::Build"]); 181 push(@build_vars, ["PERL5_MODULE_TYPE", "Module::Build"]);
182 182
183 } elsif (-f "${abs_wrksrc}/Makefile.PL") { 183 } elsif (-f "${abs_wrksrc}/Makefile.PL") {
184 # To avoid fix_up_makefile error, generate Makefile previously. 184
185 # Ignore exit status (no "or die"). 185 # To avoid fix_up_makefile error for p5-HTML-Quoted, generate Makefile first.
186 system("cd ${abs_wrksrc} && perl Makefile.PL"); 186 system("cd ${abs_wrksrc} && perl -I. Makefile.PL < /dev/null") or "ignore";
187 open(DEPS, "cd ${abs_wrksrc} && perl -I${perllibdir} Makefile.PL |") or die; 187
 188 open(DEPS, "cd ${abs_wrksrc} && perl -I${perllibdir} -I. Makefile.PL |") or die;
188 while (defined(my $dep = <DEPS>)) { 189 while (defined(my $dep = <DEPS>)) {
189 chomp($dep); 190 chomp($dep);
190 if ($dep =~ qr"\.\./\.\./") { 191 if ($dep =~ qr"\.\./\.\./") {
191 # Many Perl modules write other things to 192 # Many Perl modules write other things to
192 # stdout, so filter them out. 193 # stdout, so filter them out.
193 push(@depends, $dep); 194 push(@depends, $dep);
194 } 195 }
195 } 196 }
196 close(DEPS) or die; 197 close(DEPS) or die;
197 198
198 } else { 199 } else {
199 return; 200 return;
200 } 201 }