Ticket #21724: doclifter.diff

File doclifter.diff, 2.7 KB (added by blb@…, 15 years ago)

diff to doclifter

  • files/patch-doclifter.diff

     
     1--- doclifter.orig      2006-12-25 00:43:35.000000000 -0700
     2+++ doclifter   2009-09-30 15:11:17.000000000 -0600
     3@@ -126,7 +126,7 @@
     4 $Id: doclifter,v 1.1336 2006/12/22 14:41:03 esr Exp $
     5 """
     6 # Requires Python 2.2a
     7-import sys, os, glob, re, sre, string, exceptions, copy, tempfile, time, pprint
     8+import sys, os, glob, re, string, exceptions, copy, tempfile, time, pprint
     9 
     10 # This is a speed hack recommended by Armin Rigo.  It cuts runtime by about 33%
     11 # and makes it possible for psyco 1.2 to reduce runtime another 33%.
     12@@ -385,8 +385,8 @@
     13             if line.startswith('.\\" | '):
     14                 print line
     15                 # Someday we'll have more declarations
     16-                (mark, token, as, markup) = line[5:].split()
     17-                if mark != "mark" or as != "as":
     18+                (mark, token, asvalue, markup) = line[5:].split()
     19+                if mark != "mark" or asvalue != "as":
     20                     continue
     21                 self.post(token, markup)
     22     def __repr__(self):
     23@@ -6370,8 +6370,8 @@
     24         return result
     25     def styleargs(self, args, tag, attribute="", prefix=""):
     26         return self.process_punct(args, lambda x: self.stylehook(x, tag, attribute, prefix), 1)
     27-    def replacemacro(self, args, with):
     28-        return self.process_punct(args, lambda x: [with] + x, 1)
     29+    def replacemacro(self, args, replacement):
     30+        return self.process_punct(args, lambda x: [replacement] + x, 1)
     31     def eval(self, args):
     32         "Evaluate a macro, returning a list."
     33         if args[0][0] == '.':
  • Portfile

     
    44
    55name            doclifter
    66version         2.3
     7revision        1
    78categories      textproc
    89platforms       darwin
    910maintainers     markd
     
    1415master_sites    http://catb.org/~esr/doclifter/
    1516checksums       md5 db0573381ac1abec627b4bb5025087ea
    1617
    17 depends_lib     port:python24
     18depends_lib     port:python26
    1819
    1920use_configure   no
    2021
     22patchfiles      patch-doclifter.diff
     23
    2124destroot {
    2225        xinstall -m 755 -d ${destroot}${prefix}/bin
    2326        xinstall -m 755 -d ${destroot}${prefix}/share/man/man1
     
    3033        foreach doc {BUGS COPYING README TODO} {
    3134                xinstall -m 644 ${worksrcpath}/${doc} ${destroot}${prefix}/share/doc/${name}
    3235        }
     36        reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python2.6|" \
     37                ${destroot}${prefix}/bin/doclifter
     38        reinplace "s|#!/usr/bin/python|#!${prefix}/bin/python2.6|" \
     39                ${destroot}${prefix}/bin/manlifter
    3340}