mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
107 lines
3.2 KiB
Diff
107 lines
3.2 KiB
Diff
Author: Kevin Oberman rkoberman at gmail.com
|
|
Last-Update: Tue Mar 4 04:44:42 UTC 2014
|
|
Origin: https://lists.freebsd.org/pipermail/freebsd-ports/2014-March/090447.html
|
|
Description: Adapt to perl 5.22
|
|
|
|
--- a/imageindex
|
|
+++ b/imageindex
|
|
@@ -329,7 +329,7 @@ use File::Basename;
|
|
use File::Copy;
|
|
use English;
|
|
use Carp;
|
|
-require 'flush.pl';
|
|
+use IO::Handle;
|
|
|
|
# to shut up -w
|
|
use vars qw($opt_recurse);
|
|
@@ -527,7 +527,7 @@ my $mplayer_prog = &find_in_path ('mplay
|
|
|
|
# Extract info
|
|
print "Extracting image info";
|
|
-flush (STDOUT);
|
|
+STDOUT->flush();
|
|
|
|
foreach my $file (@files) {
|
|
|
|
@@ -1712,7 +1712,7 @@ sub extract_file_info {
|
|
# at the user so that the video regexp might be adjusted
|
|
if ($retval == -1) {
|
|
print "\nwarning: $pathname identified by extension as video file but mplayer doesn't recognize it\n";
|
|
- flush (STDOUT);
|
|
+ STDOUT->flush();
|
|
}
|
|
} else {
|
|
&extract_image_info ($filename);
|
|
@@ -1735,15 +1735,15 @@ sub extract_movie_info {
|
|
my ($arate, $anch, $length, $is_video);
|
|
|
|
print ".";
|
|
- flush (STDOUT);
|
|
+ STDOUT->flush();
|
|
|
|
if ($mplayer_prog eq '' || ($do_video_files == 0)) {
|
|
if (($do_video_files != 0) && $mplayer_prog eq '') {
|
|
print "\nwarning: Trying to process video files but cannot find mplayer in \$path!\n";
|
|
- flush (STDOUT);
|
|
+ STDOUT->flush();
|
|
}
|
|
print "\nSkipping $pathname";
|
|
- flush (STDOUT);
|
|
+ STDOUT->flush();
|
|
return 0;
|
|
} else {
|
|
$object_counter++;
|
|
@@ -1897,14 +1897,14 @@ sub extract_image_info {
|
|
my $i;
|
|
|
|
print ".";
|
|
- flush (STDOUT);
|
|
+ STDOUT->flush();
|
|
|
|
$retval = $image->Read($pathname);
|
|
|
|
|
|
if ($retval ne "") {
|
|
print "\nSkipping $pathname";
|
|
- flush (STDOUT);
|
|
+ STDOUT->flush();
|
|
return;
|
|
} else {
|
|
$object_counter++;
|
|
@@ -2302,7 +2302,7 @@ sub page_header {
|
|
if (defined($lastdate)) {
|
|
print "<META NAME=\"$enddatemetatag\" CONTENT=\"$lastdate\">\n";
|
|
}
|
|
- if (!defined ($opt_includeall) && defined (@opt_exclude) && scalar (@opt_exclude)) {
|
|
+ if (!defined ($opt_includeall) && @opt_exclude && scalar (@opt_exclude)) {
|
|
my $tmp = join (',', @opt_exclude);
|
|
my $etmp;
|
|
|
|
@@ -2315,7 +2315,7 @@ sub page_header {
|
|
}
|
|
printf ("<META NAME=\"$numimagesmetatag\" CONTENT=\"%d\">\n", $image_counter);
|
|
|
|
- if (defined (@opt_skipmont) && scalar (@opt_skipmont)) {
|
|
+ if ( @opt_skipmont && scalar (@opt_skipmont)) {
|
|
my $tmp = join (',', @opt_skipmont);
|
|
printf ("<META NAME=\"$skipmetatag\" CONTENT=\"%s\">\n", $tmp);
|
|
}
|
|
@@ -2479,7 +2479,7 @@ sub exclude_files {
|
|
# then process. Check to see if any of the -skipmont options were given as
|
|
# strings of filenames concatenated with ',' characters. If so, support it.
|
|
#
|
|
- if (defined (@opt_skipmont)) {
|
|
+ if (@opt_skipmont) {
|
|
foreach (@opt_skipmont) {
|
|
(@tokens) = split (/,/, $_);
|
|
foreach $token (@tokens) {
|
|
@@ -2503,7 +2503,7 @@ sub exclude_files {
|
|
# then process. Check to see if any of the -exclude options were given as
|
|
# strings of filenames concatenated with ',' characters. If so, support it.
|
|
#
|
|
- if (defined (@opt_exclude)) {
|
|
+ if (@opt_exclude) {
|
|
# -includeall takes priority over -exclude on the commandline if they are
|
|
# used together (wierd, but ...)
|
|
#
|