lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

severe problems with mftrace from CVS


From: Werner LEMBERG
Subject: severe problems with mftrace from CVS
Date: Thu, 27 Apr 2006 15:34:17 +0200 (CEST)

I really hope that noone has tried to build lilypond with the mftrace
from the CVS!  It took me some hours to find out why lilypond
completely fails to produce any decent output...

Here is a patch, together with a ChangeLog entry, which fixes the most
serious bugs.


    Werner


======================================================================

2006-04-27  Werner Lemberg  <address@hidden>

        * mftrace.py <top_level>: Don't define `include_dirs' here.
        (parse_command_line) <'-I'>: Destination is `include_dirs',
        not `includes'.
        <'-e'>: Add missing destination (`encoding_file') and remove
        explicit initialization.
        (do_file): Define `include_dirs' here.  Copy command line
        option values properly and append `origdir' before handling
        encoding files.

======================================================================

diff -aruN -x CVS mftrace.old/mftrace.py mftrace/mftrace.py
--- mftrace.old/mftrace.py      2006-04-07 06:11:57.000000000 +0200
+++ mftrace/mftrace.py  2006-04-27 15:19:45.000000000 +0200
@@ -187,7 +187,6 @@
        }
 
 
-include_dirs = [origdir]
 def find_file (nm):
        for d in include_dirs:
                p = os.path.join (d, nm)
@@ -971,7 +970,7 @@
                      dest="gffile",
                      help= _("Use gf FILE instead of running Metafont"))
        p.add_option ('-I', '--include',
-                     dest="includes",
+                     dest="include_dirs",
                      action="append",
                      default=[],
                      help=_("Add to path for searching files"))
@@ -986,9 +985,9 @@
                      action='store',
                      dest='tfm_file')
        p.add_option ('-e', '--encoding',
+                     dest="encoding_file",
                      metavar="FILE",
                      help= _ ("Use encoding file FILE"))
-       
        p.add_option ('','--keep-trying',
                      dest='keep_trying',
                      default=False,
@@ -1067,7 +1066,6 @@
        options.glyphs = glyph_range
        
        options.trace_binary = ''
-       options.encoding_file = ''
        if options.potrace:
                options.trace_binary = 'potrace'
        elif options.autotrace:
@@ -1287,6 +1285,9 @@
 
 def do_file (filename):        
        encoding_file = options.encoding_file
+       global include_dirs
+       include_dirs = options.include_dirs
+       include_dirs.append (origdir)
 
        basename = strip_extension (filename, '.mf')
        progress (_ ("Font `%s'..." % basename))
@@ -1335,7 +1336,6 @@
        if options.verbose:
                progress ('Temporary directory is `%s\' ' % temp_dir)
 
-       include_dirs.append (os.getcwd ())
        os.chdir (temp_dir)
 
        if not options.gffile:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]