Reimport of package namazu from japanese/namazu2 into textproc/namazu2.
[pkgsrcv2.git] / textproc / namazu2 / patches / patch-am
1 $NetBSD$
2
3 --- filter/excel.pl.orig        Fri Dec 15 14:37:41 2000
4 +++ filter/excel.pl
5 @@ -26,6 +26,7 @@
6  
7  package excel;
8  use strict;
9 +use File::Basename;
10  use File::Copy;
11  require 'util.pl';
12  require 'gfilter.pl';
13 @@ -33,15 +34,17 @@
14  
15  my $xlconvpath  = undef;
16  my $utfconvpath = undef;
17 +my $convname = undef;
18  
19  sub mediatype() {
20      return ('application/excel');
21  }
22  
23  sub status() {
24 -    $xlconvpath = util::checkcmd('xlHtml');
25 +    $xlconvpath = util::checkcmd('xlhtml') || util::checkcmd('xlHtml');
26  #    return 'no' unless defined $xlconvpath;
27      if (defined $xlconvpath) {
28 +       $convname = basename($xlconvpath);
29         if (!util::islang("ja")) {
30             return 'yes';
31         } else {
32 @@ -83,7 +86,7 @@
33        = @_;
34      my $err = undef;
35  
36 -    if (util::checkcmd('xlHtml')) {
37 +    if ($convname =~ /xlhtml/i) {
38      $err = filter_xl($orig_cfile, $cont, $weighted_str, $headings, $fields);
39      } else {
40      $err = filter_doccat($orig_cfile, $cont, $weighted_str, $headings, $fields);