Wed Jun 17 11:59:58 2015 UTC ()
Fix uninitialized variables warnings.
>From ISIHARA Takanori in PR 49980.


(wiz)
diff -r1.78 -r1.79 pkgsrc/pkgtools/url2pkg/Makefile
diff -r1.28 -r1.29 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl

cvs diff -r1.78 -r1.79 pkgsrc/pkgtools/url2pkg/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/url2pkg/Makefile 2015/06/12 10:50:56 1.78
+++ pkgsrc/pkgtools/url2pkg/Makefile 2015/06/17 11:59:58 1.79
@@ -1,18 +1,16 @@ @@ -1,18 +1,16 @@
1# $NetBSD: Makefile,v 1.78 2015/06/12 10:50:56 wiz Exp $ 1# $NetBSD: Makefile,v 1.79 2015/06/17 11:59:58 wiz Exp $
2# 
3 2
4PKGNAME= url2pkg-2.22 3PKGNAME= url2pkg-2.23
5PKGREVISION= 1 
6CATEGORIES= pkgtools 4CATEGORIES= pkgtools
7 5
8MAINTAINER= pkgsrc-users@NetBSD.org 6MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://www.NetBSD.org/docs/pkgsrc/creating.html 7HOMEPAGE= http://www.NetBSD.org/docs/pkgsrc/creating.html
10COMMENT= Tool to automate initial steps in building a package 8COMMENT= Tool to automate initial steps in building a package
11LICENSE= original-bsd 9LICENSE= original-bsd
12 10
13WRKSRC= ${WRKDIR} 11WRKSRC= ${WRKDIR}
14NO_BUILD= yes 12NO_BUILD= yes
15USE_LANGUAGES= # none 13USE_LANGUAGES= # none
16USE_TOOLS+= perl:run 14USE_TOOLS+= perl:run
17AUTO_MKDIRS= yes 15AUTO_MKDIRS= yes
18 16

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

--- pkgsrc/pkgtools/url2pkg/files/Attic/url2pkg.pl 2015/04/07 00:10:33 1.28
+++ pkgsrc/pkgtools/url2pkg/files/Attic/url2pkg.pl 2015/06/17 11:59:58 1.29
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#! @PERL@ 1#! @PERL@
2# $NetBSD: url2pkg.pl,v 1.28 2015/04/07 00:10:33 rodent Exp $ 2# $NetBSD: url2pkg.pl,v 1.29 2015/06/17 11:59:58 wiz 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.
@@ -323,26 +323,28 @@ sub generate_initial_package($) { @@ -323,26 +323,28 @@ sub generate_initial_package($) {
323 $gh_project = $2; 323 $gh_project = $2;
324 $dist_subdir = '${GITHUB_PROJECT}'; 324 $dist_subdir = '${GITHUB_PROJECT}';
325 } 325 }
326 if ($3 eq $4) { 326 if ($3 eq $4) {
327 $gh_release = '${DISTNAME}'; 327 $gh_release = '${DISTNAME}';
328 } else { 328 } else {
329 $gh_release = $3; 329 $gh_release = $3;
330 } 330 }
331 $distfile = "$4$5"; 331 $distfile = "$4$5";
332 $found = true; 332 $found = true;
333 } else { 333 } else {
334 die("$0: ERROR: Invalid GitHub URL: ${url}\n"); 334 die("$0: ERROR: Invalid GitHub URL: ${url}\n");
335 } 335 }
 336 } else {
 337 $gh_project = ""; $gh_release = ""; $dist_subdir = "";
336 } 338 }
337 } 339 }
338 340
339 if (!$found) { 341 if (!$found) {
340 if ($url =~ qr"^(.*/)(.*)$") { 342 if ($url =~ qr"^(.*/)(.*)$") {
341 ($master_sites, $distfile) = ($1, $2); 343 ($master_sites, $distfile) = ($1, $2);
342 $homepage = $master_sites; 344 $homepage = $master_sites;
343 } else { 345 } else {
344 die("$0: ERROR: Invalid URL: ${url}\n"); 346 die("$0: ERROR: Invalid URL: ${url}\n");
345 } 347 }
346 } 348 }
347 349
348 if ($distfile =~ qr"^(.*)(\.tgz|\.tar\.Z|\.tar\.gz|\.tar\.bz2|\.tar\.xz|\.tar\.7z)$") { 350 if ($distfile =~ qr"^(.*)(\.tgz|\.tar\.Z|\.tar\.gz|\.tar\.bz2|\.tar\.xz|\.tar\.7z)$") {