Dear maintainer/developer,

I am sorry I have got a mistake to run reportbug on a Etch box, but po4a
in Sid have the same problem.

I have figured out a patch to make po4a TeX module use Kpathsea. I do
not know if this would affect the dependency of po4a package.

I would be happy if I could do something more.


--- /usr/share/perl5/Locale/Po4a/TeX.pm 2008-07-22 02:54:52.000000000 +0800
+++ /home/heroxbd/art/po4a/TeX.pm       2008-12-23 18:22:18.000000000 +0800
@@ -906,9 +906,9 @@ sub read {
 
 =item read_file
 
-Recursively read a file, appending included files which are not listed in the
-...@exclude_include array.  Included files are searched in the directory of the
-input document or in a directory listed in the TEXINPUTS environment variable.
+Recursively read a file, appending included files which are not listed
+in the @exclude_include array. Included files are searched using
+"kpsewhich" command in Kpathsea library.
 
 Except from the file inclusion part, it is a cut and paste from
 Transtractor's read.
@@ -955,18 +955,10 @@ sub read_file {
             }
             if ($include) {
                 # search the file
-                foreach (($my_dirname,
-                          defined($ENV{"TEXINPUTS"})?
-                              split(/:/, $ENV{"TEXINPUTS"}):
-                              ".")) {
-                    if      (-r "$_/$newfilename") {
-                        $newfilename = "$_/$newfilename";
-                        last;
-                    } elsif (-r "$_/$newfilename.tex") {
-                        $newfilename = "$_/$newfilename.tex";
-                        last;
-                    }
-                }
+
+               open (KPSEA, "kpsewhich " . $newfilename . " |");
+               $newfilename = <KPSEA>;
+
                 push @entries, read_file($self,
                                          $newfilename);
                 if ($tag eq "include") {
@@ -1015,18 +1007,8 @@ newcommands).
 sub parse_definition_file {
     my ($self,$filename,$only_try)=...@_;
 
-    foreach (($my_dirname,
-              defined($ENV{"TEXINPUTS"})?
-                  split(/:/, $ENV{"TEXINPUTS"}):
-                  ".")) {
-        if ((not defined $_) or (not length $_)) {
-            $_ = ".";
-        }
-        if (-r $_."/".$filename) {
-            $filename = $_."/".$filename;
-            last;
-        }
-    }
+    open (KPSEA, "kpsewhich " . $filename . " |");
+    $filename = <KPSEA>;
 
     if (! open (IN,"<$filename")) {
         warn wrap_mod("po4a::tex",


-- 
Benda Xu
Academic Talent Program,
Fundamental Science of Mathematics and Physics,
Tsinghua University,
P.R.China

http://alioth.debian.org/~heroxbd-guest



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to