pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/url2pkg/files pkgtools/url2pkg: small adjustm...
details: https://anonhg.NetBSD.org/pkgsrc/rev/64c87af21b06
branches: trunk
changeset: 402001:64c87af21b06
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Oct 02 15:57:37 2019 +0000
description:
pkgtools/url2pkg: small adjustments
* Fixed copy-and-paste typo in MakeMaker Perl module.
* Added -v command line option.
diffstat:
pkgtools/url2pkg/files/MakeMaker.pm | 2 +-
pkgtools/url2pkg/files/url2pkg.pl | 20 ++++++++++++++------
2 files changed, 15 insertions(+), 7 deletions(-)
diffs (77 lines):
diff -r b11f0a6463c1 -r 64c87af21b06 pkgtools/url2pkg/files/MakeMaker.pm
--- a/pkgtools/url2pkg/files/MakeMaker.pm Wed Oct 02 15:36:14 2019 +0000
+++ b/pkgtools/url2pkg/files/MakeMaker.pm Wed Oct 02 15:57:37 2019 +0000
@@ -118,7 +118,7 @@
if ($license eq "perl") {
url2pkg_write_var("LICENSE", "\${PERL5_LICENSE}");
} elsif ($license ne "") {
- url2pkg_write_var("#LICENSE", "# TODO: $license (from Build.PL)")
+ url2pkg_write_var("#LICENSE", "# TODO: $license (from Makefile.PL)")
}
}
diff -r b11f0a6463c1 -r 64c87af21b06 pkgtools/url2pkg/files/url2pkg.pl
--- a/pkgtools/url2pkg/files/url2pkg.pl Wed Oct 02 15:36:14 2019 +0000
+++ b/pkgtools/url2pkg/files/url2pkg.pl Wed Oct 02 15:57:37 2019 +0000
@@ -1,5 +1,5 @@
#! @PERL5@
-# $NetBSD: url2pkg.pl,v 1.75 2019/10/01 19:41:23 rillig Exp $
+# $NetBSD: url2pkg.pl,v 1.76 2019/10/02 15:57:37 rillig Exp $
#
# Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,6 +32,8 @@
use strict;
use warnings;
+use Getopt::Long;
+
my $make = '@MAKE@';
my $libdir = '@LIBDIR@';
my $pythonbin = '@PYTHONBIN@';
@@ -40,6 +42,8 @@
use constant true => 1;
use constant false => 0;
+our $verbose = false;
+
sub run_editor($$) {
my ($fname, $lineno) = @_;
@@ -364,12 +368,12 @@
while (defined (my $line = <DEPS>)) {
chomp($line);
- if ($line =~ qr"^(\w+)\t([^\s:>]+)(>[^\s:]+|)(?::(\.\./\.\./\S+))?$") {
+ if ($line =~ qr"^var\t(\S+)\t(.+)$") {
+ $main::update_vars{$1} = $2;
+ } elsif ($line =~ qr"^(\w+)\t([^\s:>]+)(>[^\s:]+|)(?::(\.\./\.\./\S+))?$") {
push(@dep_lines, [ $1, $2, $3 || ">=0", $4 || "" ]);
- } elsif ($line =~ qr"^var\t(\S+)\t(.+)$") {
- $main::update_vars{$1} = $2;
} elsif ($line ne "") {
- printf STDERR "url2pkg: info: unknown dependency line: %s\n", $line;
+ $verbose and printf STDERR "url2pkg: info: unknown dependency line: %s\n", $line;
}
}
@@ -785,7 +789,7 @@
sub adjust_package_from_extracted_distfiles($) {
my ($url) = @_;
- print("url2pkg> Adjusting the Makefile\n");
+ $verbose and print("url2pkg> Adjusting the Makefile\n");
chomp($abs_wrkdir = `$make show-var VARNAME=WRKDIR`);
determine_wrksrc();
@@ -868,6 +872,10 @@
die("ERROR: $0 must be run from a package directory (.../pkgsrc/category/package).\n");
}
+ GetOptions(
+ "verbose=v" => \$verbose
+ );
+
my $url;
if (scalar(@ARGV) == 0) {
print("URL: ");
Home |
Main Index |
Thread Index |
Old Index