| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! @PERL@ | | 1 | #! @PERL@ |
2 | # $NetBSD: url2pkg.pl,v 1.25 2014/06/25 12:15:10 rodent Exp $ | | 2 | # $NetBSD: url2pkg.pl,v 1.26 2014/08/01 15:44:13 schmonz 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. |
| @@ -363,26 +363,27 @@ sub generate_initial_package($) { | | | @@ -363,26 +363,27 @@ sub generate_initial_package($) { |
363 | | | 363 | |
364 | sub adjust_package_from_extracted_distfiles() | | 364 | sub adjust_package_from_extracted_distfiles() |
365 | { | | 365 | { |
366 | my ($seen_marker); | | 366 | my ($seen_marker); |
367 | | | 367 | |
368 | chomp($abs_wrkdir = `${make} show-var VARNAME=WRKDIR`); | | 368 | chomp($abs_wrkdir = `${make} show-var VARNAME=WRKDIR`); |
369 | | | 369 | |
370 | # | | 370 | # |
371 | # Determine the value of WRKSRC. | | 371 | # Determine the value of WRKSRC. |
372 | # | | 372 | # |
373 | my @files = (); | | 373 | my @files = (); |
374 | opendir(WRKDIR, $abs_wrkdir) or die; | | 374 | opendir(WRKDIR, $abs_wrkdir) or die; |
375 | while (defined(my $f = readdir(WRKDIR))) { | | 375 | while (defined(my $f = readdir(WRKDIR))) { |
| | | 376 | no if $] >= 5.018, warnings => "experimental::smartmatch"; |
376 | given ($f) { | | 377 | given ($f) { |
377 | next when qr"^\."; | | 378 | next when qr"^\."; |
378 | next when 'pax_global_header'; | | 379 | next when 'pax_global_header'; |
379 | next when qr".*\.gemspec"; | | 380 | next when qr".*\.gemspec"; |
380 | default { push(@files, $f) } | | 381 | default { push(@files, $f) } |
381 | } | | 382 | } |
382 | } | | 383 | } |
383 | closedir(WRKDIR); | | 384 | closedir(WRKDIR); |
384 | if (@files == 1) { | | 385 | if (@files == 1) { |
385 | if ($files[0] ne $distname) { | | 386 | if ($files[0] ne $distname) { |
386 | push(@build_vars, ["WRKSRC", "\${WRKDIR}/$files[0]"]); | | 387 | push(@build_vars, ["WRKSRC", "\${WRKDIR}/$files[0]"]); |
387 | } | | 388 | } |
388 | $abs_wrksrc = "${abs_wrkdir}/$files[0]"; | | 389 | $abs_wrksrc = "${abs_wrkdir}/$files[0]"; |