pkgsrc/textproc/rubber/patches/patch-ab
tonio 1abb26b19b add suppport for the "import" latex package
Fix the behavior of the graphics module with othor packages modifying the
TEXINPUTS path
2006-06-01 09:09:52 +00:00

32 lines
1.1 KiB
Text

$NetBSD: patch-ab,v 1.3 2006/06/01 09:09:52 tonio Exp $
--- src/rules/latex/graphics.py.orig 2006-06-01 10:54:11.000000000 +0200
+++ src/rules/latex/graphics.py
@@ -70,7 +70,7 @@ class Module (rubber.rules.latex.Module)
doc.add_hook("DeclareGraphicsExtensions", self.declareExtensions)
doc.add_hook("DeclareGraphicsRule", self.declareRule)
- self.prefixes = map(lambda x: join(x, ""), doc.env.path)
+ self.prefixes = []
self.files = []
# I take dvips as the default, but it is not portable.
@@ -130,7 +130,8 @@ class Module (rubber.rules.latex.Module)
return 0
return 1
- d = self.env.convert(name, suffixes=suffixes, prefixes=self.prefixes,
+ d = self.env.convert(name, suffixes=suffixes,
+ prefixes=self.prefixes+[join(x,"") for x in self.env.path],
check=check, pos=dict["pos"])
if d:
@@ -211,7 +212,7 @@ class Module (rubber.rules.latex.Module)
suffixes, and return either the complete path to the actual file or
None if the file is not found.
"""
- for prefix in self.prefixes:
+ for prefix in self.prefixes+[join(x,"") for x in self.env.path]:
test = prefix + name
if exists(test):
return test