[19432] trunk/dports/print/rubber
source_changes at macosforge.org
source_changes at macosforge.org
Thu Sep 7 07:14:31 PDT 2006
Revision: 19432
Author: markd at macports.org
Date: 2006-09-07 07:14:29 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Ticket 10043. Apply patches submitted by maintainer to support import.
Modified Paths:
--------------
trunk/dports/print/rubber/Portfile
Added Paths:
-----------
trunk/dports/print/rubber/files/
trunk/dports/print/rubber/files/patch-ab
trunk/dports/print/rubber/files/patch-ac
Modified: trunk/dports/print/rubber/Portfile
===================================================================
--- trunk/dports/print/rubber/Portfile 2006-09-07 07:48:38 UTC (rev 19431)
+++ trunk/dports/print/rubber/Portfile 2006-09-07 14:14:29 UTC (rev 19432)
@@ -3,6 +3,8 @@
name rubber
version 1.1
+revision 1
+patchfiles patch-ab patch-ac
categories print
maintainers ehainry at free.fr
description An automated system for building LaTeX documents
Added: trunk/dports/print/rubber/files/patch-ab
===================================================================
--- trunk/dports/print/rubber/files/patch-ab (rev 0)
+++ trunk/dports/print/rubber/files/patch-ab 2006-09-07 14:14:29 UTC (rev 19432)
@@ -0,0 +1,32 @@
+$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
Added: trunk/dports/print/rubber/files/patch-ac
===================================================================
--- trunk/dports/print/rubber/files/patch-ac (rev 0)
+++ trunk/dports/print/rubber/files/patch-ac 2006-09-07 14:14:29 UTC (rev 19432)
@@ -0,0 +1,25 @@
+$NetBSD: patch-ac,v 1.1 2006/06/01 09:09:52 tonio Exp $
+
+--- /dev/null 2006-06-01 10:55:34.000000000 +0200
++++ src/rules/latex/import.py
+@@ -0,0 +1,20 @@
++"""
++Support for package 'import' in Rubber.
++"""
++
++from os.path import basename
++import re
++import rubber
++
++re_ipath = re.compile("{(?P<prefix>[^{}]*)}")
++class Module (rubber.rules.latex.Module):
++ def __init__ (self, doc, dict):
++ self.doc = doc
++ doc.add_hook("import", self.import_doc)
++
++ def import_doc (self, dict):
++ if not dict["arg"]:
++ return 0
++ self.doc.env.path.append(dict["arg"])
++ m = re_ipath.match(dict["line"])
++ self.doc.input_file(m.group("prefix") + ".tex")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20060907/4aca8576/attachment.html
More information about the macports-changes
mailing list