Received: by mail.netbsd.org (Postfix, from userid 605) id B30B484D2C; Sun, 18 Aug 2019 13:49:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3921084D2A for ; Sun, 18 Aug 2019 13:49:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id jkh7sT57jVFV for ; Sun, 18 Aug 2019 13:49:13 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 9A38184CDC for ; Sun, 18 Aug 2019 13:49:13 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 8CE9BFBF4; Sun, 18 Aug 2019 13:49:13 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_156613615374080" MIME-Version: 1.0 Date: Sun, 18 Aug 2019 13:49:13 +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: <20190818134913.8CE9BFBF4@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. --_----------=_156613615374080 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Sun Aug 18 13:49:13 UTC 2019 Modified Files: pkgsrc/pkgtools/url2pkg/files: url2pkg.pl Log Message: pkgtools/url2pkg: consistently use double quotes for string literals To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 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. --_----------=_156613615374080 Content-Disposition: inline Content-Length: 3542 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.pl diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.57 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.58 --- pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.57 Sun Aug 18 13:32:21 2019 +++ pkgsrc/pkgtools/url2pkg/files/url2pkg.pl Sun Aug 18 13:49:13 2019 @@ -1,5 +1,5 @@ #! @PERL5@ -# $NetBSD: url2pkg.pl,v 1.57 2019/08/18 13:32:21 rillig Exp $ +# $NetBSD: url2pkg.pl,v 1.58 2019/08/18 13:49:13 rillig Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -37,9 +37,9 @@ use warnings; # Build-time Configuration. # -my $make = '@MAKE@'; -my $libdir = '@LIBDIR@'; -my $pythonbin = '@PYTHONBIN@'; +my $make = "@MAKE@"; +my $libdir = "@LIBDIR@"; +my $pythonbin = "@PYTHONBIN@"; use constant true => 1; use constant false => 0; @@ -115,15 +115,15 @@ sub find_package($) { sub update_var_append($$$) { my ($lines, $varname, $value) = @_; - return if $value eq ''; + return if $value eq ""; my $i = 0; foreach my $line (@$lines) { if ($line =~ qr"^\Q$varname\E(\+?=)([ \t]+)([^#\\]*)(#.*|)$") { my ($op, $indent, $old_value, $comment) = ($1, $2, $3, $4); - my $before = $old_value =~ qr'\S$' ? ' ' : ''; - my $after = $comment eq '' ? '' : ' '; + my $before = $old_value =~ qr"\S$" ? " " : ""; + my $after = $comment eq "" ? "" : " "; $lines->[$i] = "$varname$op$indent$old_value$before$value$after$comment"; return; } @@ -193,7 +193,7 @@ my @todos; my $pkgname = ""; # Example: -# add_dependency('DEPENDS', 'package', '>=1', '../../category/package'); +# add_dependency("DEPENDS", "package", ">=1", "../../category/package"); # sub add_dependency($$$$) { my ($type, $pkgbase, $constraint, $dep_dir) = @_; @@ -310,8 +310,8 @@ sub adjust_python_module() { return unless -f "$abs_wrksrc/setup.py"; my %old_env = %ENV; - $ENV{'PYTHONDONTWRITEBYTECODE'} = 'x'; - $ENV{'PYTHONPATH'} = $libdir; + $ENV{"PYTHONDONTWRITEBYTECODE"} = "x"; + $ENV{"PYTHONPATH"} = $libdir; my @dep_lines; open(DEPS, "cd '$abs_wrksrc' && $pythonbin setup.py build |") or die; @@ -451,8 +451,8 @@ sub generate_initial_package_Makefile_li $homepage = "https://github.com/$org/$proj/"; $github_project = $proj; if (index($tag, $github_project) == -1) { - $pkgname = '${GITHUB_PROJECT}-${DISTNAME}'; - $dist_subdir = '${GITHUB_PROJECT}'; + $pkgname = "\${GITHUB_PROJECT}-\${DISTNAME}"; + $dist_subdir = "\${GITHUB_PROJECT}"; } $distfile = "$tag$ext"; @@ -463,9 +463,9 @@ sub generate_initial_package_Makefile_li $homepage = "https://github.com/$org/$proj/"; if (index($base, $proj) == -1) { $github_project = $proj; - $dist_subdir = '${GITHUB_PROJECT}'; + $dist_subdir = "\${GITHUB_PROJECT}"; } - $github_release = $tag eq $base ? '${DISTNAME}' : $tag; + $github_release = $tag eq $base ? "\${DISTNAME}" : $tag; $distfile = "$base$ext"; } else { @@ -559,8 +559,8 @@ sub adjust_package_from_extracted_distfi no if $] >= 5.018, warnings => "experimental::smartmatch"; given ($f) { next when qr"^\."; - next when 'pax_global_header'; - next when 'package.xml'; + next when "pax_global_header"; + next when "package.xml"; next when qr".*\.gemspec"; default { push(@files, $f) } } @@ -640,7 +640,7 @@ sub adjust_package_from_extracted_distfi close(MF1); - update_var_append(\@lines, 'CATEGORIES', join(' ', @categories)); + update_var_append(\@lines, "CATEGORIES", join(" ", @categories)); write_lines("Makefile-url2pkg.new", @lines); --_----------=_156613615374080--