diff options
author | tonio <tonio> | 2006-06-01 09:09:52 +0000 |
---|---|---|
committer | tonio <tonio> | 2006-06-01 09:09:52 +0000 |
commit | b5716f54575a6b7f5b5fa304ce834653f26373bb (patch) | |
tree | 94ed14b3e901958e1903e96731bbb3289c83cc91 /textproc/rubber | |
parent | 67d0bdf335eda3e4fd96c8e13911cb077765918a (diff) | |
download | pkgsrc-b5716f54575a6b7f5b5fa304ce834653f26373bb.tar.gz |
add suppport for the "import" latex package
Fix the behavior of the graphics module with othor packages modifying the
TEXINPUTS path
Diffstat (limited to 'textproc/rubber')
-rw-r--r-- | textproc/rubber/Makefile | 5 | ||||
-rw-r--r-- | textproc/rubber/PLIST | 22 | ||||
-rw-r--r-- | textproc/rubber/distinfo | 4 | ||||
-rw-r--r-- | textproc/rubber/patches/patch-ab | 32 | ||||
-rw-r--r-- | textproc/rubber/patches/patch-ac | 25 |
5 files changed, 75 insertions, 13 deletions
diff --git a/textproc/rubber/Makefile b/textproc/rubber/Makefile index f5113020f85..4a72de1606a 100644 --- a/textproc/rubber/Makefile +++ b/textproc/rubber/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.16 2006/05/13 03:44:24 minskim Exp $ +# $NetBSD: Makefile,v 1.17 2006/06/01 09:09:52 tonio Exp $ # DISTNAME= rubber-1.1 +PKGREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://ebeffara.free.fr/pub/ @@ -17,7 +18,7 @@ TEXINFO_REQD= 4.6 PYTHON_VERSIONS_ACCEPTED= 24 23 TEX_ACCEPTED= teTeX2 teTeX3 -CONFIGURE_ARGS+= --python=${PYTHONBIN:Q} +CONFIGURE_ARGS+= --python=${PYTHONBIN:Q} CONFIGURE_ARGS+= --prefix=${PREFIX:Q} CONFIGURE_ARGS+= --datadir=${PREFIX:Q}/share CONFIGURE_ARGS+= --mandir=${PREFIX:Q}/${PKGMANDIR:Q} diff --git a/textproc/rubber/PLIST b/textproc/rubber/PLIST index c4a7ae3c79f..1e79d73b0ef 100644 --- a/textproc/rubber/PLIST +++ b/textproc/rubber/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2006/04/08 22:55:59 tonio Exp $ +@comment $NetBSD: PLIST,v 1.5 2006/06/01 09:09:52 tonio Exp $ bin/rubber bin/rubber-info bin/rubber-pipe @@ -10,7 +10,14 @@ man/fr/man1/rubber.1 man/man1/rubber-info.1 man/man1/rubber-pipe.1 man/man1/rubber.1 -share/rubber/rules.ini +share/rubber/modules/aleph.rub +share/rubber/modules/beamer.rub +share/rubber/modules/etex.rub +share/rubber/modules/hyperref.rub +share/rubber/modules/minitoc-hyper.rub +share/rubber/modules/ntheroem.rub +share/rubber/modules/omega.rub +share/rubber/modules/revtex4.rub share/rubber/rubber/__init__.py share/rubber/rubber/__init__.pyc share/rubber/rubber/cmd_info.py @@ -47,6 +54,8 @@ share/rubber/rubber/rules/latex/graphicx.py share/rubber/rubber/rules/latex/graphicx.pyc share/rubber/rubber/rules/latex/gz.py share/rubber/rubber/rules/latex/gz.pyc +share/rubber/rubber/rules/latex/import.py +share/rubber/rubber/rules/latex/import.pyc share/rubber/rubber/rules/latex/index.py share/rubber/rubber/rules/latex/index.pyc share/rubber/rubber/rules/latex/listings.py @@ -84,14 +93,7 @@ share/rubber/rubber/util.pyc share/rubber/rubber/version.py share/rubber/rubber/version.py share/rubber/rubber/version.pyc -share/rubber/modules/aleph.rub -share/rubber/modules/beamer.rub -share/rubber/modules/etex.rub -share/rubber/modules/hyperref.rub -share/rubber/modules/minitoc-hyper.rub -share/rubber/modules/ntheroem.rub -share/rubber/modules/omega.rub -share/rubber/modules/revtex4.rub +share/rubber/rules.ini @dirrm share/rubber/rubber/rules/latex @dirrm share/rubber/rubber/rules @dirrm share/rubber/rubber diff --git a/textproc/rubber/distinfo b/textproc/rubber/distinfo index 1091ccd1d7d..6f813a7d22c 100644 --- a/textproc/rubber/distinfo +++ b/textproc/rubber/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.5 2006/04/08 22:55:59 tonio Exp $ +$NetBSD: distinfo,v 1.6 2006/06/01 09:09:52 tonio Exp $ SHA1 (rubber-1.1.tar.gz) = c1693bb6f4534a72479a40cda68212879a761fea RMD160 (rubber-1.1.tar.gz) = 7c44106210c64ab51b0b894ef03c3672c2fe298f Size (rubber-1.1.tar.gz) = 83795 bytes SHA1 (patch-aa) = 13063478ceac61e64375773084e824f5b4471f2d +SHA1 (patch-ab) = c08d45cd49a93a269f0ba80f5fd46d1a105c158d +SHA1 (patch-ac) = 956f3b6b1cb78fa0e497e868aa1ca0ef810abd24 diff --git a/textproc/rubber/patches/patch-ab b/textproc/rubber/patches/patch-ab new file mode 100644 index 00000000000..5b44b2eb372 --- /dev/null +++ b/textproc/rubber/patches/patch-ab @@ -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 diff --git a/textproc/rubber/patches/patch-ac b/textproc/rubber/patches/patch-ac new file mode 100644 index 00000000000..5b9f8dabec4 --- /dev/null +++ b/textproc/rubber/patches/patch-ac @@ -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") |