Received: by mail.netbsd.org (Postfix, from userid 605) id C4BA084E2F; Wed, 2 Oct 2019 15:57:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 4A5C584DEB for ; Wed, 2 Oct 2019 15:57:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id W7BrM7vqCiht for ; Wed, 2 Oct 2019 15:57:37 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id B39C084D3F for ; Wed, 2 Oct 2019 15:57:37 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id AD23AFBF4; Wed, 2 Oct 2019 15:57:37 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1570031857500" MIME-Version: 1.0 Date: Wed, 2 Oct 2019 15:57:37 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/url2pkg/files To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20191002155737.AD23AFBF4@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1570031857500 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Wed Oct 2 15:57:37 UTC 2019 Modified Files: pkgsrc/pkgtools/url2pkg/files: MakeMaker.pm url2pkg.pl Log Message: pkgtools/url2pkg: small adjustments * Fixed copy-and-paste typo in MakeMaker Perl module. * Added -v command line option. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm cvs rdiff -u -r1.75 -r1.76 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1570031857500 Content-Disposition: inline Content-Length: 2697 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm diff -u pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm:1.12 pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm:1.13 --- pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm:1.12 Tue Oct 1 19:41:23 2019 +++ pkgsrc/pkgtools/url2pkg/files/MakeMaker.pm Wed Oct 2 15:57:37 2019 @@ -118,7 +118,7 @@ sub WriteMakefile(%) { 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)") } } Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.pl diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.75 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.76 --- pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.75 Tue Oct 1 19:41:23 2019 +++ pkgsrc/pkgtools/url2pkg/files/url2pkg.pl Wed Oct 2 15:57:37 2019 @@ -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 @@ my $pkgsrcdir = '@PKGSRCDIR@'; use constant true => 1; use constant false => 0; +our $verbose = false; + sub run_editor($$) { my ($fname, $lineno) = @_; @@ -364,12 +368,12 @@ sub read_dependencies($$$) { while (defined (my $line = )) { chomp($line); - if ($line =~ qr"^(\w+)\t([^\s:>]+)(>[^\s:]+|)(?::(\.\./\.\./\S+))?$") { - push(@dep_lines, [ $1, $2, $3 || ">=0", $4 || "" ]); - } elsif ($line =~ qr"^var\t(\S+)\t(.+)$") { + 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 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 determine_wrksrc() { 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 @@ sub main() { 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: "); --_----------=_1570031857500--