Fix automake icons installation

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 04db460623)
v3.5.13-sru
Slávek Banko 10 years ago
parent 27050271c1
commit 9e00e0d303

@ -1528,11 +1528,12 @@ sub tag_ICON()
my $type = $prefix; my $type = $prefix;
$type =~ s/^.*-([^-]+)$/$1/; $type =~ s/^.*-([^-]+)$/$1/;
$prefix =~ s/^(.*)-[^-]+$/$1/; $prefix =~ s/^(.*)-[^-]+$/$1/;
my %type_hash = my %type_hash =
( (
'action' => 'actions', 'action' => 'actions',
'app' => 'apps', 'app' => 'apps',
'category' => 'categories',
'device' => 'devices', 'device' => 'devices',
'filesys' => 'filesystems', 'filesys' => 'filesystems',
'mime' => 'mimetypes' 'mime' => 'mimetypes'
@ -1580,15 +1581,16 @@ sub tag_ICON()
print STDERR "unknown icon prefix $prefix in $printname\n"; print STDERR "unknown icon prefix $prefix in $printname\n";
next; next;
} }
my $dir = $dir_hash{$prefix} . "/" . $type_hash{$type}; my $dir = $dir_hash{$prefix} . "/" . $type_hash{$type};
if ($newfile =~ /-[^\.]/) { #-- does not convert from dashes to folders inside icon names
my $tmp = $newfile; #if ($newfile =~ /-[^\.]/) {
$tmp =~ s/^([^-]+)-.*$/$1/; # my $tmp = $newfile;
$dir = $dir . "/" . $tmp; # $tmp =~ s/^([^-]+)-.*$/$1/;
$newfile =~ s/^[^-]+-//; # $dir = $dir . "/" . $tmp;
} # $newfile =~ s/^[^-]+-//;
#}
if (!defined $directories{$dir}) { if (!defined $directories{$dir}) {
$install .= "\t\$(mkinstalldirs) \$(DESTDIR)\$($destdir)/$dir\n"; $install .= "\t\$(mkinstalldirs) \$(DESTDIR)\$($destdir)/$dir\n";
$directories{$dir} = 1; $directories{$dir} = 1;

Loading…
Cancel
Save